Use java to perform binary shifts
I have to take a binary data in java and perform shifts on it. For e.g.
11110000 when I right shift it by 2 , i.e. 11110000>>00111100
The problem is that, I don't know how to store such a data in Java, as the
byte type converts it to decimal format. I need to use the bit at position
6 and XOR it with some other value.
I just need to know how I can achieve the ability to store binary data and
perform the required shifts.
No comments:
Post a Comment