If 7 in 32 bit binary form is:
00000000000000000000000000000111
I would like to perform right arithmetic shift (>>) by 16 so what would the binary representation look like then? I'm a bit confused on this.
If 7 in 32 bit binary form is:
00000000000000000000000000000111
I would like to perform right arithmetic shift (>>) by 16 so what would the binary representation look like then? I'm a bit confused on this.
With each arithmetic shift right, the lowest bit falls off the end, the other bits move down one position, and the sign bit (0 here) propagates down. So after only 3 shifts, all bits are 0, and each of the remaining shifts result in zero as well. So: the result is 0 in every bit position.