Logic Circuit Simulator

Build and test digital logic circuits online. Connect logic gates, experiment with binary inputs, calculate circuit outputs, and automatically generate truth tables for your designs.

Interactive circuit builder 7 logic gates Automatic truth tables

Build Your Logic Circuit

Add gates and connect their inputs to primary inputs or earlier gate outputs.

The truth table includes every possible input combination.
Choose a primary input or a gate output as the final result.

Primary Inputs

Set the current binary input values

Gate Connections

Gate outputs become available to subsequent gates

Live Circuit Output

Selected output signal
0
Output: A
The selected signal is currently 0.
Current signal values

Change any primary input or gate connection to recalculate the circuit.

Circuit Diagram

A simplified signal-flow view of your current circuit.

The diagram represents logical signal connections rather than physical wire routing. Each gate can use outputs from primary inputs or gates listed above it.

Generated Truth Table

All possible input combinations and the corresponding intermediate and final outputs.

Input combinations
4
Logic gates
0
Output signal
A

The highlighted row corresponds to the currently selected primary input values.

Logic Gate Reference

The simulator supports seven common Boolean logic gates. Each gate operates on binary values, where 0 represents false and 1 represents true.

AND Gate

Produces 1 only when both inputs are 1.

00 → 0, 01 → 0, 10 → 0, 11 → 1

OR Gate

Produces 1 when at least one input is 1.

00 → 0, 01 → 1, 10 → 1, 11 → 1

NOT Gate

Inverts its input.

0 → 1, 1 → 0

NAND Gate

Produces the inverse of AND.

00 → 1, 01 → 1, 10 → 1, 11 → 0

NOR Gate

Produces the inverse of OR.

00 → 1, 01 → 0, 10 → 0, 11 → 0

XOR Gate

Produces 1 when the inputs are different.

00 → 0, 01 → 1, 10 → 1, 11 → 0

XNOR Gate

Produces 1 when the inputs are equal.

00 → 1, 01 → 0, 10 → 0, 11 → 1

How to Use the Logic Circuit Simulator

  1. Choose the number of primary binary inputs: A and B, optionally adding C and D.
  2. Click Add Gate to insert a logic gate into your circuit.
  3. Choose a gate type, such as AND, OR, NOT, XOR, NAND, NOR, or XNOR.
  4. Select the input signals connected to each gate. You can connect a gate to primary inputs or outputs of earlier gates.
  5. Choose the final circuit output signal.
  6. Change the primary input values and observe the live output.
  7. Review the automatically generated truth table or download it as a CSV file.

Understanding Digital Logic Circuits

A digital logic circuit is a system that processes binary signals using Boolean operations. Its building blocks are logic gates, which perform operations on one or more binary inputs and produce a binary output.

Gates can be connected together to create more complex circuits. For example, the output of an AND gate can become an input to an OR gate. This allows a circuit to perform multiple logical operations in sequence.

A truth table describes the behavior of a logic circuit by listing every possible combination of primary input values and the corresponding output. With n primary inputs, a complete truth table contains \(2^n\) rows.

Frequently Asked Questions

What is an online logic circuit simulator?

An online logic circuit simulator is a tool for creating and testing digital circuits using Boolean logic gates. It calculates circuit outputs without requiring physical electronic components.

Which logic gates does this simulator support?

It supports AND, OR, NOT, NAND, NOR, XOR, and XNOR gates. You can combine multiple gates to create more complex logic circuits.

Can I connect multiple logic gates?

Yes. A gate can receive signals from primary inputs or outputs of gates placed earlier in the circuit. This allows you to build multi-stage digital logic circuits.

How does the truth table generator work?

The simulator enumerates all possible combinations of primary input values, evaluates each gate in order, and records the intermediate and final outputs.

How many inputs can I use?

This version supports two, three, or four primary inputs. That produces truth tables with 4, 8, or 16 combinations respectively.

Can I download the generated truth table?

Yes. Use the Download CSV button above the truth table to export the current circuit's complete truth table.

Does this simulator model real electronic delays?

No. It evaluates ideal Boolean logic. It does not simulate propagation delays, voltage levels, electrical loading, or physical circuit behavior.

Related Binary and Digital Logic Tools

Explore other tools for binary calculations and digital logic design.