How many rows will the truth table of a logic circuit with three input variables have?
- A.3
- B.6
- C.8
- D.9
Correct answer
Explanation
The correct answer is C, eight. Each input can take one of two values, so for three inputs the number of distinct combinations is two multiplied by itself three times, that is two raised to the power three, which is eight. The same rule gives four rows for two inputs, sixteen for four inputs and thirty-two for five. A is wrong because three is simply the number of inputs, not of combinations, and no truth table has as many rows as it has input columns. B is wrong because it comes from multiplying the number of inputs by two, the commonest error on this question; the relationship is a power of two, not a product. D is wrong because nine is three squared, which reverses base and exponent; the base must always be two, since each variable is binary. Checking that the table has the right number of rows is also a quick way to catch a missing combination.
Read the full article: Logic Gates and Boolean Algebra: Exam Notes
Practice Questions
View allWhich gate is represented by the following truth table? Input A, Input B, Output: 0, 0, 0; 0, 1, 1; 1, 0, 1; 1, 1, 1
- A.NOT
- B.OR
- C.XOR
- D.AND
Show answer
Read the table row by row. The output is 0 only when both inputs are 0, and it is 1 in the other three rows, including the row where both inputs are 1.
Read the full explanation →Which of the following pairs is known as universal gates?
- A.AND and OR
- B.NAND and NOR
- C.XOR and XNOR
- D.NOT and AND
Show answer
Each of these gates alone is enough to build every other gate and so every logic circuit: a NAND with its two inputs tied together acts as a NOT, two NANDs in sequence give an AND, and a suitable arrangement of three gives an OR, and the same can be…
Read the full explanation →According to De Morgan's theorem, the complement of the product of two variables A and B is equal to
- A.The product of the complements of A and B
- B.The sum of the complements of A and B
- C.The product of A and B itself
- D.Always equal to 1
Show answer
De Morgan's second theorem states that NOT of A AND B equals NOT A OR NOT B. The working rule is to break the bar and change the sign, so a dot under a complement becomes a plus once the complement is distributed over the variables.
Read the full explanation →The output of an XOR gate is 1 when
- A.Both inputs are 1
- B.Both inputs are 0
- C.The two inputs are different
- D.The two inputs are the same
Show answer
An exclusive OR gate is a difference detector: it gives 1 for the combinations 0 and 1 or 1 and 0, and gives 0 when the inputs agree.
Read the full explanation →A 'literal' in Boolean Algebra means
- A.A variable in its uncomplemented form only
- B.A variable or with its complement
- C.A variable in its complemented form only
- D.A variable in its complemented or uncomplemented form
Show answer
In Boolean algebra a literal is any single appearance of a variable in an expression, whether it appears plain or with a bar over it.
Read the full explanation →