Technology · Tool #069

Bitwise Calculator

Compute AND, OR, XOR, NOT and shifts on 32-bit integers.

Reserved ad space · responsive display

Inputs

Compute AND, OR, XOR, NOT and shifts on 32-bit integers.

Result

Result
—

More Information

How to use this calculator

Explore operations on the binary representation of integers. Bitwise logic is used in flags, masks, permissions, embedded systems and low-level programming.

How the calculation works

AND sets a bit only when both inputs have 1; OR when either has 1; XOR when exactly one has 1. NOT flips bits within a chosen width. Left shifts move bits toward higher positions, while logical right shifts fill with zeros.

Worked example

With four-bit patterns 1100 (12) and 1010 (10), AND produces 1000 (8), OR produces 1110 (14), and XOR produces 0110 (6).

Understanding the result

View the same result in binary, decimal and hexadecimal to understand how bit positions correspond. Word size matters for NOT and for shifts that discard high bits.

Assumptions and limitations

Signed versus unsigned interpretation, fixed-width overflow and arithmetic versus logical shifts differ by programming language. Check the calculator’s chosen word size and supported input formats.

Frequently asked question

Why does NOT 0 depend on word size? Flipping eight zero bits yields 255, whereas flipping sixteen zero bits yields 65,535.

Reserved ad space · content placement