Pre-study- Instruction sets, Addressing Modes Flashcards

1
Q

An ISA is defined as the design of a computer from the ___________ Perspective.

A

Programmer’s

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

ISA include 3 types of MIPS instructions

A

Arithmetic/ Logic Instructions

Data Transfer Instructions

Branch and Jump Instructions

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

ISA instruction - Arithmetic/ Logic Instructions

A

These Instructions perform various Arithmetic & Logical operations on one or more operands.

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

ISA instruction - Data Transfer Instructions

A

These instructions are responsible for the transfer of instructions from memory to the processor registers and vice versa.

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

ISA instruction - Branch and Jump Instructions

A

These instructions are responsible for breaking the sequential flow of instructions and jumping to instructions at various other locations, this is necessary for the implementation of functions and conditional statements.

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

The ISA defines the maximum length of each type of ________.
Since the MIPS is a 32 bit ISA, each instruction must be accommodated within 32 bits.

A

instruction

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

The ISA defines the Instruction Format of each type of instruction.
The Instruction Format determines how the entire instruction is encoded within 32 bits
There are 3 types of Instruction Formats in the MIPS ISA:

A

R-Instruction Format
I-Instruction Format
J-Instruction Format

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

Binary _____ is false / OFF

A

Zero ( 0 )

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

Binary ____ is true / ON

A

One ( 1 )

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

8 bits equals _____ byte

A

One

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

Binary is a _____ number system: counting done by a computer.

A

mathematics

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

Addressing modes in computer architecture techniques are used to accommodate the following provisions:

A

It provides programming versatility to the user by including pointers to the memory, indexing of data, counters for loop control, and program relocation.

It reduces the number of bits in the addressing field of the instruction.

It also provides flexibility to the assembly language programmer in writing more efficient programs concerning the number of instructions and execution time.

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

The _______ _______ refers to how the operand of an instruction is specified. It specifies a rule for interpreting/modifying the address field of the instruction before referencing the operand.

A

Addressing mode

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

The control unit is designed to go through an instruction cycle divided into three major phases:

______ the instruction from memory:
Program Counter (PC) is one of the registers present in the system that keeps track of the program’s instructions stored in the memory. It holds the address of the next instruction to be executed and is incremented every time an instruction is fetched from memory.

_______ the instruction:
It determines the operation to be performed: the operands’ location and the instruction’s addressing mode. Further, the computer executes the instruction and returns to step 1 (fetching the instruction from memory) to fetch the next instruction in the sequence.

______ the instruction:
The addressing mode of the instruction is specified with a unique binary code that designates both the operation and the mode of the instruction. Instructions can be defined with a variety of addressing modes. Combining two or more addressing modes in one instruction is also possible.

A

Fetch
Decode
Execute

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

type of addressing mode:

_______ / ______ _____ _____

The operands are implicitly specified in the instruction’s definition.
Consider the example, the instruction “complement accumulator” is an implied-mode instruction as the operand in the accumulator register is implied in the instruction definition. All register reference the instructions that use an accumulator are implied-mode instructions. Zero-address instructions in a stack-organized computer are also implied-mode instructions because the operands are implied to be on top of the stack.

A

Implied/ Implicit Addressing Mode

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

type of addressing mode:

_________ ____________ _______

The operand is defined in the instruction itself. This mode instruction has an operand field instead of an address field. The operand field contains the actual operand used with the specified operation in the instruction. The immediate-mode instructions help initialize registers to a constant value.

            Instruction
   Opcode   |    Operand

ADD 8 will increment the value stored in the accumulator by 8.

A

Immediate Addressing Mode

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

type of addressing mode:

_______ ________ ____________ _______

The operands that reside within the CPU are stored in the registers. The specific register is selected from a register field in the instruction. No reference to the memory is required to fetch the operand. The only difference between the Direct addressing mode and the register direct addressing mode is that the instruction address field refers to a CPU register instead of the main memory.

  Instruction                             Register:
Opcode  |  R        -------->   |   Operand

Advantage: This mode provides faster memory access to the operands.
Disadvantage: It has limited address space, and using multiple registers can help boost the performance, but it complicates the instructions.

A

Register Direct Addressing Mode

18
Q

type of addressing mode:

________ _________ ________ ______

The instruction defines a register in the CPU that stores the effective address of the operand in memory. Only one reference to the memory is required to fetch the operand. The specified register contains the address of the operand instead of the operand. The only difference between the Indirect addressing mode and the register indirect addressing mode is that the instruction address field refers to a CPU register.

                               [    ]                  [  ] [ Opcode | R ]  --->  [ EA  ] ----        [   ]
                              [     ]       |->     [ Operand]
                               [    ]                 [    ]
                          Reg Set              Memory

For example: ADD R1, R2: Here, the content of R2 is added to R1. R1 R2 represents registers.
Advantage: The instruction address field uses fewer bits to select a register than required to specify a memory address directly.

A

Register Indirect Addressing Mode

19
Q

type of addressing mode:

_____-_____ ________ ______

This mode is a special Register Indirect Addressing Mode case. The register is incremented/decremented after or before its value is utilized.
EA = content of the register.

The content of the register is increment automatically by step size ‘d’ after accessing the operand, where the step size ‘d’ depends on the size of the accessed operand. Only one reference memory is required to fetch the operand.

A

Auto-Increment Addressing Mode

20
Q

type of addressing mode:

_____-______ _________ ______

This mode is also a special Register Indirect Addressing Mode case.
EA = content of the register - step size.

The content of the register is decremented by step size ‘d’ after accessing the operand, where the step size ‘d’ depends on the size of the accessed operand. Only one reference memory is required to fetch the operand.

A

Auto-Decrement Addressing Mode

21
Q

type of addressing mode:

______ ______ _______

The effective address of the operand resides in the address field of the instruction.
The operand resides in the memory, and the address field of the instruction gives its address. Only one reference to the memory is required to fetch the operand, and no additional calculations need to be done to find the effective address of the operand. It is also known as absolute addressing mode.

For example, ADD X will increment the value stored in the accumulator by the value stored at X’s memory.

A

Direct Addressing Mode

22
Q

type of addressing mode:

______ _______ _______

The address field of the instruction gives the address of the memory location that contains the effective address of the operand. Two references to the memory are required to fetch the operand: The control fetches the instruction from memory and uses its address part to reaccess the memory that stores the effective address. This addressing mode slows down the execution as it requires multiple memory lookups to find the operand.

  instruction   [   I   ][  Opcode  ][ Operand ]

[ I ] is the mode bit

A

Indirect Addressing Mode

23
Q

type of addressing mode:

______ _____ ______

The indexed register content is added to the instruction’s address part to obtain the effective address of the operand.

EA = A + (R)
Here, the address field holds two values, A: Base value R: displacement value.

A

Displacement Addressing Mode

24
Q

type of addressing mode:

______ ______ ______

This mode is another version of the displacement address mode. The program counter’s content is added to the instruction’s address part to obtain the effective address.

EA = A + (PC)
Here, EA: Effective address, PC: program counter.

The instruction’s address part is usually a signed number that can be positive or negative. After the instruction’s address is fetched, the value of the program counter increases immediately, irrespective of whether the fetched instruction has been executed or not. PC: It contains the address of the next instruction to be executed.

A

Relative Addressing Mode

25
Q

type of addressing mode:

_____ ______ ______

The index register’s content is added to the instruction’s address to obtain the effective address.
EA = content of index register + Instruction address part

A

Indexed Addressing Mode

26
Q

type of addressing mode:

_____ _____ _____ ______

This mode is another version of the displacement address mode. To obtain the effective address, the base register’s content is added to the instruction’s address.
EA = A + (R)
A: Displacement, R: Pointer to the base address.

A

Base Register Addressing Mode

27
Q

type of addressing mode:

______ ______ ______

The operand resides at the top of the stack. Consider an example, ADD: This instruction will POP two items from the stack, add them, and at last, will PUSH the result to memory references of Addressing Modes.
It helps in reducing the number of bits in the instruction’s addressing field.
It facilitates pointers, indexing of data, and counters for loop controls.

A

Stack Addressing Mode

28
Q

_______ Addressing Mode: It initialize the register to a constant value.

A

Immediate

29
Q

______ Addressing Modes and _____ ______ Addressing Mode: It helps access static data and implement variables.

A

Direct
Register Direct

30
Q

______ Addressing Modes and ______ ______ Addressing Mode: It helps implement pointers and pass arrays as parameters.

A

Indirect
Register Indirect

31
Q

_______ Addressing Mode: It helps in program relocation at runtime. And in changing the sequence of instructions during execution.

A

Relative

32
Q

______ Register Addressing Mode: It helps in writing relocatable code and handling recursive procedures.

A

Base

33
Q

_____ Addressing Mode: It helps in the array and record implementation.

A

Index

34
Q

_____-______ Addressing Mode and Auto-Decrement Addressing Mode: It helps implements loops and stacks.

A

Auto-Increment

35
Q

Advantages of addressing modes

A

They improve performance by efficiently utilizing the CPU cache and reducing the memory read latency

Addressing Modes are used for implementing complex data structures in memory as they provide mechanisms such as indexing

Program sizes can be reduced drastically as the code can be compacted which allows faster execution of instructions

Addressing modes give you the flexibility to use different ways of specifying the address of operands in your instructions

36
Q

Disadvantages of Addressing Modes

A

Complexity: Particularly for inexperienced programmers, some addressing modes might be challenging to comprehend and use. Due to its intricacy, code may include errors or be inefficient

Limited Flexibility: Some addressing modes may limit the kind of operand operations that can be carried out. For instance, Immediate Mode restricts dynamic calculations to preset values only

Increased Memory Access: Because Direct and Indirect modes need more memory accesses to retrieve operands, program performance may be slowed down

Register Dependency: The availability of registers is very important for register modes. This can cause conflicts and inefficient resource utilization in systems with a finite number of registers

Code Size: Certain addressing modes could provide longer and more complicated instructions, increasing the code size

37
Q

What are addressing modes in computer architecture?

The operation field of instruction in a computer specifies the operation to be performed. The Addressing mode refers to how the operand of an instruction is specified.

A

It specifies a rule for interpreting/modifying the address field of the instruction before referencing the operand.

38
Q

Why addressing mode is used?

The Addressing mode refers to how the operand of an instruction is specified. We can specify how an operand’s effective address is represented in any particular instruction by using the addressing modes.

A

There is only one memory reference needed and no additional computation.

39
Q

What are the 5 addressing modes?

A

The addressing mode include Register Mode, which places the operand in a register, Immediate Mode, which places a constant value in the instruction, Direct Mode, which places the operand address in the instruction, Indirect Mode, which places the address in a register, and Indexed Mode, which determines the address using the base register and offset.

40
Q

What are addressing modes and its types?

A

Computer architecture’s addressing modes control how a processor accesses information in memory while carrying out an instruction. The five main types are Indexed Mode, Register Mode, Immediate Mode, Direct Mode, and Indirect Mode.