Skip to content
digiwleeaTools
LearnGlossaryAboutCheat sheetHow a CPU worksBuild a CPUToolsOpen the lab →

AND gate: truth table and symbol

An AND gate is a logic gate that outputs 1 only when both inputs are 1, and 0 otherwise. Here are its symbol, its full truth table, the boolean expression, and how it is actually built.

The AND gate symbol: a D shape, flat on the input side and round on the output side, with the inputs on the left and the output on the right.

AND gate truth table

ABY
000
010
100
111

Boolean expression: Y = A · B. A 1 in the table means a high voltage (logic true) and a 0 means low (false). Read each row as: for these inputs, the output Y is this value.

Try the AND gate live

Click A and B to toggle them and watch Y follow the table above. It runs the real simulator, and every row is checked before the page is built.

Embed or cite this circuit

Free to embed on a course page, blog or worksheet: paste this code. The circuit stays live, and the small digiwleea badge links back here.

To cite it: digiwleea, “AND gate”, https://digiwleea.wleeaf.dev/tools/truth-tables/and/

3-input AND gate truth table

ABCY
0000
0010
0100
0110
1000
1010
1100
1111

A 3-input AND gate outputs 1 only when all three inputs are 1, so seven of the eight rows give 0.

4-input AND gate truth table

ABCDY
00000
00010
00100
00110
01000
01010
01100
01110
10000
10010
10100
10110
11000
11010
11100
11111

A 4-input AND gate outputs 1 only when all four inputs are 1 (the 1111 row), so 15 of the 16 rows give 0.

What the AND gate does

AND is logical multiplication: the output is the product of the inputs, so it is 1 only when every input is 1. In CMOS it is built as a NAND gate followed by an inverter, because the natural pull-down network gives you the inverted form for free.

Build it yourself

Reading a table is one thing; watching the signals flow is another. Open the logic gate simulator and wire an AND gate up from transistors, or read how the AND gate works in CMOS and how gates are designed. You can also generate the table for any expression with the truth table generator.

On a breadboard, four AND gates come in one chip, the 7408 (74LS08, 74HC08): see its pinout and try every gate live. For three inputs there is the 7411, and the CMOS CD4081 runs from 3 V to 18 V.

Other gates (or all seven symbols and truth tables on one page):

The AND gate is one small step toward a working CPU. Build every gate from CMOS transistors and work up to an 8-bit processor in the free digiwleea lab, with the free theory reference alongside.

Open the gate simulator →

Frequently asked

What is an AND gate?

An AND gate is a logic gate that outputs 1 only when both inputs are 1, and 0 otherwise.

What is the truth table of an AND gate?

The AND gate outputs 1 only when both inputs are 1, and 0 otherwise. For inputs (A,B) the outputs are 0,0→0 0,1→0 1,0→0 1,1→1.

What does the AND gate symbol look like?

It is drawn as a D shape, flat on the input side and round on the output side, with the inputs on the left and the output on the right.

What is the truth table of a 3-input AND gate?

A 3-input AND gate outputs 1 only when all three inputs are 1, so seven of the eight rows give 0.

What is the truth table of a 4-input AND gate?

A 4-input AND gate outputs 1 only when all four inputs are 1 (the 1111 row), so 15 of the 16 rows give 0.

What is the boolean expression for AND?

The AND gate is written Y = A AND B (symbolically Y = A · B).

How many transistors does an AND gate take?

A standard CMOS AND gate uses 6 transistors (a NAND gate followed by an inverter). In digiwleea you build it from transistors and the simulator verifies it against this exact truth table.

Which IC is an AND gate?

The 7408 (74LS08, 74HC08) chip holds four AND gates in one 14-pin package; its pinout runs live on the 7408 page.

What is an example of an AND gate?

A machine that runs only while both of its safety guards are closed: each guard switch is an input, and the motor enable is the output. AND is also used to mask bits, keeping only those where the mask is 1.