My question is about Java int data structure.
If I have a buffer of 4 bytes
byte[] buffer = {(byte)A, (byte)B, (byte)C, (byte)D};
How to build a positive and a negative int values using this array and logic operators (&
, |
, <<
, >>
)?
Say int = 4 and int = 130; and -4 and -130.