Presentation is loading. Please wait.

Presentation is loading. Please wait.

Instructions: Language of the Machine

Similar presentations


Presentation on theme: "Instructions: Language of the Machine"— Presentation transcript:

1 Instructions: Language of the Machine
习题课(三) Instructions: Language of the Machine Summit Lee

2 Instruction Set Design MIPS Instruction Set Architecture
指令系统设计的基本问题 基本操作,操作数,指令格式…… 成本,性能,实际需求…… 概貌 指令系统的基本结构 具体的实现 MIPS指令系统体系结构

3 Instruction Set Architecture

4 Instruction Set Design MIPS Instruction Set Architecture
指令系统设计的基本问题 基本操作,操作数,指令格式…… 成本,性能,实际需求…… 概貌 指令系统的基本结构 具体的实现 MIPS指令系统体系结构

5 MIPS Instruction Set Architecture

6 Two Small Points A B C D Big Endian and Little Endian PC+4 in Branch
Beq $1,$2, if ($1==$2) go to PC+4+100 Reason: Instruction Fetch Calculate (PC+4) New look: If we want to go to 25 instructions then :PC(old)+4+96 Beq $1,$2, if ($1==$2) go to PC(old)+4+96 eg. 0xABCD Big Endian A B C D

7 Hints of Homework 3.5 load 32bits immediate 3.14 memory access:
Data transfer X2 Else X1 3.17 time=ins X CPI X clock cycle 3.18 3.19 instruction bytes , data bytes neg/sub , dup,reload

8 Hints of Homework(cont)
3.25 C code Comments Arithmetic: 1, n<0 ? calculate |n| 2, calculate (n%10+48) 3, calculate the length of n/10 4, output sequence:big endian


Download ppt "Instructions: Language of the Machine"

Similar presentations


Ads by Google