Online Bitwise Operations Calculator

Perform binary bitwise computations on integer values. Convert and evaluate AND, OR, XOR, NOT bitwise logic, and shifts across decimal, binary, and hexadecimal formats.

Bit width representation
2

* Negative numbers are shown in two's complement representation

OperationDecimalHEXBinary
A420x2A0010 1010
B250x190001 1001
AND — Bitwise AND (A & B)80x080000 1000
OR — Bitwise OR (A | B)590x3B0011 1011
XOR — Bitwise exclusive OR (A ^ B)510x330011 0011
NOT A — Bitwise inversion (~A)-430xD51101 0101
NOT B — Bitwise inversion (~B)-260xE61110 0110
Left Shift (A << N)1680xA81010 1000
Sign-propagating Right Shift (A >> N)100x0A0000 1010
Zero-fill Right Shift (A >>> N)100x0A0000 1010

How to use

  1. Input integer operands in decimal, binary, or hexadecimal notation.
  2. Choose bitwise logic operator (AND, OR, XOR, NOT, shifts << >>).
  3. View multi-radix outputs in binary (BIN), decimal (DEC), and hex (HEX).

Bitwise Calculation Examples

For integers 12 (1100₂) and 10 (1010₂):

AND (12 & 10) = 8 (1000₂)

OR (12 | 10) = 14 (1110₂)

XOR (12 ^ 10) = 6 (0110₂)

NOT (~12) = depends on bit-depth (-13 in standard 32-bit two's complement).

Calculation Methodology

Bitwise logic applies Boolean operations individually to each paired bit position. AND outputs 1 if both bits are 1; OR outputs 1 if either bit is 1; XOR outputs 1 if bits differ.

Frequently Asked Questions

What are bitwise operations?

Operators that manipulate individual binary digits (bits) of computer data directly.

Where are AND, OR, and XOR applied?

In embedded systems, cryptographic hashing, bitmask manipulation, and hardware-level computing.

How do bitwise operators differ from logical operators?

Bitwise operators evaluate every bit across an integer word, whereas logical operators (&&, ||) yield a single Boolean true/false.

Why does the NOT operation produce negative numbers?

Because modern computers store signed integers using two's complement representation.

Related Tools