MCQ On Opcode And Operand
Q1. Opcode indicates the operations to be performed..
- TRUE
- FALSE
Answer: a, TRUE
Solution: Every instruction has an opcode. Additionally, it may have one or more operands and the op code indicates the operation to be performed.
Q2. In instruction, the operation is specified by a binary code, known as the _____.
- system bus
- mnemonic
- opcode
- More than one of the above
Answer: c, opcode
Q3. The operation executed on data stored in registers is called.
- Macro-operation
- Micro-operation
- Bit-operation
- Byte-operation
Answer: b, Micro-operation
Q4. Each operation has its ____________ opcode:.
- Unique
- Two
- Three
- Four
Answer: a, Unique
Q5. ____________ specify where to get the source and destination operands for the operation specified by the ____________:.
- Operand fields and opcode
- Opcode and operand
- Source and destination
- Cpu and memory
Answer: a, Operand fields and opcode
Q6. Which part of an instruction format specifies the operation to be performed?.
- Opcode
- Operand
- Addressing mode
- Register
Answer: a, Opcode
Q7. In an instruction format, what is the function of the operand field?.
- To specify the type of operation
- To provide the data or address for the operation
- To indicate the execution time
- To encode the opcode
Answer: b, To provide the data or address for the operation
Q8. What does the address field in an instruction format typically specify?.
- The immediate value
- The location of the instruction
- The location of the operand
- The type of instruction
Answer: c, The location of the operand
Q9. Which of the following is a common component of an instruction format?.
- Opcode
- Index
- Buffer
- Flag
Answer: a, Opcode
Q10. The field in an instruction format that determines how the operand is interpreted is known as:.
- Addressing mode
- Data type
- Immediate value
- Register
Answer: a, Addressing mode
Q11. In a typical instruction format, which field contains the binary code for the operation?.
- Opcode
- Address
- Operand
- Mode
Answer: a, Opcode
Q12. What is the function of the mode field in an instruction format?.
- To specify the size of the instruction
- To determine the addressing method
- To store the result of the operation
- To indicate the execution priority
Answer: b, To determine the addressing method
Q13. Which instruction format component specifies the register used in the operation?.
- Opcode
- Address
- Register field
- Immediate value
Answer: c, Register field
Q14. What does an instruction format with a variable length allow?.
- Fixed-size instruction fields
- Dynamic allocation of operands
- Uniform size for all instructions
- Faster execution times
Answer: b, Dynamic allocation of operands
Q15. In a fixed-length instruction format, each instruction is:.
- Of varying length
- Always of the same length
- Determined by the operand size
- Encoded in a variable number of bytes
Answer: b, Always of the same length
Q16. Which field in an instruction format specifies whether an operand is immediate or memory-based?.
- Opcode
- Address
- Mode
- Register
Answer: c, Mode
Q17. In which instruction format are the source and destination operands specified?.
- Immediate format
- Register format
- Memory format
- Addressing format
Answer: b, Register format
Q18. What does the immediate field in an instruction format specify?.
- A direct memory address
- The type of operation
- A constant value used in the instruction
- A register number
Answer: c, A constant value used in the instruction
Q19. Which type of instruction format uses opcode and an immediate value?.
- R-format
- I-format
- J-format
- C-format
Answer: b, I-format
Q20. In an instruction format, the field that identifies the register used as a source operand is called:.
- Source register field
- Destination register field
- Index register field
- Immediate field
Answer: a, Source register field
Q21. Which instruction format component is used to determine if an operand is a direct or indirect address?.
- Addressing mode
- Opcode
- Immediate value
- Register
Answer: a, Addressing mode
Q22. What is typically found in the opcode field of an instruction format?.
- The address of the operand
- The specific operation to be performed
- The size of the operand
- The source and destination registers
Answer: b, The specific operation to be performed
Q23. What does the instruction format component ‘address’ typically provide?.
- The value of the operand
- The operation to be performed
- The location of the operand in memory
- The mode of addressing
Answer: c, The location of the operand in memory
Q24. In an instruction format, what is the role of the opcode field?.
- To define the data size
- To specify the address of the operand
- To encode the operation to be performed
- To indicate the type of register
Answer: c, To encode the operation to be performed
Q25. In instruction formats, the term ‘addressing mode’ refers to:.
- The size of the instruction
- The way operands are addressed
- The operation performed by the instruction
- The number of registers used
Answer: b, The way operands are addressed
Q26. Which instruction format uses a combination of an opcode and a memory address for specifying operands?.
- Immediate format
- Register format
- Memory format
- Hybrid format
Answer: c, Memory format
Q27. The field that contains the actual operation to be performed is known as:.
- Address field
- Register field
- Opcode
- Immediate value
Answer: c, Opcode
Q28. Which field in an instruction format helps in identifying the operation type and its parameters?.
- Address field
- Opcode
- Immediate value
- Mode field
Answer: b, Opcode
Q29. What does the mode field in an instruction format usually determine?.
- The size of the operand
- The addressing method used
- The opcode of the instruction
- The register used
Answer: b, The addressing method used
Q30. What is the primary role of the opcode in an instruction format?.
- To specify the data type
- To determine the memory location
- To encode the operation to be executed
- To identify the register used
Answer: c, To encode the operation to be executed
Q31. Which field in an instruction format specifies the operation code to be executed?.
- Address field
- Immediate value
- Opcode
- Register field
Answer: c, Opcode
Q32. A CPU supports 8 instructions. How many bits are required for the opcode?.
- 13
- 16
- 4
- 3
Answer: d, 3
Q33. A processor requires 12 distinct instructions. Find the opcode length..
- 3
- 6
- 5
- 4
Answer: d, 4
Q34. A CPU supports 45 instructions. How many bits are needed for the opcode?.
- 3
- 4
- 6
- 5
Answer: c, 6
Q35. A processor uses a 16-bit instruction format. Out of these:5 bits for opcode, 3 bits for register,Remaining for addressing. How many maximum instructions can be represented by this opcode?.
- 32
- 64
- 8
- 16
Answer: a, 32
Q36. A machine has a 32-bit architecture, with 1-word long instructions. It has 64 registers, each of which is 32 bits long. It needs to support 45 instructions, which have an immediate operand in addition to two register operands. Assuming that the immediate operand is an unsigned integer, the maximum value of the immediate operand is _____..
- 16383
- 16383
- 16383
- 16383
Answer: a, 16383
Q37. 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 _____..
- 14
- 14
- 14
- 14
Answer: a, 14
Q38. A CPU has 12 registers and uses 6 addressing modes. RAM is 64K × 32. What is the maximum size of the op-code field in the instruction if the instruction has a register operand and a memory address operand?.
- 8 bits
- 9 bits
- 10 bits
- 11 bits
Answer: b, 9 bits
Q39. A computer uses a memory unit of 512 K words of 32 bits each. A binary instruction code is stored in one word of the memory. The instruction has four parts: an addressing mode field to specify one of the two-addressing mode (direct and indirect), an operation code, a register code part to specify one of the 256 registers, and an address part. How many bits are there in addressing mode part, opcode part, register code part, and the address part?.
- 1, 3, 9, 19
- 1, 4, 9, 18
- 1, 4, 8, 19
- 1, 3, 8, 20
Answer: c, 1, 4, 8, 19
Q40. A micro instruction format has micro operation field which is divided into 2 subfields F1 and F2, each having 15 distinct microoperations, condition field CD for four status bits, branch field BR having four options used in conjunction with address field AD. The address space is of 128 memory words. The size of micro instruction is:.
- 19
- 18
- 17
- 20
Answer: a, 19
Q41. Consider the following: Operation code Source operand reference Result operand reference Next instruction reference Which of the above are typical elements of machine instructions?.
- 1, 2 and 3 only
- 1, 2 and 4 only
- 3 and 4 only
- 1, 2, 3 and 4
Answer: d, 1, 2, 3 and 4
Q42. Consider a 32-bit processor which supports 70 instructions. Each instruction is 32 bits long and has 4 fields namely opcode, two register identifiers and an immediate operand of unsigned integer type. Maximum value of the immediate operand that can be supported by the processor is 8191. How many registers does the processor have?.
- 32
- 64
- 128
- 16
Answer: b, 64
Q43. A Computer uses a memory unit with 256K word of 32 bits each. A binary instruction code is stored in one word of memory. The instruction has four parts: an indirect bit, an operation code and a register code part to specify one of 64 registers and an address part. How many bits are there in operation code, the register code part, and the address part?.
- 7, 7, 18
- 18, 7, 7
- 7, 6, 18
- 6, 7, 18
Answer: c, 7, 6, 18