ICS233_Lecture6 Slides

ICS233_Lecture6 Slides - Computer Architecture &...

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

View Full Document Right Arrow Icon
1 Lecture Slides on Computer Architecture ICS 233 @ Dr A R Naseer 1 MIPS MIPS PROCESSOR PROCESSOR INSTRUCTION SET INSTRUCTION SET ICS 233 ICS 233 Computer Architecture & Computer Architecture & Assembly Language Assembly Language Lecture Slides on Computer Architecture ICS 233 @ Dr A R Naseer 2 ICS 233 ICS 233 Computer Architecture & Computer Architecture & Assembly Language Assembly Language Lecture 6 Lecture 6
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Lecture Slides on Computer Architecture ICS 233 @ Dr A R Naseer 3 Lecture Outline ± MIPS Shift Instructions ± MIPS Multiply & Divide Instructions ± MIPS Data Transfer Instructions Lecture Slides on Computer Architecture ICS 233 @ Dr A R Naseer 4 Shift Operations Shifting is to move all the bits in a register left or right Shifts by a constant amount: sll, srl, sra sll/srl mean shift left/right logical by a constant amount The 5-bit shift amount field is used by these instructions sra means shift right arithmetic by a constant amount The sign-bit (rather than 0) is shifted from the left shift-in 0 . . . shift-out MSB sll 32-bit register . . . shift-in 0 shift-out LSB srl . . . shift-in sign-bit shift-out LSB sra
Background image of page 2
3 Lecture Slides on Computer Architecture ICS 233 @ Dr A R Naseer 5 $s1 = 0x0000abcd $s1 = 0xcd123400 Shift Instructions f = 7 sa = 0 rd = $s1 rt = $s2 rs = $s3 op = 0 $s1 = $s2 >> $s3 srav $s1,$s2,$s3 f = 6 sa = 0 rd = $s1 rt = $s2 rs = $s3 op = 0 $s1 = $s2>>>$s3 srlv $s1,$s2,$s3 f = 4 f = 3 f = 2 f = 0 sa = 0 sa = 10 sa = 10 sa = 10 rd = $s1 rd = $s1 rd = $s1 rd = $s1 rt = $s2 rt = $s2 rt = $s2 rt = $s2 rs = $s3 rs = 0 rs = 0 rs = 0 op = 0 $s1 = $s2 << $s3 sllv $s1,$s2,$s3 op = 0 $s1 = $s2 >> 10 sra $s1, $s2, 10 op = 0 $s1 = $s2>>>10 srl $s1,$s2,10 op = 0 $s1 = $s2 << 10 sll $s1,$s2,10 R-Type Format Meaning Instruction Shifts by a variable
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.

Page1 / 8

ICS233_Lecture6 Slides - Computer Architecture &amp;...

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