ITPEC FE Morning April 2018 Question 3
For two logical variables X and Y, a logical operation X NAND Y is defined as a composite operation NOT (X AND Y). Which of the following is equivalent to the logical operation X OR Y?
Explanation
(X NAND X) NAND (Y NAND Y) — NAND an input with itself to invert it, then NAND the two inverted inputs to get OR by De Morgan's law.
- •
X NAND X= NOT (X AND X) = NOT X, and likewiseY NAND Y= NOT Y - •(NOT X) NAND (NOT Y) = NOT (NOT X AND NOT Y)
- •By De Morgan's law, NOT (NOT X AND NOT Y) = X OR Y
The result column is the OR of X and Y.
Answer (b)
Why not others:
- •(a) — simplifies to NOT Y:
(X NAND Y) NAND Xis (NOT X) OR Y, and NANDing that with Y gives NOT Y; for X = Y = 0 it outputs 1 - •(c) — NANDing a value with itself inverts it, so this is NOT (X NAND Y) = X AND Y
- •(d) — simplifies to NOT X:
Y NAND (X NAND Y)is X OR (NOT Y), and X NAND that is NOT X; for X = Y = 1 it outputs 0
Key rule: A NAND with both inputs tied together is a NOT gate, and a NAND of inverted inputs is an OR, which is why NAND alone can build every logic function.
Basic Theory · AI-written, may contain errors
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.