Combinational circuits: adders, multiplexers, decoders, encoders
Digital electronics · 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
Example: Build a 2‑bit binary adder using two half‑adders and one OR gate. Step 1: Add the least‑significant bits A0 and B0 with a half‑adder. Output S0 = A0 XOR B0, Carry C0 = A0 AND B0. Step 2: Add the next bits A1 and B1 together with another half‑adder. This gives a provisional sum S1' = A1 XOR B1 and a carry C1' = A1 AND B1. Step 3: Add the carry from step 1 (C0) to the provisional sum S1' using a third half‑adder. Output S1 = S1' XOR C0, and a second carry C0' = S1' AND C0. Step 4: The final carry out (Cout) is the OR of the two carries from steps 2 and 3: Cout = C1' OR C0'. Result: The 2‑bit sum is Cout S1 S0. For example, add A=10 (binary) and B=01. - Half‑adder 1: A0=0, B0=1 → S0=1, C0=0. - Half‑adder 2: A1=1, B1=0 → S1'=1, C1'=0. - Half‑adder 3: S1'=1, C0=0 → S1=1, C0'=0. - Cout = 0 OR 0 = 0. Thus 10 + 01 = 11 (binary).