AND Gate Calculator
The output is 1 only when both inputs are 1.
| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Math Calculators
Use these logic gate calculators to test binary inputs and understand how AND, OR, NOT, NAND, NOR, XOR, and XNOR gates work. This page also includes truth tables, logic gate explanations, a figure, and reference links for learning digital logic.
Go to the AND calculator and truth table.
Go to the OR calculator and truth table.
Go to the NOT calculator and truth table.
Go to the NAND calculator and truth table.
Go to the NOR calculator and truth table.
Go to the XOR calculator and truth table.
Go to the XNOR calculator and truth table.
The figure below shows common logic gate symbols. These gates are the building blocks of digital circuits, processors, memory systems, and control hardware.
The output is 1 only when both inputs are 1.
| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
The output is 1 when at least one input is 1.
| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
The output is the opposite of the input.
| A | Output |
|---|---|
| 0 | 1 |
| 1 | 0 |
The output is 0 only when both inputs are 1.
| A | B | Output |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
The output is 1 only when both inputs are 0.
| A | B | Output |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
The output is 1 when the two inputs are different.
| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
The output is 1 when the two inputs are the same.
| A | B | Output |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Logic gates are small electronic decision units that accept binary input values and return a binary output. In digital electronics, an input of 0 usually represents false or low, while an input of 1 represents true or high. By combining gates, engineers build processors, memory chips, control systems, and embedded devices.
An AND gate produces 1 only when every input is 1. It is used when two or more conditions must be true at the same time.
An OR gate produces 1 when any input is 1. It is useful when any one of several conditions should activate an output.
A NOT gate is an inverter. It flips the input, so 0 becomes 1 and 1 becomes 0.
A NAND gate is the opposite of an AND gate. It returns 0 only when all inputs are 1. NAND gates are especially important because complete digital circuits can be built from NAND gates alone.
A NOR gate is the opposite of an OR gate. It returns 1 only when all inputs are 0. Like NAND, NOR can also be used as a universal gate.
An XOR gate returns 1 when the inputs are different. It is commonly used in adders, parity checks, and comparison logic.
An XNOR gate returns 1 when the inputs match. It is often used in equality checking and digital comparison circuits.
A logic gate calculator helps students, engineers, and hobbyists verify outputs quickly without drawing every circuit by hand. It is useful for digital electronics homework, computer architecture basics, microcontroller projects, and interview preparation.
After testing a logic gate calculator, many students move to the Boolean algebra calculators to simplify expressions, the Karnaugh map calculators to minimize SOP and POS forms, the flip-flop and sequential logic calculators to study memory elements, and the code conversion calculators for binary, Gray code, BCD, and ASCII conversion tasks.
Learn more from Logic gate, AND gate, XOR gate, and Encyclopaedia Britannica on logic gates.