Machine Instruction · Computer Organization and Architecture
36 questions · asked in 19 of 27 years (2000–2026)
MCQ 27 · MSQ 1 · NAT 81-mark 22 · 2-mark 14
2000Questions per year2026
Questions 11–15 of 36
Consider the following processor design characteristics.
I. Register-to-register arithmetic operations only
II. Fixed-length instruction format
III. Hardwired control unit
Which of the characteristics above are used in the design of a RISC processor?
I. Register-to-register arithmetic operations only
II. Fixed-length instruction format
III. Hardwired control unit
Which of the characteristics above are used in the design of a RISC processor?
Answer: (D)
A RISC processor follows a load/store design, so arithmetic works only between registers. Its instructions have a fixed length, which makes decoding easy. It also uses a fast hardwired control unit. So all three points are true.
Answer: I, II and III
Answer: I, II and III
A processor has 16 integer registers (R0, R1,...,R15) and 64 floating point registers (F0, F1,...,F63). It uses a 2-byte instruction format. There are four categories of instructions: Type-1, Type-2, Type-3, and Type-4. Type-1 category consists of four instructions, each with 3 integer register operands (3Rs). Type-2 category consists of eight instructions, each with 2 floating point register operands (2Fs). Type-3 category consists of fourteen instructions, each with one integer register operand and one floating point register operand (1R+1F). Type-4 category consists of N instructions, each with a floating point register operand (1F).
The maximum value of N is __________.
The maximum value of N is __________.
Answer: 32
An integer register needs 4 bits, an FP register needs 6 bits, and the instruction is 16 bits. Use expanding opcodes:
- Type-1 (12 operand bits): opcode is 4 bits, takes 4 of 16 codes.
- Type-2 (12 bits): opcode is 4 bits, takes 8 codes 4 remain.
- Type-3 (10 bits): opcode is 6 bits: 4 4 = 16 codes, takes 14 2 remain.
- Type-4 (6 bits): opcode is 10 bits: 2 = 32.
Answer: 32
- Type-1 (12 operand bits): opcode is 4 bits, takes 4 of 16 codes.
- Type-2 (12 bits): opcode is 4 bits, takes 8 codes 4 remain.
- Type-3 (10 bits): opcode is 6 bits: 4 4 = 16 codes, takes 14 2 remain.
- Type-4 (6 bits): opcode is 10 bits: 2 = 32.
Answer: 32
A processor has 40 distinct instructions and 24 general purpose registers. A 32-bit instruction word has an opcode, two register operands and an immediate operand. The number of bits available for the immediate operand field is _______ .
Answer: 16
Let us go through each part:
- 40 instructions the opcode needs bits
- 24 registers 5 bits for each one, so two register operands take 10 bits
Bits left for the immediate field = 32 6 10 = 16 bits
Answer: 16
- 40 instructions the opcode needs bits
- 24 registers 5 bits for each one, so two register operands take 10 bits
Bits left for the immediate field = 32 6 10 = 16 bits
Answer: 16
Consider a processor with 64 registers and an instruction set of size twelve. Each instruction has five distinct fields, namely, opcode, two source register identifiers, one destination register identifier, and a twelve-bit immediate value. Each instruction must be stored in memory in byte-aligned fashion. If a program has 100 instructions, the amount of memory(in bytes) consumed by the program text is _____ .
Answer: 500
Let us go through each field:
- Opcode: 12 instructions 4 bits
- Three register fields: 64 registers 6 bits each, so 18 bits in all
- Immediate value: 12 bits
Sum = 34 bits with byte alignment, 5 bytes for each instruction. For 100 instructions: 100 5 = 500 bytes.
Answer: 500
- Opcode: 12 instructions 4 bits
- Three register fields: 64 registers 6 bits each, so 18 bits in all
- Immediate value: 12 bits
Sum = 34 bits with byte alignment, 5 bytes for each instruction. For 100 instructions: 100 5 = 500 bytes.
Answer: 500
Consider a processor with byte-addressable memory. Assume that all registers, including Program Counter (PC) and Program Status Word (PSW), are of size 2 bytes. A stack in the main memory is implemented from memory location and it grows upward. The stack pointer (SP) points to the top element of the stack. The current value of SP is . The CALL instruction is of two words, the first word is the op-code and the second word is the starting address of the subroutine (one word = 2 bytes). The CALL instruction is implemented as follows:
Store the current value of PC in the stack
Store the value of PSW register in the stack
Load the starting address of the subroutine in PC
The content of PC just before the fetch of a CALL instruction is . After execution of the CALL instruction, the value of the stack pointer is
Store the current value of PC in the stack
Store the value of PSW register in the stack
Load the starting address of the subroutine in PC
The content of PC just before the fetch of a CALL instruction is . After execution of the CALL instruction, the value of the stack pointer is
Answer: (D)
The stack grows upward, and SP points to the top element. So for each push, SP goes up by 2 first, and then the value is stored.
- Push PC: SP = 016E + 2 = 0170
- Push PSW: SP = 0170 + 2 = 0172
Answer:
- Push PC: SP = 016E + 2 = 0170
- Push PSW: SP = 0170 + 2 = 0172
Answer:
Keep practising