Skip to Main Content
The X86 Microprocessors: Architecture and Programming (8086 to Pentium), 1st Edition
book

The X86 Microprocessors: Architecture and Programming (8086 to Pentium), 1st Edition

by Lyla B. Das
May 2024
Intermediate to advanced content levelIntermediate to advanced
665 pages
23h 2m
English
Pearson India
Content preview from The X86 Microprocessors: Architecture and Programming (8086 to Pentium), 1st Edition
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
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microprocessors and Microcontrollers  by Pearson

Microprocessors and Microcontrollers by Pearson

Lyla B Das

Publisher Resources

ISBN: 9781282663169