I need to add binaries.
st=br.readLine() //I used readline to read string line
byte[] bytesy = st.getBytes(); //and put it to bytes array.
Now, how can I complement the binary equivalent of bytes (or how to XOR it up to 11111111)?
Expected Result:
If the first char of st is x, then the binary equivalent is 01111000
and the output should be 10000111, complementing (or XOR to 11111111)
source
share