I\'ve got the following task:
Compute x/(2^n), for 0 <= n <= 30 using bit shifting. Requirement: Round toward zero
Compute x/(2^n), for 0 <= n <= 30 using bit shifting.
x/(2^n)
0 <= n <= 30
Requirement: Round toward zero
Negative numbers work out to be one off in the binary representation due to their two's complement representation. Perhaps reading about two's complement will help.