Section 6.7: Shifts (Frame 8)                     [prev][home][next]

An odd thing happened in the last example. 10011101 is -99 in decimal if we treat 10011101 as an 8-bit 2's complement number. However, 10111010 is -70, which is not -99 x 2! But wait! -99 x 2 would be -198, yet we can only represent negative numbers down to -128. So arithmetic shifts are subject to that old nemesis, overflow.