Logic Gate Calculator
Output, truth table and IEC symbol for AND, OR, NOT, NAND, NOR, XOR, XNOR gates.
What it does
Shows the output, symbol and full truth table of AND, OR, NOT, NAND, NOR, XOR, XNOR and buffer gates for the inputs you choose.
Where it's used
Learning digital logic, checking a circuit by hand and preparing for exams.
How to use it
- Choose the gate.
- Choose 2, 3 or 4 inputs.
- Set each input to 0 or 1.
- Read the output; the matching truth-table row is highlighted.
The formula explained
- AND
- 1 only if all inputs are 1
- OR
- 1 if any input is 1
- XOR
- 1 if an odd number of inputs are 1
- NAND / NOR
- inverted AND / OR — each can build any logic
Worked example
Inputs:
- Gate: XOR
- Number of inputs: 2
- Input A: 1
- Input B: 0
The calculator gives:
- Output Y: 1
- Boolean expression: Y = A ⊕ B
Tips and common mistakes
- NAND and NOR are “universal” — any circuit can be built from just one of them.
- Never leave unused CMOS inputs floating; tie them high or low.
- A bubble on a symbol means inversion.
Questions people ask
What is the difference between OR and XOR?
OR gives 1 when at least one input is 1. XOR (exclusive OR) gives 1 only when the inputs differ, so 1 XOR 1 is 0. XOR is the heart of binary adders and parity checks.
How do I build other gates from NAND?
NOT: a NAND with its inputs tied together. AND: a NAND followed by a NOT. OR: invert both inputs, then NAND them (De Morgan’s law). That is why NAND is called universal.
Which chips contain these gates?
In the common 74HC family: 74HC00 (NAND), 74HC02 (NOR), 74HC04 (NOT), 74HC08 (AND), 74HC32 (OR) and 74HC86 (XOR), each with several gates per chip.
Related Digital Logic calculators
- Binary Calculator
- Number System Converter
- Two's Complement Calculator
- Parity Bit Calculator
- Hamming Code Calculator
- Truth Table Generator
- Karnaugh Map Solver
- Gray Code Converter
- Bitwise Calculator
- Bit Shift Calculator
Enter your values to get the result with the formula, substituted values and an explanation of each step.