Bitwise Calculator Online

Perform AND, OR, XOR, NOT, left shift, right shift on binary, decimal, and hex numbers

Input numbers then select operation — result updates instantly. Supports binary (bin), decimal (dec), hexadecimal (hex).

Bitwise Operation Calculator

NOT operation uses only Number 1. Number 2 is ignored.
Result
19
dec: 19  |  bin: 10011  |  hex: 0x13
Binary (32-bit)
00000000 00000000 00000000 00010011
Octal
23
Decimal
19
Hexadecimal
0x13
Bit Visualization

AND (&)

Returns 1 only when both bits are 1. Useful for masking and clearing specific bits.

OR (|)

Returns 1 when either bit is 1. Used for setting specific bits in a value.

XOR (^)

Returns 1 when bits differ. Commonly used for toggling bits and parity checks.

NOT (~)

Flips all bits (one's complement). Turns 0 to 1 and 1 to 0 in the binary representation.

Left Shift (<<)

Shifts bits left, filling with zeros from the right. Equivalent to multiplying by 2^n.

Right Shift (>>)

Shifts bits right (sign-propagating). Equivalent to integer division by 2^n.

What Is a Bitwise Calculator?

A bitwise calculator is a tool that performs bit-level operations on binary numbers. Unlike a standard calculator that works with decimal numbers, a bitwise calculator operates on the individual bits (0s and 1s) that make up a number's binary representation. This makes it an essential tool for programmers, embedded systems engineers, and anyone working with low-level data manipulation.

Our free online bitwise calculator supports six operations: AND, OR, XOR, NOT, left shift, and right shift. You can enter numbers in binary, decimal, or hexadecimal format, and the result is displayed instantly in all three bases along with a full 32-bit binary representation. This multi-base display helps you understand exactly how each operation affects the bits.

Bitwise Operations Explained

AND (&) — Returns 1 only when both bits are 1. Commonly used for masking, where you want to extract or clear specific bits in a value. For example, 0xFF & value keeps only the lowest 8 bits.

OR (|) — Returns 1 when at least one bit is 1. Used for setting specific bits. For example, flags | 0x04 sets bit 2 without affecting other bits.

XOR (^) — Returns 1 when the two bits differ. Used for toggling bits and in cryptography, checksums, and parity calculations. XORing a value twice with the same key restores the original — a property used in many encryption algorithms.

NOT (~) — Flips all bits (one's complement). Every 0 becomes 1 and every 1 becomes 0. This operation is unary and operates on only one operand. In two's complement systems, ~x = -x - 1.

Left Shift (<<) — Shifts all bits to the left, filling with zeros from the right. Each shift left effectively multiplies the number by 2. Overflowing bits beyond 32 bits are discarded.

Right Shift (>>) — Shifts bits to the right (sign-propagating). Each shift right effectively divides the number by 2 (truncating toward negative infinity). For unsigned behavior, use AND to mask unwanted bits.

Who Uses a Bitwise Calculator?

Software developers use bitwise operations constantly in systems programming, game development, network protocol implementation, and performance-critical code. Bit manipulation allows packing multiple flags into a single integer, implementing efficient data structures like bitsets, and working with hardware registers.

Embedded systems engineers work with bitwise operations to configure microcontroller registers, set GPIO pin states, and implement communication protocols like I2C and SPI where individual bits control device behavior.

Computer science students learn bitwise operations as a fundamental part of digital logic, computer architecture, and algorithm design. Understanding how AND, OR, XOR, and shifts work at the bit level is essential for grasping topics like binary arithmetic, error detection, and data compression.

Security researchers use bitwise calculations when analyzing binary exploits, implementing cryptographic algorithms, and reverse-engineering software where understanding bit-level data layout is critical.

Why Use Our Bitwise Calculator?

  • Multi-base input — enter numbers in binary, decimal, or hex format. The tool auto-detects the base
  • Live multi-base output — results shown simultaneously in binary (32-bit), octal, decimal, and hex
  • Instant conversion — results update as you type, no button clicking required
  • 32-bit display — every result includes the formatted 32-bit binary representation for clarity
  • Works offline — no server calls, all computation is in-browser JavaScript

Hex to ASCII Converter →

Decode hex strings to readable text instantly

Programmer (64-bit) (64-bit) →

64-bit base conversion with BigInt precision

SHA256 Hash Generator →

Compute SHA-256 checksums in your browser

Programming (32-bit) →

Multi-base number converter for developers