I read this topic about shifting. I thought that if I have two bytes:
byte hi = //...
byte low = //...
why can't I just do that
short s = (short)((hi << 8) | low)
Why is it incorrect? I thought we 8 bits left shift most significant and leave least significant byte as is. And then just bitwise or them.