Computer Hardware and Logic Circuits: Question 10
Syllabus 3.2
A logic circuit has four separate binary inputs. A truth table is to be drawn showing the circuit's output for every possible combination of these four inputs. Not counting the header row, how many rows of input combinations does the completed truth table need?
Show worked solution Hide worked solution
Worked solution
Counting the possible input combinations
Each binary input can independently take one of 2 possible values: 0 or 1. A complete truth table must show a separate row for every possible combination of the inputs’ values, so the number of rows needed is 2 multiplied by itself once for each input.
With 4 independent inputs, this is:
2 × 2 × 2 × 2 = 2 to the power 4 = 16
So the completed table needs 16 rows of input combinations (plus the header row, which is not counted). This matches the general rule: a truth table for n inputs needs 2 to the power n rows, for example, 2 inputs need 2^2 = 4 rows, and 3 inputs need 2^3 = 8 rows.
Why the other options are wrong
- A (4): this simply repeats the number of inputs, rather than counting how many different combinations of values those 4 inputs can take together.
- B (8): this comes from doubling the number of inputs (4 × 2), rather than raising 2 to the power of the number of inputs.
- D (32): this is double the correct answer. It does not correspond to any extra rows genuinely needed. Each row’s single output value (0 or 1) is recorded in that same row, not on a separate row of its own.
Final answer
C. A truth table for 4 binary inputs needs 2 to the power 4, which is 16, rows of input combinations.