i am using Arduino 1.0 with UNO board!
I am writing some new code and i am using bitshift to assign 5 bytes to a long var.
The code is:
address = a<<16 | b<<12 | c<<8 | d<<4 | e;
address is the long var and the a, b, c, d ,e are the bytes!
Everything is ok except the a<<16. This does nothing to the long var!
I wrote a test function where i “moved” the a byte from the low nibble to the high nibble of the long.
When it reaches the a<<16 then the long is 0x00000000 instead of 0x000F0000!
Is this a bug or am i doing something wrong?
Thank you in advance!