Case 1:
bit value x = 00101011
X >> 2 --> 10101100 // an obvious error?
Case 5:
"unsigned Right Shift Operator causes negative number to change sign."
The unsigned right shift operator always makes the value positive (unless you right shift a negative value by 0). Therefore, any negative values are positive after being shifted and any positive values remain positive after being shifted.
Originally posted by Paul Salerno:
if this were the case then why our case 4 result is negative? Is there a difference w/ unsigned right shift operators?
Consider Paul's rocket mass heater. |