
In Computer Organization and Architecture (COA), questions on Instruction Format and Machine Language are very common in ECET. These concepts are the backbone of how processors execute instructions.
📘 Concept Notes
🔹 What is Machine Language?
- Machine language is the lowest-level programming language understood directly by the CPU.
- Instructions are represented in binary (0s and 1s).
- Example:
10110000 01100001
(Load value into a register). - Hard to read → so Assembly Language is used for human readability.
🔹 Instruction Format
- The layout of bits in an instruction is called its instruction format.
- Determines how the CPU interprets each instruction.
- Typical fields in an instruction:
- Opcode (Operation Code): Specifies the operation (e.g., ADD, LOAD).
- Operand(s): Data or addresses involved.
- Addressing Mode bits: Indicate how to interpret operands.
⚙️ General Instruction Format Formula
🔹 Types of Instruction Formats
- Zero Address Format (Stack-based):
- No operands specified, uses implicit stack.
- Example:
ADD
→ Pops two values from stack, adds, pushes result.
- One Address Format:
- Single operand specified, accumulator implied.
- Example:
ADD X
→
- Two Address Format:
- Two operands specified.
- Example:
ADD A, B
→
- Three Address Format:
- Three operands specified.
- Example:
ADD A, B, C
→
🔹 Example
Suppose instruction length = 16 bits, with:
- Opcode = 4 bits
- Register address = 6 bits
- Memory address = 6 bits
🔹 Machine Language vs Assembly
Machine Language | Assembly Language |
---|---|
Binary, unreadable by humans | Mnemonics (ADD, MOV) |
Executed directly by CPU | Needs assembler to convert |
Very fast execution | Easier for programmers |
🔟 10 Expected MCQs – ECET 2026
Q1. Machine language instructions are written in:
A) Mnemonics
B) High-level language
C) Binary (0s and 1s)
D) Assembly
Q2. In instruction format, the part specifying the operation is:
A) Operand
B) Opcode
C) Mode bits
D) Address
Q3. Formula for instruction length is:
A) Opcode + Address + Mode bits
B) Opcode × Address
C) Operand + Address
D) None
Q4. Which format is used in stack-based architecture?
A) Zero Address
B) One Address
C) Two Address
D) Three Address
Q5. In one-address instruction format, which register is implied?
A) Data Register
B) Accumulator
C) Program Counter
D) Memory Buffer
Q6. Instruction ADD A, B
in two-address format means:
A) B ← A + B
B) A ← A + B
C) A ← B + C
D) None
Q7. In three-address instruction ADD A, B, C
, result is stored in:
A) A
B) B
C) C
D) Accumulator
Q8. If instruction length = 20 bits, opcode = 5 bits, address = 15 bits → valid?
A) Yes
B) No
C) Only if operands = 0
D) None
Q9. Which is most compact instruction format?
A) Zero Address
B) One Address
C) Two Address
D) Three Address
Q10. Assembly instruction ADD R1, R2
corresponds to machine instruction:
A) Binary string
B) English sentence
C) Hexadecimal only
D) None
✅ Answer Key
Q.No | Answer |
---|---|
Q1 | C |
Q2 | B |
Q3 | A |
Q4 | A |
Q5 | B |
Q6 | B |
Q7 | A |
Q8 | A |
Q9 | A |
Q10 | A |
🧠 Explanations
- Q1 → C: Machine language is always in binary.
- Q2 → B: Opcode defines the operation.
- Q3 → A: Formula = Opcode + Address + Mode bits.
- Q4 → A: Zero address uses stack.
- Q5 → B: Accumulator is implied in one-address format.
- Q6 → B: Two-address → result stored in first operand.
- Q7 → A: In three-address, first operand stores result.
- Q8 → A: 5+15 = 20 bits → valid.
- Q9 → A: Zero-address is most compact.
- Q10 → A: Assembly is translated into binary machine instruction.
🎯 Why Practice Matters
- COA instruction format questions are repeated every year.
- Easy scoring if you remember formula and formats.
- Helps in both exams + interviews.