Problem to solve:
Write hexadecimal value of 32-bit variable
i
(type Longint) after executing code in Pascal. Code will translate for little-endian platform.i:=-20; i:=($FFFF xor (i shr 2)) and not($50 shl 16);
What I need to know: what happens in brackets (i shr 2
) and ($50 shl 16
).
What I thought: i (-20) in hexadecimal: FFEC (but maybe thanks to little-endian it's CEFF). ($50 shl 16) - I thought that because $50 is only 8 bit, shl 16 will just make it to zero. Or will it become $500000?