Good luck...
This method will take in a String of length 8 with ones and zeros (representing bits), a boolean direction (with true being right and false being left), and an amount. This method will return a String that represents a bit shift of that amount. Note that there are no leading zeros.
Examples :
bitShift("10000000", true, 1) -> "1000000"
bitShift("00000001", false, 1) -> "10"
This method will compute the logical xor (exclusive or) operation. The catch is that this must be done with ONLY logical ands, logical ors, and logical nots. DO NOT USE THE NATIVE JAVA XOR!
You just get a truth table.
s0 | s1| F
0 | 0 | x + y
0 | 1 | xy
1 | 0 | x
1 | 1 | y
This method will take a String of any length with ones and zeros (reperesenting bits). You will return the decimal number the String represents.
This method will take an int representing a number. You will return the binary representation of that number with using a String.