Half adder and full adder (introductory)
Digital electronics basics · Physics
DC circuit
Interactive 3DElectrons drift around the loop — raise the voltage and watch the current obey Ohm's law.
Controls
Drag the sliders or type a value — the simulation updates live.
Study notes
Worked example: Add the binary numbers 1011 and 0111 (11 + 7 = 18) using full-adder logic, bit by bit from the right, with Cin = 0 at the start. Bit 0 (rightmost): A=1, B=1, Cin=0. S = 1⊕1⊕0 = 0. Cout = 1·1 + 0 = 1. Bit 1: A=1, B=1, Cin=1. S = 1⊕1⊕1 = 1 (XOR of three 1s is 1). Cout = 1·1 + 1·(1⊕1) = 1 + 0 = 1. Bit 2: A=0, B=1, Cin=1. S = 0⊕1⊕1 = 0. Cout = 0·1 + 1·(0⊕1) = 0 + 1 = 1. Bit 3: A=1, B=0, Cin=1. S = 1⊕0⊕1 = 0. Cout = 1·0 + 1·(1⊕0) = 0 + 1 = 1. Final carry out = 1. Reading sum bits from bit 3 to bit 0 plus the final carry: 1 0010 = 10010₂ = 16 + 2 = 18. Correct!