What is the Boolean expression for a NAND gate?
- (a)(A + B)'
- (b)(A·B)'
- (c)A + B
- (d)A·B
Correct — B, (A·B)'.
NAND is literally NOT-AND. Send A and B into an AND gate, then invert what comes out: the result is (A·B)', the complement of the product. The dot means AND, the plus means OR, and the prime mark complements whatever stands inside the bracket before it.
Carry away that the bracket says what gets inverted and the operator inside says which gate. The bracket scope separates this option from A'·B'-style forms that invert each input; the dot rather than the plus separates it from (A + B)'.
- (a)(A + B)' — The plus sign is OR, so this inverts an OR result rather than an AND result. It is the expression for a NOR gate.
The two are easy to slide between because both carry an outside prime. Separate them by the operator inside: NAND's output is 0 for the input pair A=1, B=1, while NOR's output is 1 for the pair A=0, B=0.
- (c)A + B — With no prime anywhere, nothing is inverted. A sum of the two variables is the expression for a plain OR gate, whose output is 1 when at least one input is 1.
De Morgan's theorem does rewrite NAND as A' + B', which looks like a sum and can pull a reader here. But that form carries a complement on each variable; A + B does not.
- (d)A·B — This is the product of the inputs with no complement, so it is the expression for an AND gate — output 1 for the pair A=1, B=1.
It is the signal a NAND gate produces internally, one step before the inverter. Dropping the prime is therefore the whole difference between this option and the keyed one.
A logic gate takes binary inputs and produces one binary output fixed by a rule. AND gives 1 when both inputs are 1; OR gives 1 when at least one input is 1; NOT inverts a single input.
A NAND gate applies the AND rule and then inverts the result. Its Boolean expression is (A·B)', and its output is 0 for the single input pair in which both A and B are 1.
Logic gates are the building blocks of digital circuits — adders, memory cells, processors. The general studies level of the topic is the set of basic gates: their names, circuit symbols, truth tables and Boolean expressions.
NAND earns extra attention because it is a universal gate and a standard cell in CMOS logic design, so it turns up in both the theory and the hardware side of the topic.
- NAND stands for NOT-AND: an AND gate followed by an inverter, written (A·B)' or with an overbar drawn across A·B.
- A two-input NAND outputs 0 for the input pair A=1, B=1, and outputs 1 for each of the other three pairs.
- De Morgan's theorems give (A·B)' = A' + B' and (A + B)' = A'·B'.
- In circuit symbols a small circle at the output marks inversion, which is what turns the AND symbol into the NAND symbol.
- NAND is a universal gate: NOT, AND and OR can each be built from NAND gates alone.
- Tying both inputs of a NAND gate to the same signal A gives (A·A)' = A', so the gate behaves as a NOT gate.
Each option is a named gate. The operator, dot or plus, fixes AND versus OR; the presence or absence of the prime fixes whether an inverting bubble sits on the output.
- Reading the prime as attached to each variable instead of to the bracket: (A·B)' inverts the AND result, while A'·B' inverts each input first and equals the NOR output.
- Swapping the dot for the plus converts the NAND answer into the NOR answer, since the dot is AND and the plus is OR.
- Recalling the De Morgan form A' + B' and then reaching for the sum on the option list, when the listed sum A + B has no complements on it.
- Choosing A·B because NAND contains the word AND, and overlooking that the N in front demands an inversion.
The two-input truth table is what settles an item like this. Hold the four input pairs for each gate and the table works in either direction: from a named gate to its Boolean expression, as here, or from input-output behaviour described in words to the gate's name, as the UKPSC 2021 item asked.
De Morgan's identities also let one gate be written two ways, so an unfamiliar-looking expression may be a rewritten form of a familiar gate.
UKPSC_2021_PRE_GSI_Q942021Same topic and same commission: identifying a basic logic gate. What differs is the direction of the question. The 2021 item describes input-output behaviour in words and asks for the gate's name, choosing among OR, AND, NOT and NOR. This item names the gate and asks for its Boolean expression. Both are answered from the two-input truth tables rather than from the circuit symbols.
- practice — not a real PYQ
The Boolean expression A' + B' represents the output of which gate?
- (a)NOR
- (b)NAND
- (c)AND
- (d)XOR
Answerb — By De Morgan's theorem A' + B' = (A·B)', which is the NAND output.NOR is (A + B)' = A'·B', a product of complements rather than a sum. AND is A·B with no inversion at all. XOR is A'B + AB', which is 1 only when the two inputs differ, unlike A' + B'.
- practice — not a real PYQ
A two-input logic gate gives output 0 when both its inputs are 1, and output 1 for every other input combination. The gate is:
- (a)AND
- (b)OR
- (c)NAND
- (d)NOR
Answerc — That is the NAND truth table: 0 for the pair (1,1) and 1 for (0,0), (0,1) and (1,0).AND does the reverse, giving 1 for (1,1) and 0 for the other three. OR gives 0 for (0,0) alone. NOR gives 0 whenever at least one input is 1, so for three of the four pairs.
- practice — not a real PYQ
Both inputs of a NAND gate are joined together and a single signal A is applied to them. The circuit behaves as a:
- (a)NOT gate
- (b)AND gate
- (c)OR gate
- (d)buffer
Answera — With the inputs tied, the expression becomes (A·A)'. Since A·A = A, the output is A', which is the NOT function.A buffer would pass A through unchanged, the opposite output. Getting AND needs a second NAND stage acting as the inverter. Getting OR needs both inputs inverted before the NAND, since A + B = (A'·B')'.