Lecture11_handout-F09

# Lecture11_handout-F09 - CE-320 Microcomputers I Fall B 2009...

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

CE-320 Microcomputers I Fall B 2009 Lecture 11 Page 1 Lecture 11 Advanced Arithmetic Instructions Purpose: Use basic multiplication and division instructions Use shift and rotate instructions

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

View Full Document
CE-320 Microcomputers I Fall B 2009 Lecture 11 Page 2 Multiplication The Star12 processors support three different multiplication instructions. Unlike addition and subtraction, multiplication generates different answers based on interpreting the values as unsigned or signed. MUL A * B → D Treated as unsigned Only affects C bit… allows rounding, not overflow EMUL D * Y → Y:D Treated as unsigned N, Z, C… not as you’d expect EMULS D * Y → Y:D Treated as signed N, Z, C… not as you’d expect
CE-320 Microcomputers I Fall B 2009 Lecture 11 Page 3 Division The Star12 processors support five different division instructions. Like multiplication, division generates different answers based on interpreting the values as unsigned or signed. IDIV D ÷ X → X remainder → D Treated as unsigned Affects Z, V cleared, C indicates divide by 0 IDIVS D ÷ X → X remainder → D Treated as signed Affects Z, V cleared, C indicates divide by 0 EDIV: Y:D ÷ X → Y remainder → D Treated as unsigned

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.

## This document was uploaded on 11/12/2009.

### Page1 / 9

Lecture11_handout-F09 - CE-320 Microcomputers I Fall B 2009...

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

View Full Document
Ask a homework question - tutors are online