This binary calculator is two tools in one: a number base converter that handles decimal, binary, hex, and octal, plus a binary math calculator for AND, OR, XOR, NOT, bit shifts, addition, and subtraction. Every result updates the moment you change an input, so you can use it as a binary to decimal calculator, a decimal to binary calculator, or a binary addition calculator without switching modes.
- Pick your starting base. In the Number Base Converter, click Decimal, Binary, Hexadecimal, or Octal. The tab you choose tells the converter how to read the digits you are about to type.
- Type the number. Enter 42 in decimal, 101010 in binary, 2A in hex, or 52 in octal. The converter rejects invalid digits (a 2 in binary, an 8 in octal, a G in hex) and shows an error instead of a wrong answer.
- Read the four outputs. Decimal, binary, hex, and octal forms of the same value appear in the result grid. Use these side by side to learn how to convert binary to decimal in your head or to sanity-check a value from a programming task.
- Switch to Binary Arithmetic when you need to perform math. Type Binary A (for example 1010), pick an operation, and if the operation needs two operands, type Binary B (for example 0110). The result appears in binary and decimal so you can cross-check the answer.
- Choose the operation. AND, OR, and XOR compare bits position by position. NOT flips every bit in Binary A. Left Shift and Right Shift move the bits of Binary A one place, multiplying or dividing by 2. ADD and SUBTRACT perform standard binary addition and subtraction.
The binary converter and arithmetic tool share the same page state, so you can copy a result out of one and paste it into the other. A common workflow is to convert a decimal number to binary, run a bitwise operation on it, then paste the binary result back into the converter to see the decimal and hex equivalents.