Logic circuits
In a 1-bit half adder, which logic produces the sum (S) and carry (C)?
- ASum is AND, carry is OR
- BSum is NOR, carry is NAND
- CSum is XOR, carry is AND
Show answer and explanation
Answer: C. Sum is XOR, carry is AND
Adding one-bit A and B gives sum = A XOR B and carry = A AND B; for example, 1 + 1 = binary 10, so the sum is 0 and the carry is 1. A full adder, which also adds a carry-in, can be built from two half adders and an OR gate, with sum = A⊕B⊕Cin and carry = AB + Cin(A⊕B). CPU arithmetic units (ALUs) are built on full adders combined with fast carry schemes.