Lecture11_handout-F09

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

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

View Full Document Right Arrow Icon
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
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background image of page 2
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
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
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 Right Arrow Icon
Ask a homework question - tutors are online