I need to convert any integer value greate than 127 to binary value using this example:
Represent the value in binary
(e.g 137 => 1000 1001)
2) Break in up in groups of 7 bits from the lowest significant bit.
(1 | 000 1001)
3) Take the lowest 7 bits and that gives you the lowest byte (0000 1001)
4) For the next group of 7 bits (in the example, this is 000 0001), set the MSB to 1 (which gives 1000 0001 in our example).
Thus 137 becomes:
1000 0001 0000 1001
can anyone help me do this code using | & and shif to left operators
Thanks