Solution:
Key idea: A NAND gate gives 0 only when both its inputs are 1. A NAND gate whose two inputs are joined acts as a NOT gate. In a common emitter amplifier, a small signal in the base circuit produces a large, inverted voltage across the load in the collector circuit.
Part (i) — truth table
Step 1 — Find C.
The point C is the output of a NAND gate with inputs A and B.
C=A⋅B
Step 2 — Find D.
Both inputs of the second NAND gate are joined to C, so it acts as a NOT gate.
D=C⋅C
D=Cˉ
Inverting C removes the bar, so the whole arrangement gives the AND function.
D=A⋅B
Step 3 — Complete the table.
We fill in the rows in the printed order. The output C is 0 only in the row where both A and B are 1, and D is always the opposite of C.
| A | B | C | D |
|---|
| 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 1 | 0 | 1 |
So the arrangement represents an AND gate.
Part (ii) — common emitter amplifier
Step 4 — Draw the circuit.
An n-p-n transistor is used with its emitter common to the input and output circuits. The input signal is connected in series with a small battery VBB between base and emitter, so that the emitter–base junction is forward biased. The load resistor RL and the battery VCC are connected between collector and emitter, so that the collector–base junction is reverse biased. The output is taken across RL.

Step 5 — Explain the waveforms.
A small change in the base current IB produces a change β times larger in the collector current IC. The changing collector current flowing through RL gives a large changing voltage across it, so the signal is amplified. When the input rises, IC rises, the drop across RL grows and the collector voltage VCC−ICRL falls; so the output is 180∘ out of phase with the input (phase reversal).

Therefore, (i) C = 1, 1, 1, 0 and D = 0, 0, 0, 1 for the rows (A,B) = (0, 0), (1, 0), (0, 1), (1, 1), so the arrangement is an AND gate; (ii) in the CE amplifier the output voltage is a larger copy of the signal, 180° out of phase with it.