Advertisements

headerup to 320x100 / 728x90

Logic Gate Calculator

Compute AND, OR, XOR, NAND, NOR, XNOR, and NOT of binary values with truth-table style output

Gate:
Input
Loading editor...
Output

Output will appear here...

Advertisements

content bottomup to 300x250

What is Logic Gate Calculator

Last reviewed:

Binary (base 2) is the number system computers use natively, where every value is represented with combinations of 0 and 1.

Logic Gate Calculator performs bitwise logic operations on two binary numbers (or one for NOT). Supported gates: AND, OR, XOR, NAND, NOR, XNOR, and NOT. Results are shown in binary, decimal, and hexadecimal.

It's ideal for digital-logic classrooms, FPGA prototyping, low-level debugging, and quick verification of hardware truth tables.

Why use it

  • Verify digital-logic homework in seconds.
  • Prototype FPGA / Verilog expressions.
  • Debug bitmask flags in embedded firmware.
  • Teach truth tables with worked examples.
  • Convert gate results to hex for register writes.

Features

  • AND, OR, XOR, NAND, NOR, XNOR, NOT
  • Binary, decimal, and hex output
  • Arbitrary-width BigInt support
  • Local-only Logic Gate processing keeps data in-browser
  • Zero-padded to first operand's width

How to use Logic Gate Calculator

  1. Pick gate. Select AND, OR, XOR, NAND, NOR, XNOR, or NOT.
  2. Enter binary operands. Separate two operands with a space (or one for NOT).
  3. Run. Read binary, decimal, and hex output.

Example (before/after)

Input

1101 1011

AND result

Gate: AND
Binary: 1001
Decimal: 9
Hex: 0x9

Common errors

Different operand widths

Shorter operands are zero-padded to the first operand's width.

Fix: Write operands with the same number of bits for predictable output.

Non-binary characters

Only 0 and 1 are allowed.

Fix: Strip any spaces or separators before pasting.

FAQ

Which gates are supported?

AND, OR, XOR, NAND, NOR, XNOR, and NOT.

How do I run NOT?

Select NOT in the gate selector and provide a single binary operand.

What's the maximum width?

Thanks to BigInt, you can work with arbitrarily large binary numbers.

Does it show hex and decimal?

Yes — binary, decimal, and hexadecimal outputs are shown together.

Is input uploaded?

No — the calculator runs entirely in your browser.