Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- byte byte1=(byte)0x8A; //10001010
- byte byte2=(byte)(byte1>>>1); //11000101
- byte byte2=(byte)(((int)byte1)>>>1);
- byte byte2 = (byte) (byte1 >>> 1 & 0x7F);
- int int1 = 0x8A;
- System.out.println(formatBinary(int1));
- int int2 = int1 >>> 1;
- System.out.println(formatBinary(int2));
- 8a: 10001010
- 45: 01000101
Add Comment
Please, Sign In to add comment