Binary and Hex Calculator
Add, subtract, multiply, and divide binary or hex numbers, or use AND, OR, XOR, and bit shifts, and see the answer in four bases.
Runs on your device.
Numbers are whole and can be any size. Division rounds toward zero. Bit operations use two's complement for negative numbers.
How to Use It
- Choose the input base.
- Enter the two numbers and the operation.
- Copy the answer in any base.
Questions and Answers
What does XOR do?
Each bit of the answer is 1 only when the two input bits differ. 1100 XOR 1010 is 0110.
Good to Know
Whole numbers only; floating point is not supported. Division rounds toward zero. There is no fixed bit width (8, 16, 32 bits).