Machine Instructions and Addressing Modes MCQ Quiz - Objective Question with Answer for Machine Instructions and Addressing Modes - Download Free PDF
Last updated on Mar 25, 2025
Latest Machine Instructions and Addressing Modes MCQ Objective Questions
Machine Instructions and Addressing Modes Question 1:
The addressing mode/s, which uses the PC instead of a general-purpose register is :
Answer (Detailed Solution Below)
Machine Instructions and Addressing Modes Question 1 Detailed Solution
The correct answer is Relative.
Key Points
- In computer architecture, the relative addressing mode uses the Program Counter (PC) instead of a general-purpose register to determine the address of the next instruction.
- This mode calculates the effective address by adding a constant value (offset) to the current value of the PC.
- It is commonly used in branch instructions where the target address is specified relative to the current instruction location.
- The relative addressing mode helps in writing position-independent code, which is useful for creating relocatable object files.
Additional Information
- Relative addressing mode is often used in loop control and conditional branch instructions.
- It simplifies code generation in assemblers and compilers by allowing more flexible code placement.
- It can enhance program security by making it more challenging for malicious actors to predict exact memory addresses.
- Examples of assembly instructions using relative addressing include conditional jumps like JZ (Jump if Zero), JNZ (Jump if Not Zero), etc.
Machine Instructions and Addressing Modes Question 2:
Which of the following is not a characteristics of a computer?
Answer (Detailed Solution Below)
Machine Instructions and Addressing Modes Question 2 Detailed Solution
Key Points
- Computers do not possess I.Q. as they cannot think or reason on their own.
- They follow instructions given by humans and do not have the ability to learn or make decisions independently.
- I.Q. (Intelligence Quotient) is a measure of human intelligence, not applicable to machines.
- Computers operate based on pre-programmed algorithms and do not possess cognitive abilities like humans.
Important Points
- Versatility: Computers can perform a wide range of tasks, from complex calculations to word processing, making them highly versatile tools.
- Accuracy: Computers are known for their high level of accuracy, which is crucial in tasks requiring precise calculations and data processing.
- Diligence: Computers can work continuously without getting tired or making errors, ensuring consistent performance over long periods.
Machine Instructions and Addressing Modes Question 3:
A register organized to allow left or right operations is called
Answer (Detailed Solution Below)
Machine Instructions and Addressing Modes Question 3 Detailed Solution
The correct answer is Shift register.
Key Points
- A shift register is a type of register in digital circuits that is used to store data and shift it either to the left or to the right.
- It can be used for data manipulation, data storage, and data transfer purposes in digital systems.
- Shift registers are commonly used in applications such as serial to parallel conversion, parallel to serial conversion, and as delay elements.
- They consist of a series of flip-flops connected in sequence, where the output of one flip-flop is the input to the next flip-flop.
Additional Information
- Counter
- A counter is a digital circuit that counts the number of occurrences of a particular event.
- Counters are commonly used in digital clocks, frequency counters, and other applications where counting is required.
- They can be designed to count up, count down, or count in a specific sequence.
- Counters are typically implemented using flip-flops and combinational logic circuits.
- Loader
- A loader is a program that loads machine code into the memory of a computer.
- It is responsible for loading executable files into memory and preparing them for execution.
- The loader is a part of the operating system and is involved in the process of starting a program.
- It performs tasks such as allocating memory, setting up stack and heap, and resolving symbolic references.
- Adder
- An adder is a digital circuit that performs addition of binary numbers.
- Adders are fundamental components in arithmetic logic units (ALUs) and are used in various arithmetic operations.
- There are different types of adders such as half adders, full adders, and carry-lookahead adders.
- They are used in computers, calculators, and other digital systems that require arithmetic operations.
- Shift Register
- A shift register is a digital circuit that can shift the data stored in its flip-flops either to the left or to the right.
- It is used for temporary data storage, data transfer, and data manipulation purposes.
- Shift registers are commonly used in digital systems for tasks such as serial to parallel conversion and vice versa.
- They consist of a series of flip-flops connected in sequence, where each flip-flop stores one bit of data.
Machine Instructions and Addressing Modes Question 4:
In which of the following addressing modes the operand immediately follows the op-code?
Answer (Detailed Solution Below)
Machine Instructions and Addressing Modes Question 4 Detailed Solution
The correct answer is Immediate.
Key Points
- Immediate Addressing Mode: In this addressing mode, the operand is specified directly in the instruction itself. This means the operand immediately follows the op-code in the instruction. For example, in an assembly instruction like
ADD #5
, the value5
is the operand and is directly included in the instruction.
Additional Information
- Based Addressing Mode: This mode uses a base register to determine the effective address of the operand. The operand’s address is obtained by adding a constant value to the contents of the base register.
- Direct Addressing Mode: In this mode, the effective address of the operand is given directly by the address field of the instruction. For example, if the instruction contains the address
1000
, the operand is located in memory at address1000
. - Indexed Addressing Mode: This mode uses an index register to modify the address field of the instruction. The effective address of the operand is obtained by adding the contents of the index register to the address part of the instruction.
Machine Instructions and Addressing Modes Question 5:
In instruction, the operation is specified by a binary code, known as the __________.
Answer (Detailed Solution Below)
Machine Instructions and Addressing Modes Question 5 Detailed Solution
Each instruction must contain the information required by the processor for execution.
Operation code: Specifies the operation to be performed (e.g., ADD, I/O). The operation is specified by a binary code, known as the operation code, or opcode.Top Machine Instructions and Addressing Modes MCQ Objective Questions
What is the Von Neumann architecture?
Answer (Detailed Solution Below)
Machine Instructions and Addressing Modes Question 6 Detailed Solution
Download Solution PDFThe correct answer is SSID.
Concept:
SISD:
- SISD stands for single instruction, single data
- SISD is a uniprocessor machine capable of executing a single instruction, which operates on a single data stream.
- Von Neumann computer architecture is SISD
SIMD:
- SIMD stands for Single Instruction, Multiple data
- A single operation executes simultaneously on multiple elements of data.
MIMD:
- MIMD stands for multiple instructions, multiple data
- Separate instruction streams, each with its own flow of control, operate on separate data.
MISD:
- MISD stands for multiple instructions, single data
- In MISD many functional units perform different operations on the same data.
So option 1 is the correct answer.
Answer (Detailed Solution Below)
Machine Instructions and Addressing Modes Question 7 Detailed Solution
Download Solution PDFConcept:
RISC (reduced instruction set computer) is a microprocessor that is designed to perform smaller number of instructions so that it can operate faster. RISC instruction sets are simple. RISC instruction takes only one clock cycle per instruction to execute.
Explanation:
RISC is implemented using hardwire control unit. RISC uses registers instead of memory. Registers are small in size and are on the same chip on which ALU and control unit are present. RISC architecture is shown below.
Feature of RISC processor are:
- RISC instruction set are simple and of fix size.
- Fewer instructions in RISC.
- High performance
- Simple addressing modes
- Large number of registers.
- Instruction come under size of one word.
Which of the following acts as a temporary storage location to hold an intermediate result in mathematical and logical calculations?
Answer (Detailed Solution Below)
Machine Instructions and Addressing Modes Question 8 Detailed Solution
Download Solution PDFAccumulator:
- An accumulator acts as a temporary storage location to hold an intermediate result in mathematical and logical calculations.
- Accumulator is a type of register present in a CPU (Central Processing Unit).
- It works as a temporary storage location that keeps an intermediate value in logical and mathematical calculations.
- Intermediate results of execution are progressively stored to the accumulator, replacing the previous value.
Instruction Register:
- An IR (Instruction Register) saves machine instruction that is currently under execution. It is a register that sits at the top of the memory hierarchy.
- A variety of registers fulfils different operations in a central processing unit (CPU) – the function of the IR is to keep that currently stacked instruction for use.
Program counter:
- A PC (program counter) is a CPU register which has the address stored for the next instruction to be processed from memory.
- It is a digital counter required for quicker execution of tasks as well as to keep track of the current execution point.
Memory Address Register:
- The MAR (Memory Address Register) is the register in the control unit that holds the address of a register to receive or store from or to the storage.
- The Memory Address Register is half of an interaction between a microprogram and storage.
A micro programmed control unit
Answer (Detailed Solution Below)
Machine Instructions and Addressing Modes Question 9 Detailed Solution
Download Solution PDFDifference between Microprogrammed Control Unit and Hardwired Control Unit
Microprogrammed Control Unit |
Hardwired Control Unit |
It is implemented by programming |
It is a circuitry approach |
CISC style instructions |
RISC style instructions |
Modifications are easy as it will require the change in the code section only. |
Modification is difficult as the control unit is hardwired |
It works well for complex instructions also |
It works well for simple instructions |
Implementing microprograms is not costly |
Implementing hardwired structure is costly |
Slower execution |
Faster execution |
Therefore, a micro programmed control unit facilitates easy implementation of a new instruction
A register capable of shifting its binary information either to the right or the left is called a _______.
Answer (Detailed Solution Below)
Machine Instructions and Addressing Modes Question 10 Detailed Solution
Download Solution PDFThe correct option is (3)
Concept:-
A register capable of shifting its binary information either to the right or the left is called a shift register.
Key Points
- A unidirectional shift register is one that allows data to be shifted just in one way, whereas a bidirectional shift register allows data to be shifted in both directions.
- In calculators, computers, and data processing systems, a shift register is a digital memory circuit.
- Numerous flip-flops are required to store multiple bits of information. The register is a collection of flip-flops that are used to hold and save binary data.
Additional InformationParallel register:- A parallel-load register is one in which all of the register's bit values are loaded at the same time.
Serial register:- Serial In Serial Out (SISO) shift registers are shift registers that operate in the serial mode for both data loading and data retrieval to and from the shift register.
Storage register:- A register in a digital computer's main internal memory that stores one computer word. Also referred to as a memory register.
The technology that stores only the essential instructions on a microprocessor chip and thus enhances its speed is referred to as:
Answer (Detailed Solution Below)
Machine Instructions and Addressing Modes Question 11 Detailed Solution
Download Solution PDFConcept:
RISC stands for reduced instruction set computing, which means processing the information using the microprocessors that execute the simplest instructions or fewer instructions in a small amount of time.
Explanation:
In most RISC processors, hardwired control is found. RISC architecture uses separate instruction and data caches and different access paths. Some points about the RISC processor are :
- Simple instructions taking one cycle.
- Instructions are executed by hardware.
- Fixed format for the instructions.
- Stores only essential instructions and enhances the speed.
- Few addressing modes.
- Highly pipelined and multiple register sets.
Diagram :
A CPU has 12 registers and uses 6 addressing modes. RAM is 64K × 32. What is the maximum size of the op-code field if the instruction has a register operand and a memory address operand?
Answer (Detailed Solution Below)
Machine Instructions and Addressing Modes Question 12 Detailed Solution
Download Solution PDFData:
number of registers = 12
addessing mode = 6
RAM size =64K × 32 = 216 × 25
Formula:
Memory Capacity is of the form = 2m × 2n
Address lines required = m
Instrcution size = Data Lines = 2n
number of bits = ⌈log2 n⌉
number of register or number addressing modes
Calculation:
Instrcution size = Data Lines = 32
Address lines required = 16 bits
number of bits for a addressing mode = ⌈log2 6⌉ = 3
number of bits for a register field = ⌈log2 12⌉ = 4
Addressing Mode |
op-code field |
Register |
Memory Address field |
3 bits |
x bits |
4 bits |
16 bits |
3 + x + 4 + 16 = 32
∴ x = 9
op-code field = 9 bits
In X = (M + N × O) / (P × Q), how many one-address instructions are required to evaluate it?
Answer (Detailed Solution Below)
Machine Instructions and Addressing Modes Question 13 Detailed Solution
Download Solution PDFThe correct answer is "option 3".
CONCEPT:
To obtain operand value from memory, the address field of an instruction is used by the CPU.
In single address instruction, one of the operands is stored in the accumulator & the other operand may be either in register or memory.
EXPLANATION:
All the operations will be performed in the Accumulator register(AC).
The load operation is used to fetch the value from register or memory to accumulator.
The store operation is used to store the value from the accumulator to register or memory.
The one address instructions for the given equations are:
Load/Store/Operation |
One-address Instruction |
LOAD N | AC ← M[N] |
MUL O | AC ← AC × M[O] |
ADD M | AC ← AC + M[M] |
STORE T | M[T] ← AC |
LOAD P |
AC ← M[P] |
MUL Q |
AC ← AC × M[Q] |
DIV T |
AC ← AC/ M[T] |
STORE X |
M[X] ← AC |
Hence, the correct answer is "option 3".
The following language uses mnemonic OP codes
Answer (Detailed Solution Below)
Machine Instructions and Addressing Modes Question 14 Detailed Solution
Download Solution PDFIn assembly language mnemonics are used to represent operation codes.
Opcodes (operation codes) are represented by abbreviations, called mnemonics that indicate the operation.
Mnemonic codes:
- Mnemonic codes are the codes that can be remembered comparatively easily and that aids its user in recalling the information it represents.
- Mnemonics codes are widely used in computer programming and communication system operations to specify instructions.
Examples:
ADD Add
SUB Subtract
MUL Multiply
DIV Divide
LOAD Load data from memory
STOR Store data to memory
Assembly language: It is a low-level programming language that uses symbols, variables, and functions that work directly with CPU.
High-level language: It is a human-friendly language that uses variables and functions, independent of the computer architecture.
Assembly language |
High-level language |
Programs written for one processor will not run on other types of processors. |
The program runs independently on process type. |
Performance and accuracy are better than high-level lang. |
Performance & accuracy are lesser. |
Executable code is less than high-level lang., takes less time to execute & program runs faster |
Executable code is larger, takes a long time to execute. |
Eg.: ARM, MIPS |
Eg.: C, C++, JavaScript |
A processor has 64 registers and uses 16-bit instruction format. It has two types of instructions: I-type and R-type. Each I-type instruction contains an opcode, a register name, and a 4-bit immediate value. Each R-type instruction contains an opcode and two register names. If there are 8 distinct I-type opcodes, then the maximum number of distinct R-type opcodes is ______.
Answer (Detailed Solution Below) 14
Machine Instructions and Addressing Modes Question 15 Detailed Solution
Download Solution PDFData:
Instruction length = 16 bits
Number of registers = 64
Bits to represent register = ⌈ log2 (64) ⌉ = 6
Explanation
I-type instruction format:
Opcode |
Register 6 bits |
Immediate Value 4 bits |
R-type instruction format =
Opcode |
Register 6 bits |
Register 6 bits |
Instruction length is given 16, therefore maximum possible encodings = 216
Number of I-type opcodes = 8
I-type Instructions encoding + R-type instructions encoding = Total instructions
Assume the number of R-type opcodes = x
Therefore,
(8 × 26 × 24) + (x × 26 × 26) = 216
÷ b 212 on both side
∴ 2 + x = 24
∴ x = 14.