Hi all,
I'm doing some bitwise operations in VB.NET, and I got some strange results.
If an Int16 (Short) variable has the value &HAA (8 bits) and I do a 4-bit
shift:
var16 = var16 << 4
I got, correctly, the value &HAA0. But, if I try to do a 8-bit shift, I got
&HFFFFAA00 !!!!
I did many tests and it appears that I need a 32-bit variable to do
operations that normally - in other platforms - I can do in 16-bit
variables!
Does someone knows why? I've lost some hours of my life to outline - but not
solve - this, and I'd like to know, at least, why.
Thanks in advance,
Fabrício de Novaes Kucinskis.