Question 5Medium
- Sum = A XOR B, Carry = A AND B
- Sum = A AND B, Carry = A XOR B
- Sum = A OR B, Carry = A AND B
- Sum = A XNOR B, Carry = A OR B
Answer: A. Sum = A XOR B, Carry = A AND B
Explanation
1 + 1 = 10 in binary: sum 0, carry 1. So sum is XOR and carry is AND.
Step-by-step solution
- 1 + 1 = 10 in binary: sum 0, carry 1.
- So sum is XOR and carry is AND.
- So the answer is: Sum = A XOR B, Carry = A AND B.
Why the other options are wrong
- B. The functions are swapped.
- C. OR does not give the sum bit.
- D. XNOR is wrong.
Question 8Medium
The correct order of the instruction cycle is
- Decode, fetch, execute
- Fetch, decode, execute
- Execute, fetch, decode
- Fetch, execute, decode
Answer: B. Fetch, decode, execute
Explanation
The CPU fetches an instruction, decodes it, then executes it.
Step-by-step solution
- The CPU fetches an instruction, decodes it, then executes it.
- So the answer is: Fetch, decode, execute.
Why the other options are wrong
- A. Decode needs a fetched instruction.
- C. Execution comes last.
- D. Decode precedes execute.
Question 9Hard
With a cache hit ratio of 0.9, cache access time of 10 ns and main memory access time of 100 ns (memory accessed only on a miss), the average access time is
- 10 ns
- 19 ns
- 55 ns
- 100 ns
Answer: B. 19 ns
Explanation
Average = 0.9 x 10 + 0.1 x 100 = 9 + 10 = 19 ns.
Step-by-step solution
- Average = 0.9 x 10 + 0.1 x 100 = 9 + 10 = 19 ns.
- So the answer is: 19 ns.
Why the other options are wrong
- A. 10 ns ignores misses.
- C. 55 ns is the plain average of 10 and 100.
- D. 100 ns ignores hits.
Tip: Average time = hit ratio × cache time + (1 − hit ratio) × memory time, when memory is reached only on a miss.
Question 10Hard
RISC processors are characterised by
- A large set of complex instructions
- Only memory-to-memory operations
- A small set of simple, fixed-length instructions
- No registers
Answer: C. A small set of simple, fixed-length instructions
Explanation
RISC designs favour simple instructions that execute in about one cycle.
Step-by-step solution
- RISC designs favour simple instructions that execute in about one cycle.
- So the answer is: A small set of simple, fixed-length instructions.
Why the other options are wrong
- A. That describes CISC.
- B. RISC uses load/store, not memory-to-memory.
- D. RISC uses many registers.
Tip: RISC means few, simple, fixed-length instructions that run in about one cycle; reject options describing complex instructions.