Logic Gate Calculator
Evaluate AND, OR, NOT, NAND, NOR, XOR, and XNOR gates and inspect the complete truth table.
Truth table
| Input A | Input B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
About logic gates
Logic gate examples
| Operation | Result | Explanation |
|---|---|---|
| AND with A = 1, B = 1 | 1 | Both inputs must be high for AND to be high. |
| OR with A = 0, B = 1 | 1 | At least one high input makes OR high. |
| XOR with A = 1, B = 0 | 1 | XOR is high because the inputs differ. |
| NAND with A = 1, B = 1 | 0 | NAND is the inverse of the AND result. |
How to use the logic gate calculator
- Choose one of the seven supported gate operations.
- Toggle input A and, for a two-input gate, input B between zero and one.
- Select Calculate output to evaluate the current binary inputs.
- Compare the result with every possible combination in the generated truth table.
Logic gate FAQ
What is the difference between OR and XOR?
OR is high when either input or both inputs are high. XOR is high only when exactly one input is high.
Why does a NOT gate have one input?
NOT performs unary inversion, so it needs only one binary value. An input of zero becomes one, and an input of one becomes zero.
What is a universal logic gate?
A universal gate can be combined with copies of itself to implement every Boolean function. Both NAND and NOR have this useful property.
What does a truth table show?
A truth table enumerates all possible input combinations and their outputs. It is a direct way to define and verify the behavior of a digital function.
Are zero and one actual circuit voltages?
They represent low and high logic ranges rather than exact universal voltages. The valid ranges depend on the logic family, supply voltage, and device data sheet.