Logic Gate Calculator

Evaluate AND, OR, NOT, NAND, NOR, XOR, and XNOR gates and display the matching truth table.

918.6K uses Updated · 2026-05-21 Runs locally · zero upload
AD

How to Use Logic Gate Calculator

  • Select the gate type first. NOT uses one input; the other common gates use A and B.
  • Enter each input as 0, 1, true, or false. Mixed formats are accepted as long as each value clearly maps to Boolean false or true.
  • Read the highlighted output as both binary and Boolean text.
  • Use the truth table card to compare the selected input with every possible input combination for that gate.

Formula & Theory - Logic Gate Calculator

AND: A · B
OR: A + B
NOT: ¬A
NAND: ¬(A · B)
NOR: ¬(A + B)
XOR: A ⊕ B
XNOR: ¬(A ⊕ B)

Logic gates operate on Boolean values, so the calculator converts 0 and false to false, and 1 and true to true.

NAND and NOR are inverted forms of AND and OR. XOR is true only when the two inputs differ, while XNOR is true only when they match.

The truth table is generated from the same evaluation function as the main result, which keeps the selected gate output and table consistent.

Use Cases for Logic Gate Calculator

  • Checking homework answers in introductory digital logic.
  • Explaining why XOR differs from OR in adders and parity circuits.
  • Quickly comparing NAND, NOR, and their non-inverted base gates.
  • Demonstrating one-input versus two-input Boolean operations.

Frequently asked questions about Logic Gate Calculator

What does Logic Gate Calculator calculate?

Evaluate AND, OR, NOT, NAND, NOR, XOR, and XNOR gates and display the matching truth table.

Can I use the result as a final design value?

Use it as a fast calculation or planning estimate. Engineering, finance, safety, and production decisions should still be checked against the relevant standard, data sheet, or professional review.

Is my data stored?

No. All calculations happen in your browser; nothing is sent to a server.