Build and test a digital logic circuit
This online logic gate simulator lets you assemble a combinational circuit from input switches, logic gates, and output indicators. It runs in your browser and shows the result each time you change an input or a wire.
- Open an example or choose Blank circuit. Use the component picker to add an input switch, an output indicator, or a gate.
- Select an output pin on the right of a component, then an input pin on the left of another component. One output can feed several inputs. Connecting a new source to an occupied pin replaces its wire.
- Toggle the input switches between
0and1. The values on the board update immediately. To remove a wire, select its connected input pin and choose Disconnect. Use Undo to recover a previous layout or connection.
Try the half adder and full adder
A half adder adds two bits, A and B. An XOR gate gives the sum bit S, and an AND gate gives the carry bit C. The default example starts with A = 0 and B = 1, so S = 1 and C = 0. Set both inputs to 1 to see the binary result 10: the sum bit becomes 0 and the carry becomes 1.
The full adder adds a third input, the carry-in bit Cin. Choose Full adder to see two XOR gates, two AND gates, and an OR gate combine the three inputs into S and Cout. Try setting all three inputs to 1 to get a sum bit and a carry-out bit of 1.
What do the gates and signals mean?
- AND gives
1when both inputs are high. OR gives1when either or both inputs are high. - XOR gives
1when the two inputs differ. XNOR gives1when they match. - NOT flips a single input. NAND inverts AND, and NOR inverts OR.
The dash (–) means the signal is unknown. Look for an empty input pin upstream. Some gates can still determine their result from one input, such as AND with an input of 0. The simulator evaluates combinational logic with immediate propagation. Feedback loops are blocked because they can depend on previous state.