Bitwise Calculator

Perform bitwise operations on integers including AND, OR, XOR, NOT, left shift, and right shift. See the binary representation of inputs and outputs. Essential for low-level programming, embedded systems, graphics programming, and understanding computer architecture.

Bitwise Calculator

Operation Reference

AND (&)

1 & 1 = 1, all others = 0

12 & 10 = 8

OR (|)

0 | 0 = 0, all others = 1

12 | 10 = 14

XOR (^)

Different bits = 1, same = 0

12 ^ 10 = 6

NOT (~)

Flips all bits

~12 = -13

Left Shift (<<)

Shifts bits left, fills with 0

5 << 2 = 20

Right Shift (>>)

Shifts bits right, preserves sign

20 >> 2 = 5

FAQ

What are bitwise operations?

Bitwise operations manipulate individual bits of numbers. AND (&) returns 1 only if both bits are 1. OR (|) returns 1 if either bit is 1. XOR (^) returns 1 if bits differ. NOT (~) flips all bits.

What are bit shift operations?

Left shift moves bits left, filling with zeros (effectively multiplying by 2 per shift). Right shift moves bits right (dividing by 2 per shift). These are faster than multiplication/division.

Where are bitwise operations used?

Common uses include setting/clearing flags, permissions systems, graphics and image processing, network protocols, compression algorithms, cryptography, and optimizing performance-critical code.

Related Tools