Part 2 - Topic 1 - MIPS Architecture Flashcards

1
Q

What does MIPS stand for?

A

Microprocessor without Interlocked Pipelined Stages

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

What is this in MIPS assembly code?

a = b + c

A

add a, b, c

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

What is the answer of this C expression in MIPS assembly code?

A

add t, b, c #t = b + c

sub a, t, d #a = t - d

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

What is lw?

Load a word ( = 4 bytes) of data at memory address 4 into $s3.

A

lw = load word

use 2 register operands and a constant

lw $s3, 4($0)

reads word at address 4 into $s3

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

If opcode is 0 what does that mean?

A

That it is a R-type instruction and function bits tell operation.

Otherwise opcode tells operation

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

MIPS: 32 × 32 multiplication

result and registers used

A

64 bit result

{hi,lo}

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

MIPS: 32-bit division

Output and register format

A

32-bit quotient, remainder

Quotient in lo

Remainder in hi

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

Moves from lo/hi special registers

A
  • *mflo** $s2
  • *mfhi** $s3
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is this in MIPS assembly code?

A

Not ‘j done’ sends the code to ‘done:’ and prevents code from going to ‘else’ clause after ‘if’ statement completion

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

How can this be written in assembly code?

A

sll: Shift Left Logical

One shift is the equivalent to raising value to power of 2.
In this case the 1 is the shift raising the value to a power of 2.

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

What are R-type instructions?

A

and, or, add, sub, slt

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

How do you calculate PC’?

A

(sign-extended immediate << 2) + (PC+4)

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

How do you convert Imm to signImm?

A

16 bits need to be added in front of the 16 bits of Imm,

This comes to 4 zeros added in hexadecimal

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