Logic Gate Simulator
Choose a logic gate and its inputs to see the output and the full truth table for AND, OR, NOT, NAND, NOR, XOR and XNOR.
These tools are for study and quick checking. A result is only as good as the numbers you enter and the simplifying assumptions in the formula. For published, regulated or safety-critical work, check it against a trusted source or an instrument.
How it works
- Enter your values in the boxes. Where a box has a unit beside it, check the unit before you read the answer.
- The answer updates as you type, so there is no button to press.
- Use Copy results to keep the answer. Check the formula and its limits below if the result will go into a report or an experiment.
The formula
AND = A.B; OR = A+B; XOR = A xor B; NAND = not(A.B)
Frequently asked questions
Which gates are universal?
NAND and NOR. Any logic function can be built from either one alone.
How does NOT differ from the others?
It has one input, so input B is ignored.
Is what I enter sent anywhere?
No. The calculation is done in your browser, so your numbers are not sent to a server or saved.
Related tools
Decibel Calculator
Convert between a ratio and decibels for power or for voltage and current.
Digital Resolution Calculator
Find the number of steps, the voltage of one step and the quantisation noise of an analogue to digital converter, and convert a voltage to a code.
Sampling Rate Calculator
Find the minimum sampling rate for a signal by the Nyquist rule, and the data rate and storage that sampling creates.