Skip to content
CS Fundamentals

Logic Gate & Truth Table Simulator

Flip inputs and see the output of AND, OR, NOT, NAND, NOR, XOR, XNOR gates, half and full adders and a 4-to-1 multiplexer, with the full truth table.

  • Free
  • No sign-up
  • Runs in your browser

Logic Gate & Truth Table Simulator

runs on your device

Inputs

Click an input to switch it between 0 and 1.

Outputs

Truth table

How to use it

Pick a gate or circuit, then click the inputs to switch them between 0 and 1. The outputs light up when they are 1, and the matching row of the truth table is highlighted.

The basic gates

  • AND outputs 1 only when every input is 1.
  • OR outputs 1 when at least one input is 1.
  • NOT flips its single input.
  • NAND and NOR are AND and OR followed by NOT. Either one alone can build every other gate.
  • XOR outputs 1 when the inputs differ; XNOR when they are the same.

Adders

A half adder adds two bits: Sum = A ⊕ B and Carry = A · B. A full adder also takes a carry in, so adders can be chained to add whole numbers: Sum = A ⊕ B ⊕ Cin and Cout = A·B + Cin·(A ⊕ B).

4-to-1 multiplexer

A multiplexer passes one of its data inputs (D0–D3) to the output. The two select lines S1 and S0 form a binary number that chooses which one: 00 selects D0, 01 selects D1, 10 selects D2 and 11 selects D3.

Go deeper

CS Fundamentals

4 to 1 Multiplexer Circuit in Digital Works

Today you will learn how to design a logical circuit of multiplexer of 4 to 1. I have uploaded a picture of complete circuit as well as complete circuit in created in Dig…

CS Fundamentals

Shift Micro-operation in Computer Architecture

Shift micro-operations are used in serial transfer data. They are also used in conjunction with arithmetic, logic and otehr data processing operations. The content of a r…

CS Fundamentals

8 Bit Common Bus With Tri State in Digital Works

In this article you will get 8 Bit Common Bus Circuit With Tri State in Digital Works Software. It is little bit complex but very easy if you have its concept. Basic purp…

CS Fundamentals

Full Bit Adder Truth Table And Circuit in Digital Works

In this article You will get Full Bit Adder of Digital Logic Design with truth table, K Map Equation and circuit. You can download this circuit that made in Digital works…