- From what I know, for an integer number (let's say 32bit long), the MSB is 1 if the value is negative; else, equals to 0.
- By using a shifting decay, like value -= value >> n; does the MSB take effect? In code:
- By using a shifting decay, like value -= value >> n; does the MSB take effect? In code:
Code:
let's say the binary 1000 0000 0000 0000 0000 0000 0000 0000
would right shift 1 result... 0100 0000 0000 0000 0000 0000 0000 0000 ?
would right shift 1 result... 0100 0000 0000 0000 0000 0000 0000 0000 ?