
172 THE x86 MICROPROCESSORS
4.7.3 | Arithmetic Shift
A shift operation that makes a diff erence in the result depending on the sign of the operand, is
arithmetic shifting. ere are two instructions pertaining to this.
SAR destination, count – Shift right arithmetic.i)
is is similar to the shift right logical (SHR) discussion in Section 3.5.2, but here when shift-
ing right, the sign bit is fi lled into the MSB. is instruction can be used to divide a signed
number by 2, for one shifting each.
MOV BL, − 24 ;AL = 1110 1000
SAR BL,1 ; AL = 1111 0100, which is −12
SAL destination, count – Shift left arithmetic.ii)
is is the same as shif