Chapter7 Shift - Shift and Rotate Instructions Chapter 7...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Shift and Rotate Instructions Chapter 7 Section 7.10
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Shift and Rotate Instructions Shift Logical Shift (LSL, LSL r , LSR, LSR r ) Shift a register r (A,B,D) or a memory operand to the left or right one bit. Arithmetic Shift (ASL, ASL r , ASR, ASR r ) Left: multiplying by 2 Right: dividing by 2 (MSB is replicated) N, Z, V, C Rotate (ROL, ROR, ROL r , ROR r ) Rotate a register r (A,B) or a memory operand to the left or right through carry (C) one bit . N, Z, V, C
Background image of page 2
Logical shift left (LSL) instructions. Figure 7-7 C flag can be tested
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Logical shift right (LSR) instructions. Figure 7-8
Background image of page 4
Arithmetic shift left (ASL) instructions. Figure 7-5 Watch out for “overflow”: V = N xor C Exactly the same as LSL. Use for multiplication by 2.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Arithmetic shift right (ASR) instructions. Figure 7-6 Preserve the sign Use for division of a signed number by 2.
Background image of page 6
Figure 7-9
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/23/2011 for the course ELEC 2220 taught by Professor Staff during the Summer '08 term at Auburn University.

Page1 / 15

Chapter7 Shift - Shift and Rotate Instructions Chapter 7...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online