Computer Science 210 Computer Organization - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Computer Science 210 Computer Organization

Description:

16 bit address offset. Opcode first destination address offset. register register. 32 ... Opcode address offset. j endif # endif = 45 ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 16
Provided by: tomwh
Category:

less

Transcript and Presenter's Notes

Title: Computer Science 210 Computer Organization


1
Computer Science 210Computer Organization
  • Translating from Assembly Language
  • To Machine Code

2
Translating Instructions
  • Each instruction translates to a 32-bit word in
    memory
  • The operator and operands are translated to bit
    strings and assigned to spots in the memory word
    according to the instructions format type

3
Instruction Formats
  • R-type for arithmetic operations with registers
  • I-type for data transfer operations and
    conditional branches
  • J-type for unconditional branching operations

4
R-Type Format
add t0, s1, s2
5
R-Type Format
add t0, s1, s2
0
17
18
8
0
32
6
R-Type Format
add t0, s1, s2
0
17
18
8
0
32
000000
10001
10010
01000
00000
100000
7
R-Type Format
add t0, s1, s2
0
17
18
8
0
32
000000
10001
10010
01000
00000
100000
op
rs
rt
rd
shamt
funct
Opcode first second
destination shift function
register register register
amount code
8
I-Type Format
lw t0, 32(s3) t0 A8
9
I-Type Format
lw t0, 32(s3) t0 A8
35
19
8
32
10
I-Type Format
lw t0, 32(s3) t0 A8
35
19
8
32
100011
10011
01000
0000000000100000
11
I-Type Format
lw t0, 32(s3) t0 A8
35
19
8
32
100011
10011
01000
0000000000100000
op
rs
rt
16 bit address offset
Opcode first destination
address offset
register register
12
J-Type Format
j endif endif 45
13
J-Type Format
j endif endif 45
2
45
14
J-Type Format
j endif endif 45
2
45
000010
00000000000000000000101101
15
J-Type Format
j endif endif 45
2
45
000010
00000000000000000000101101
op
26 bit address offset
Opcode
address offset
Write a Comment
User Comments (0)
About PowerShow.com