logical & between a uint16 and a uint8 what will happen to the 8 leftmost bits?
For example:
Uint16 bitvector16 = 1111111100000001;
Uint8 bitvector8 = 11111111
Uint16 result = bitvector16 & bitvercotr8;
What will result be if we'd print it?
My guess is 0000000000000001, but i can't be sure
I’d expect the missing high order 8 bits in the uint8 would be padded with 0s
I tjink your result is correct
Why is that? What happens when the bit vectors are not of the same size? Are they aligned to the least significant bits by default?
I would expect this to be the case, but I am not 100 percent sure
Обсуждают сегодня