{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Chapter7 Shift

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

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

Shift and Rotate Instructions Chapter 7 Section 7.10

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

View Full Document
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
Logical shift left (LSL) instructions. Figure 7-7 C flag can be tested

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

View Full Document
Logical shift right (LSR) instructions. Figure 7-8
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.

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

View Full Document
Arithmetic shift right (ASR) instructions. Figure 7-6 Preserve the sign Use for division of a signed number by 2.
Figure 7-9

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online