When n bits are used to represent an operation (op) code, then how many…
2021
When n bits are used to represent an operation (op) code, then how many different operations a computer can perform?
- A.
n operations
- B.
2 × n operations
- C.
2ⁿ operations
- D.
n² operations
Attempted by 543 students.
Show answer & explanation
Correct answer: C
When n bits are used to represent an operation code, each bit can be either 0 or 1. The total number of unique combinations is 2 raised to the power of n, or 2ⁿ. This is because each bit doubles the number of possible codes. For example, with 1 bit, there are 2 codes (0 and 1); with 2 bits, there are 4 codes (00, 01, 10, 11), and so on. Therefore, the number of different operations a computer can perform is 2ⁿ.