Digital logic workspace

Logic Gate Simulator

LOW · 0HIGH · 1
100%
Toggle an input, then follow the signal through the circuit.

Create a custom gate

Logic Gate Simulator

Build and simulate digital logic circuits online. Place inputs, outputs, and gates on the canvas, connect their ports, then toggle an input to see every signal and output update immediately.

Boolean Logic in a Circuit

A logic gate maps binary inputs to a binary output. LOW is 0 and HIGH is 1. The simulator evaluates a combinational circuit from its inputs toward its outputs each time an input or connection changes.

  • AND is HIGH only when every input is HIGH.
  • OR is HIGH when at least one input is HIGH.
  • NOT reverses its input.
  • XOR is HIGH when an odd number of inputs are HIGH; XNOR is its inverse.
  • NAND and NOR invert the corresponding AND and OR results.

An unconnected input is treated as LOW. Feedback loops are rejected because this tool models combinational logic, not clocked state or latch behavior.

Reading the Gate Symbols

The canvas uses familiar ANSI-style gate outlines. The flat left side of AND marks its inputs; its rounded right side is the output. OR has a curved input side and a pointed output side. XOR adds a second input-side curve to mean exclusive OR: exactly one input is HIGH for a two-input gate. A small circle, called an inversion bubble, reverses the output.

Logic gate symbols used by the simulator AND, NAND, OR, NOR, XOR, XNOR, and NOT symbols. Inverted gates add a small output bubble. AND NAND OR NOR XOR XNOR NOT
The bubble marks inversion: NAND = NOT(AND), NOR = NOT(OR), XNOR = NOT(XOR). On the canvas, port circles identify connection points; their fill indicates the live signal level.

Start with an Adder

The half-adder example combines two input bits. Its XOR output is the sum bit and its AND output is the carry:

ABSUMCARRY
0000
0110
1010
1101

Choose Full Adder to add a carry-in bit. It computes SUM = A XOR B XOR CIN and sets CARRY when at least two of the three inputs are HIGH. The live output panel reports each named output while you toggle the inputs.

Build a Custom Circuit

  1. Choose Custom Circuit, then add inputs, outputs, and gates from the palette.
  2. Drag a node to arrange the circuit. Drag an output port to an input port to connect them.
  3. Click an input node to toggle it. Follow the colored wires to inspect signal propagation.
  4. Double-click a wire to disconnect it. Use the node controls to rename, edit, or remove a gate.
  5. Create a custom gate by selecting its input count and toggling the output for each binary input row.

With two input variables there are four possible input rows: 00, 01, 10, and 11. Choose an output bit independently for each row. That gives 2^4 = 16 distinct two-input Boolean functions, including constants, A, B, AND, OR, XOR, NAND, NOR, and their less familiar truth tables. The custom-gate editor exposes exactly these four choices before the number of inputs changes.

Custom circuits are saved in this browser using local storage. Clearing a circuit does not change the built-in half-adder or full-adder examples.

What This Simulator Models

The simulator uses ideal binary gates with no propagation delay, voltage thresholds, fan-out limits, or electrical loading. It is useful for learning Boolean behavior and exploring small combinational networks; it is not a timing, analog, or hardware verification tool.