PyGCSE Python Lab

Adder Circuit Builder

Explore half adders, full adders, and 4-bit ripple carry adders with interactive inputs and circuit diagrams. Matches AQA A Level CS (7517) specification §4.6.5.5.

📖 Learn Step-by-Step

A half adder adds two single-bit inputs using an XOR gate (sum) and an AND gate (carry). It cannot accept a carry-in from a previous stage.

Sum0
Carry0
A=0B=0XORANDSum=0Carry=0

Truth Table

ABSumCarry
0000
0110
1010
1101

Working

  1. Inputs: A = 0, B = 0
  2. XOR gate: A ⊕ B = 0 ⊕ 0 = 0 → Sum = 0
  3. AND gate: A ∧ B = 0 ∧ 0 = 0 → Carry = 0
  4. Result: 0 + 0 = 00 in binary (0 in decimal)

Adder Circuit Practice Questions

Q1 · 1 mark
Question 1

Half adder: Sum output

0/1 mark
A half adder has inputs A=1 and B=1. What are the Sum and Carry outputs?

Half Adder — Inputs:

A =1
B =1

Select the outputs:

Sum =
(A XOR B)
Cₒᵤₜ =
(A AND B)
Q2 · 1 mark
Question 2

Half adder: A=1, B=0

0/1 mark
A half adder has inputs A=1 and B=0. Select the Sum and Carry outputs.

Half Adder — Inputs:

A =1
B =0

Select the outputs:

Sum =
(A XOR B)
Cₒᵤₜ =
(A AND B)
Q3 · 2 marks
Question 3

Full adder: A=1, B=1, Cin=1

0/2 marks
A full adder has inputs A=1, B=1, and Carry In=1. Select the Sum and Carry Out outputs.

Full Adder — Inputs:

A =1
B =1
Cᵢₙ =1

Select the outputs:

Sum =
(A XOR B XOR Cᵢₙ)
Cₒᵤₜ =
((A AND B) OR (Cᵢₙ AND (A XOR B)))
Q4 · 2 marks
Question 4

Full adder: A=0, B=1, Cin=1

0/2 marks
A full adder has inputs A=0, B=1, and Carry In=1. Select the Sum and Carry Out outputs.

Full Adder — Inputs:

A =0
B =1
Cᵢₙ =1

Select the outputs:

Sum =
(A XOR B XOR Cᵢₙ)
Cₒᵤₜ =
((A AND B) OR (Cᵢₙ AND (A XOR B)))
Q5 · 1 mark
Question 5

Full adder: A=1, B=0, Cin=0

0/1 mark
A full adder has inputs A=1, B=0, and Carry In=0. Select the Sum and Carry Out outputs.

Full Adder — Inputs:

A =1
B =0
Cᵢₙ =0

Select the outputs:

Sum =
(A XOR B XOR Cᵢₙ)
Cₒᵤₜ =
((A AND B) OR (Cᵢₙ AND (A XOR B)))
Quick reference — adder circuits

Half adder

Adds two single bits. Uses an XOR gate for the sum and an AND gate for the carry. Cannot handle a carry-in.

Full adder

Adds two bits plus a carry-in. Built from two half adders and an OR gate. Can be chained to add multi-bit numbers.

Ripple carry adder

N full adders chained so each carry-out feeds the next carry-in. Adds two N-bit numbers. Called “ripple” because the carry propagates from LSB to MSB.