Chapter 3: Instructions: Machine Code Flashcards

1
Q

What can instructions be broken down into?

A

Can be broken down into fields:

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

What is the opcode

A

what to do

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

What do modifiers do?

A

Perform minor changes to the operation

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

What do operands do?

A

What to do with the data.

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

How do MIPS instructions work?

A

For example, instructions in the 32-bit MIPS architecture usually have a structure that conforms to the following three types: R, I and J.

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

MIPS: rs, rt?

A

rs, rt, are the source registers, whilst rd is the destination register

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

MIPS: shamt?

A

shamt gives the number of bits to shift in shift operations (lit. shift amount)

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

MIPS: funct?

A

funct provides further refinement to the instruction

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

MIPS: R-type instructions?

A

R-type instructions are arithmetic-type instructions, for example the assembly code ‘ADDU rd,rs,rt’ adds the numbers stored in the two registers rs and rt and puts the result in rd.

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

MIPS: I-Type instructions?

A

I-type are instructions that use immediate or literal values. Instead of using two registers as inputs, these instructions use one register and one data value that is explicitly specified in the instruction inself. Since there is only space in the instruction for 16-bit numbers, the number must be extended to 32 bits. Therefore there are two sets of I-type instruction; one for signed and another unsigned integers.

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

MIPS: J-type instructions?

A

J-type are jump-type instructions, where the target will correspond to the instruction address that should be executed next.

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

Types of instructions for the PIC?

A

The PIC16F84A instructions can be similarly categorised, though in this case into byte-oriented, bit-oriented, literal and control-type instructions.

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

Diagram for the instruction types of the PIC?

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

PIC: Byte-type instructions

A

Byte-type include arithmetic and logical instructions where one of the inputs is the data in the file register. If another input is required, the instruction will use the accumulator, W.

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

PIC: Bit-type instructions?

A

Bit-type allows individual bits within a file register to be accessed. The bit field contains three bits in order to specify which of the 8 bits in the file register should be used.

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

PIC: Literal-type instructions?

A

Literal-type use the accumulator and the literal value specified in the instruction in arithmetic-like instructions

17
Q

PIC: Control type instructions

A

Control-type use the target field to specify a new instruction address

18
Q
A