Digital Logic Simulator
untitled.json

Digital Logic Simulator Guide

Build and simulate AND, OR, NOT, NAND, NOR, XOR gates and more — drag from the palette, wire them together, press Run.

1. Palette

  • I/O: Input, Output, Clock, Logic 1 / Logic 0 constants, LED, 7-segment display.
  • Gates: AND, NAND, OR, NOR (each has a ▾ flyout for a 3-input variant), XOR, XNOR, NOT, BUF, tri-state buffer, 2:1 and 4:1 multiplexers.
  • Arithmetic: Half Adder, Full Adder.
  • MSI: 2-to-4 and 3-to-8 decoders, 4-to-2 encoder, 4-bit counter.
  • Sequential: D, T, JK, SR, and gated-SR flip-flops; D-latch.
  • Click any palette button to drop that block onto the canvas.

2. Connecting gates with wires

  • Hold and pull: put the pointer on a gate's pin, hold the button (or your finger) down, pull the wire across to the destination pin, and let go — the connection is made.
  • Or wire hands-free: tap a pin once and release. The loose wire end now follows your bare cursor around the canvas — no button held. A click on the destination pin completes the connection; a click on blank canvas plants a corner exactly where you want one. Escape or a right-click abandons the wire.
  • Corners take care of themselves: whenever your path turns, the wire folds into a clean right angle on its own, and the loose end jumps onto any legal pin as soon as you come near it.
  • Dashed alignment guides appear while dragging a gate when one of its pins lines up exactly with another gate's pin — release near the guide for a straight run.
  • Fan-out: drop a second wire onto an existing one from the same source pin — a junction dot marks the true branch point.

3. Editing

  • Select a block or wire, then press Delete/Backspace, or right-click / long-press for a context menu: Delete, Duplicate, rotate (gates), or set LED colour.
  • Cmd/Ctrl+Z undo, Cmd/Ctrl+Shift+Z (or Cmd/Ctrl+Y) redo.
  • Double-click a gate with a variant (AND/NAND/OR/NOR) to switch between its 2- and 3-input form.

4. Running the simulation

  • ▶ Run evaluates the circuit. Click Input blocks to toggle 0/1 while running; LED and 7-Seg blocks update live.
  • The simulator uses 4-value logic (0, 1, X = unknown, Z = high-impedance) with realistic per-gate propagation delays — edit them from the delay editor in the toolbar.
  • ■ Stop ends the run and returns to editing.

5. Waveforms, truth tables & Boolean expressions

The panel below the canvas has three tabs, all computed from your circuit automatically:

  • Waveform: a timing diagram of every net. Use Play / pause and the speed selector to step through propagation event-by-event.
  • Truth Table: every input combination and the resulting outputs, generated from the circuit's logic — click a row to preview it live on the canvas.
  • Expressions: the minimised Boolean sum-of-products (SOP) for each output, with a Karnaugh map.

The right-hand panel lists simulation results and any netlist issues (floating inputs, unreachable logic) so you can fix wiring problems before they cause a "Truth Table unavailable" state.

6. Files & examples

  • File ▾: New, Open, Save / Save As (native file picker on Chromium; download fallback elsewhere), Import / Export JSON.
  • Cmd/Ctrl+S quick-saves to the currently open file.
  • Examples ▾: load a ready-made circuit — basic gates, adders, decoders, counters — to explore or build on.
  • Your circuit auto-saves to the browser locally as you work — nothing leaves the device.

Keyboard shortcuts

Del / Backspace
Delete selected block or wire
Esc
Cancel current wire draw
Cmd/Ctrl+Z
Undo
Cmd/Ctrl+Shift+Z
Redo
Cmd/Ctrl+S
Save