MCQ On Machine Instruction
Q1. Operation code field is present in.
- programming language instruction
- assembly language instruction
- machine language instruction
- none of the mentioned
Answer: c, machine language instruction
Solution: Machine language instruction format has one or more fields. The first one is the operation code field.
Q2. A machine language instruction format consists of.
- Operand field
- Operation code field
- Operation code field & operand field
- none of the mentioned
Answer: c, Operation code field & operand field
Solution: Machine language instruction format has both the fields.
Q3. The length of the one-byte instruction is.
- 2 bytes
- 1 byte
- 3 bytes
- 4 bytes
Answer: b, 1 byte
Solution: This format is only one byte long.
Q4. The instruction format ‘register to register’ has a length of.
- 2 bytes
- 1 byte
- 3 bytes
- 4 bytes
Answer: a, 2 bytes
Solution: This format is 2 bytes long.
Q5. The R/M field in a machine instruction format specifies.
- another register
- another memory location
- other operands
- all of the mentioned
Answer: d, all of the mentioned
Solution: The LSBs (least significant bits) from 0 to 3 represent R/M field that specifies another register or memory location i.e. the other operand.
Q6. In a machine instruction format, S-bit is the.
- status bit
- sign bit
- sign extension bit
- none of the mentioned
Answer: c, sign extension bit
Solution: The S-bit known as sign extension bit is used along with W-bit to show the type of operation.
Q7. The bit which is used by the ‘REP’ instruction is.
- W-bit
- S-bit
- V-bit
- Z-bit
Answer: d, Z-bit
Solution: The Z-bit is used by the REP instruction to control the loop.
Q8. If a W-bit value is ‘1’ then the operand is of.
- 8 bits
- 4 bits
- 16 bits
- 2 bits
Answer: c, 16 bits
Solution: If W-bit is ‘1’ then the operand is of 16-bits, and if it is ‘0’ then the operand is of 8-bits.
Q9. The instructions which after execution transfer control to the next instruction in the sequence are called.
- Sequential control flow instructions
- control transfer instructions
- Sequential control flow & control transfer instructions
- none of the mentioned
Answer: a, Sequential control flow instructions
Solution: The sequential control flow instructions follow sequence order in their execution.
Q10. The instructions that transfer the control to some predefined address or the address specified in the instruction are called as.
- sequential control flow instructions
- control transfer instructions
- sequential control flow & control transfer instructions
- none of the mentioned
Answer: b, control transfer instructions
Solution: The control transfer instructions transfer control to the specified address.
Q11. The instruction “JUMP” belongs to.
- sequential control flow instructions
- control transfer instructions
- branch instructions
- control transfer & branch instructions
Answer: d, control transfer & branch instructions
Solution: The JUMP instruction transfers the control to the address located in the instruction.
Q12. An n-bit opcode field can represent up to how many distinct operations?.
- n
- 2n
- 2^n
- n^2
Answer: c, 2^n
Solution: n bits encode 2^n distinct patterns.
Q13. On a zero-address (stack) machine, arithmetic instructions:.
- Require two explicit operands
- Use no explicit operands (use top of stack)
- Use exactly one explicit operand
- Cannot perform arithmetic
Answer: b, Use no explicit operands (use top of stack)
Solution: Stack machines pop operands implicitly from the stack top.
Q14. In a load/store (RISC) architecture, arithmetic instructions typically:.
- Access memory directly
- Operate only on registers
- Use an implicit accumulator
- Require microcode
Answer: b, Operate only on registers
Solution: RISC ALU ops read/write only registers; loads/stores move data to/from memory.
Q15. A benefit of fixed-length instructions is:.
- Simpler, faster decode and pipelining
- Higher code density than variable length
- More complex hardware
- No alignment requirements
Answer: a, Simpler, faster decode and pipelining
Solution: Uniform length simplifies fetch/align/decode stages.
Q16. A 16-bit instruction with a 6-bit opcode and a 3-bit register field leaves how many bits for an immediate?.
- 5
- 7
- 8
- 9
Answer: b, 7
Solution: 16 ? 6 ? 3 = 7 bits remain for the immediate.
Q17. Which of the following is typically a privileged instruction?.
- ADD
- XOR
- Disable interrupts (CLI)
- INC
Answer: c, Disable interrupts (CLI)
Solution: Changing interrupt state or MMU requires privileged mode.
Q18. A three-address instruction can specify:.
- Up to three explicit operands (e.g., dest, src1, src2)
- At most two operands
- Only one operand
- No operands
Answer: a, Up to three explicit operands (e.g., dest, src1, src2)
Solution: Three-address format encodes destination and two sources.
Q19. A typical compare instruction (CMP R1,R2) does what?.
- Stores R1?R2 back into R1
- Computes R1?R2, sets flags, stores no result
- Adds R1 and R2 and sets flags
- Compares memory only, not registers
Answer: b, Computes R1?R2, sets flags, stores no result
Solution: CMP affects condition codes without writing a GPR.
Q20. How many bits are required to address 32 general-purpose registers?.
- 4
- 5
- 6
- 32
Answer: b, 5
Solution: 2^5 = 32, so 5 bits select one register.
Q21. Which instruction style tends to offer the highest code density in classic CISC designs?.
- Register-register only
- Register-memory
- Memory-memory
- Zero-address (stack)
Answer: c, Memory-memory
Solution: CISC memory-to-memory operations can reduce the number of separate load/store ops.
Q22. On a stack machine, to compute (A?B)×(C+D) you need how many arithmetic instructions?.
- 2
- 3
- 4
- 5
Answer: b, 3
Solution: SUB for (A?B), ADD for (C+D), MUL for the product ? 3 ops.