Unit 17 Flashcards

1
Q

lw R₁, Kd(R₂)
What does the above do?

A

The value from word adress (Kd + R₂) is updated into register R₁
note: Kd = sx(⃗ b)
R1 := !W [!R2 + sx(⃗ b)]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

sw R₁, Kd(R₂)
What does the above do?

A

The value from register R₁ is updated into main memory of adress Kd + R₂
note: Kd = sx(⃗ b)
W [!R2 + sx(⃗ b)] := !R1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How is each machine instruction stored?
How is Kd stored in the instruction?
What type of BInary is Kd?

A

Each machine isntruction is storteds as a 32 bit binary number
The denary number Kd is stored as the rightmost 16 bits
Kd is stored as sighned binary as it can be negative

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the three formats a 32 bit mahcine instruction can belong to?

A

R,I and J

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Give an example of an R-format example?

A

name R1, R2, R3 such as add $t0, $s1, $s2, and sub, and, . . .

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A R-format instruction is 32 bits long but it vcan be broken down into the following sections:
6bits
5bits
5bits
5bits
5bits
6bits
Name each of the sections and use registers R₁,R₂,R₃?

A

6bits : Opcode (op) always 6 zeros
5bits: rs (R₂)
5bits:rt (R₃)
5bits:rd (R₁)
5bits: shamt (don’t need to study)
6bits: funct (function) #specifies waht functiuon we want the ALU to perform

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Give an example of an I-format example?

A

name R1, R2, Kd (Kd= denary number)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A I-format instruction is 32 bits long but it vcan be broken down into the following sections:
6bits
5bits
5bits
16bits
Name each of the sections and use registers R₁,R₂?

A

6bits : Opcode (op) #stores instructions for the ALU for example addi
5bits: rs (R₂)
5bits:rt (R₃)
16bits:address (⃗b)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly