Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Architecture & Operations I

Similar presentations


Presentation on theme: "Computer Architecture & Operations I"— Presentation transcript:

1 Computer Architecture & Operations I
Instructor: Ryan Florin

2 Representing Instructions
The University of Adelaide, School of Computer Science 21 September 2018 Representing Instructions Instructions are encoded in binary Called machine code MIPS instructions Encoded as 32-bit instruction words Small number of formats encoding operation code (opcode), register numbers, … Regularity! Register numbers $t0 – $t7 are reg’s 8 – 15 $t8 – $t9 are reg’s 24 – 25 $s0 – $s7 are reg’s 16 – 23 §2.5 Representing Instructions in the Computer Chapter 2 — Instructions: Language of the Computer

3 The University of Adelaide, School of Computer Science
21 September 2018 Mini Green Sheet MIPS instructions R: I: Register numbers $t0 – $t7 : 8 – 15, $t8 – $t9 : 24 – 25 $s0 – $s7 : 16 – 23, $zero : 0 op rs rt rd shamt funct 6 bits 5 bits op rs rt constant or address 6 bits 5 bits 16 bits Chapter 2 — Instructions: Language of the Computer

4 What does this do? add $s1 $zero $zero lw $s0 4($s2) add $s1 $s1 $s0
sw $s1 0($s2)

5 Practice Write the following in MIPS $t0 = $t1 + 48
$s0 = $t1 + $t2 + $t3 $s0 = ($t1 + $t2) * 16

6 Convert into MIPS Are these R type or I type? 2231 0080 8e50 0008
ae

7 The University of Adelaide, School of Computer Science
21 September 2018 Convert into MIPS MIPS instructions R: I: How to tell the difference between R type and I type? Look at the Green sheet to spot the difference. op rs rt rd shamt funct 6 bits 5 bits op rs rt constant or address 6 bits 5 bits 16 bits Chapter 2 — Instructions: Language of the Computer

8 What to do Review Chapter 2 Start the homework!


Download ppt "Computer Architecture & Operations I"

Similar presentations


Ads by Google