Advertisement

Logic gate calculator

Evaluate AND, OR, NOT, NAND, NOR, XOR and XNOR gates and inspect the complete truth table for the selected Boolean operation.

Calculator

Gate output
0.000000
Truth table
ABOutput
0.0000000.0000000.000000
0.0000001.0000000.000000
1.0000000.0000000.000000
1.0000001.0000001.000000

Advertisement

How this calculator works

Boolean gates map logical inputs to a single logical output. AND requires both inputs to be one, OR requires at least one, and XOR requires exactly one. NAND, NOR and XNOR invert the corresponding output. NOT has one input and reverses it. The table lists every input combination for the selected gate.

Formula

AND: A x B; OR: max(A,B); NOT: 1-A; XOR: (A+B) modulo 2. NAND, NOR and XNOR complement AND, OR and XOR.

Worked example

With A = 1 and B = 0, AND returns 0 while OR and XOR return 1. With A = B = 1, XOR returns 0 and XNOR returns 1.

Advertisement

Frequently asked questions

What does a logical 1 mean electrically?

It is the high logical state. The required voltage depends on the logic family and supply.

Why is input B hidden for NOT?

NOT is a unary operation; only A determines its output.

Does this simulate gate timing?

No. This is ideal Boolean logic without propagation delays, noise margins or undefined states.

Sources

Advertisement