Given that the MSB in the 2s Complement representation can be used to detect the sign of a number, one can easily design hardware to detect overflows. The add and subtract instructions we have looked at thus far do report overflows. If time permits, we will now move on to a discussion of Logical Operations. Logical operations provide a means of manipulating individual bits, or fields of bits within a word. The first kind of logical operation is the shift.
Shifts move bits in a word one way, inserting zeros in all the positions that become vacant.