Bitwise Calculator
Work out AND, OR, XOR, NOT and shifts on integers.
What it does
Works out bitwise operations such as AND, OR, XOR, NOT and bit shifts on whole numbers. Useful when working with flags, masks and low-level code. You see the result in decimal, binary and hex, with the bits lined up.
How to use the Bitwise Calculator
- Enter A and B in decimal, in hex with 0x or in binary with 0b.
- Pick the Operation; NOT uses only A, and shifts move A by B places.
- Choose the Width (8, 16, 32 or 64 bits) to match the type in your code.
- Press Calculate and read the result in binary, decimal and hex.
Related tools
More in Numbers
Number Base Converter
Convert a number between any bases from 2 to 36.
Binary to Decimal
Turn a binary number into decimal, with the working shown.
Hex to Decimal
Turn a hexadecimal number into decimal.
Decimal to Binary
Turn a decimal number into binary.
Decimal to Hex
Turn a decimal number into hexadecimal.
Roman Numerals
Convert numbers to Roman numerals and back.
Octal Converter
Convert octal numbers to decimal, binary and hex.
Number to Words
Write a number out in English words.
Bitwise Calculator questions
How do I use the Bitwise Calculator?
Enter the values in the fields of the tool and read the result below them.