Instant AND, OR, XOR, NOT & shift results in dec, hex, and binary
Inputs
Parsed values
Results
| Operation | Description | Value | |
|---|---|---|---|
| A AND B | 12 | ||
| A OR B | 61 | ||
| A XOR B | 49 | ||
| NOT A | 4294967235 | ||
| NOT B | 4294967282 | ||
| A << shift | 240 | ||
| A >> shift | 15 |
All formats — A AND B
The Bitwise Calculator lets developers instantly evaluate AND, OR, XOR, NOT, left shift, and right shift operations on any two integers. Results are displayed side-by-side in decimal, hexadecimal, and binary across 8, 16, 32, or 64-bit widths — making it easy to debug low-level code, write bitmasks, or understand flag registers without leaving your browser.
You can enter plain decimal integers (e.g. 60), hexadecimal with a 0x prefix (e.g. 0x3C), or binary with a 0b prefix (e.g. 0b111100). Negative numbers are supported for decimal input.
NOT inverts all bits within the selected bit width. For example, NOT 60 in 8-bit is ~0b00111100 = 0b11000011 = 195. The result is always masked to the chosen width (8, 16, 32, or 64 bits).
Bitwise operations are inherently width-dependent. A 32-bit NOT of 0 is 0xFFFFFFFF, while a 16-bit NOT of 0 is 0xFFFF. Choosing the correct width to match your target platform ensures accurate results.
Yes. Enter your bitmask as one value (e.g. 0xFF00) and a flag as the other, then read the AND result to test the flag, OR to set it, and XOR to toggle it. Results are shown in all three bases for easy copy-paste into code.