Advanced workspace · digital logic

Logic Gate Simulator

Full workspace

Build digital circuits by dragging gates onto a grid and wiring them together, then flip the switches and watch the signals flow. Add clocks, flip-flops, adders and a hex display; slow the simulation down to see each gate change in turn. The simulator writes the truth table and the simplest Boolean expression for every output, records a timing diagram, and builds a circuit from any expression you type, also using NAND gates only. Export the circuit as an image, the table as CSV, waveforms as VCD, or an animation of it running.

  • 20 parts
  • Live simulation
  • Slow motion
  • Truth tables
  • Simplest expressions
  • Timing diagram
  • Expression → circuit
  • NAND-only
  • PNG · SVG · PDF · CSV · VCD · GIF · MP4
Live circuit–
Parts
–
Wires
–
Inputs
–
Ticks
–

Export

Images show the circuit with its live signal colours. Animations run the circuit: clocks tick, or the switches count through every input combination.

Keyboard shortcuts

Using Logic Gate Simulator

A workspace for building digital logic circuits from gates and watching them run.

  1. Pick an example from the Example list, or press New for an empty grid. Click a part on the left to add it, or drag it onto the grid.
  2. Drag from an output pin (the right side of a part) to an input pin (the left side) to connect them. Dragging into an input that already has a wire replaces it; dragging out of an input and dropping on empty space disconnects it.
  3. Click a switch to flip it, or hold a push button. Wires and pins turn green when they carry a 1. Use Pause and Step to go one tick at a time, or tick Slow motion to see each gate change in turn.
  4. Open Truth table to see every input combination, and click a row to set the switches. Expressions shows the simplest sum-of-products for each LED, with a Karnaugh map for 2 to 4 inputs, in the notation you choose.
  5. Timing records switches, clocks and LEDs as waveforms; export them as a PNG or a VCD file. Build turns a typed expression into a circuit, also using NAND gates only.
  6. Save the circuit as a file, copy a share link, or export a PNG, SVG, PDF, CSV truth table or an animation as GIF, MP4 or WebM.

Example

Load Majority voter and flip A, B and C: the Pass LED lights when at least two are on, and Expressions gives Pass = A·B + A·C + B·C. In Build, type A ^ B with NAND gates only ticked to get the classic four-gate XOR.

Questions & answers

How does the simulation work?

Every part takes one tick to react to its inputs, like a real gate delay. That is why signals ripple through a long chain, and why a NOT gate wired to itself oscillates. Speed sets how many ticks run each second.

Why is there no truth table for my circuit?

Circuits with flip-flops, a clock or a feedback loop remember things, so the same switch settings can give different outputs. Use the Timing tab for those. Truth tables are made for up to 10 switches.

Which inputs come first in the table?

Inputs and outputs are sorted by their labels, so name switches A, B, C… to control the order. Double-click a part, or select it and open the Part tab, to rename it.

When do flip-flops change?

D, T and JK flip-flops change on the rising edge of CLK, the moment it goes from 0 to 1. The 4-bit counter example chains T flip-flops so each one toggles when the one before it falls.

What expression notations can I type?

A·B + C̄, AB + C', (A & B) | !C and A AND NOT B all work. Use ^ or ⊕ for XOR, and NAND and NOR as words. AND binds tighter than XOR, which binds tighter than OR.

Is anything uploaded?

No. Everything runs in your browser, and the share link holds the whole circuit.

Help improve this tool

Report a problem or suggest an improvement

Describe the issue without pasting private tool input. Feedback goes to our admin inbox.

Find another tool · Read practical guides