ITPEC FE Morning October 2022 Question 20

Topic: Hardware

A half adder is a logic circuit that performs the addition of two single-bit binary numbers and outputs the sum and carry. The truth table of a half adder is shown in the table below. Which of the following is an appropriate logic diagram of the half adder?

InputsOutputs
ABC (Carry)S (Sum)
0000
0101
1001
1110

Explanation

XOR gate for S, AND gate for C — read each output column of the truth table as a gate.

  • •S is 1 when exactly one input is 1 (0, 1, 1, 0): that is XOR
  • •C is 1 only when both inputs are 1 (0, 0, 0, 1): that is AND

Diagram (c) has an XOR gate driving S and an AND gate driving C.

Answer (c)

Why not others:

  • •(a) — its S gate is NOR, which gives 1 for A = 0, B = 0, where S must be 0
  • •(b) — its S gate is AND, giving 0 for A = 0, B = 1, where S must be 1, and its C gate is NOR, giving 1 for 0, 0
  • •(d) — the right gates on the wrong outputs: AND drives S and XOR drives C, so for A = 0, B = 1 it gives S = 0, C = 1

Key rule: A half adder is XOR for the sum and AND for the carry; test a candidate circuit against one row of the truth table where the options differ.

Hardware · 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.