Introduction
A binary calculator is a tool that helps you work with binary numbers — the base-2 number system that uses only 0s and 1s. Computers use binary to store and process all data, which makes understanding it an important part of learning how numbers work across different systems.
This binary calculator has two modes. The Converter lets you switch numbers between binary, decimal, hexadecimal, and octal. Just pick a conversion direction, type in your number, and get instant results in all four number bases at once. It also shows you the step-by-step math so you can see exactly how each conversion works.
The Calculator mode lets you perform operations directly on binary numbers. You can add, subtract, multiply, and divide, as well as use bitwise operations like AND, OR, XOR, and NOT. It also supports left and right bit shifting. Every result is displayed in binary, decimal, hexadecimal, and octal, with full working steps shown below.
Whether you are a student learning about number systems, a programmer working with low-level data, or just curious about how binary math works, this tool gives you fast answers and clear explanations in one place.
How to Use Our Binary Calculator
This binary calculator has two modes: a Converter that changes numbers between binary, decimal, and hexadecimal, and a Calculator that performs math and logic operations on binary numbers. Enter your values, and the tool will show the result in multiple number formats along with step-by-step work.
Mode Selection: Click the "Converter" tab to switch between number systems, or click the "Calculator" tab to perform operations on binary numbers.
Converter Mode
Conversion Direction: Pick which type of conversion you want to do. You can choose from Binary to Decimal, Decimal to Binary, Binary to Hex, Hex to Binary, Decimal to Hex, or Hex to Decimal. For dedicated hexadecimal work, you can also try our Hex Calculator.
Input Value: Type the number you want to convert into the input field. Use only 0s and 1s for binary, digits 0 through 9 for decimal, or 0 through 9 and A through F for hexadecimal. The label above the field will tell you what format to use based on the direction you picked.
Convert Button: Click "Convert" to see your result. The tool will display the converted value along with the number shown in all four formats — binary, decimal, hexadecimal, and octal — plus a step-by-step breakdown of how the conversion was done.
Calculator Mode
Select Operation: Choose the math or logic operation you want to perform from the dropdown menu. Arithmetic options include Add, Subtract, Multiply, Divide, Modulo, and Exponentiation. Bitwise options include AND, OR, XOR, and NOT. You can also choose Left Shift or Right Shift. If you need a dedicated tool for modulo operations, check out our Modulo Calculator, or use our Exponent Calculator for exponentiation in decimal.
Operand 1 (Binary): Enter your first binary number using only 0s and 1s. The tool will show its decimal value beneath the field so you can double-check your input.
Operand 2 (Binary or Decimal): Enter your second binary number for most operations. If you chose a shift operation, enter a decimal number for the shift amount instead. If you chose NOT, this field will be hidden since NOT only needs one number.
Calculate Button: Click "Calculate" to see the answer. The result will appear in binary, decimal, hexadecimal, and octal formats, along with a detailed step-by-step explanation of how the operation was carried out. You can use the "Copy" button to copy the binary result to your clipboard.
Understanding Binary and Number Systems
Binary is a number system that uses only two digits: 0 and 1. It is also called the base-2 system. Every number you see on a computer screen is stored and processed as binary deep inside the machine. This makes binary one of the most important number systems in math and technology.
How Number Systems Work
In everyday life, we use the decimal system (base-10), which has ten digits: 0 through 9. Each digit's position represents a power of 10. For example, in the number 170, the 1 stands for 1 × 100, the 7 stands for 7 × 10, and the 0 stands for 0 × 1. Working with percentages and decimal-to-fraction conversions also relies on understanding this positional system.
Binary works the same way, but each position represents a power of 2 instead of 10. The binary number 10101010 breaks down like this:
- 1 × 128 = 128
- 0 × 64 = 0
- 1 × 32 = 32
- 0 × 16 = 0
- 1 × 8 = 8
- 0 × 4 = 0
- 1 × 2 = 2
- 0 × 1 = 0
Add those up and you get 170 in decimal.
Other Common Number Systems
Hexadecimal (base-16) uses 16 symbols: 0–9 and A–F. The letters A through F stand for the values 10 through 15. Programmers use hexadecimal because it is a shorter way to write binary numbers. Every group of four binary digits equals exactly one hex digit. For instance, 10101010 in binary equals AA in hexadecimal. Our Hex Calculator is a handy companion for working directly with hexadecimal values.
Octal (base-8) uses digits 0 through 7. Each group of three binary digits equals one octal digit. While less common today, octal still appears in some computing contexts like file permissions.
Binary Arithmetic and Bitwise Operations
You can add, subtract, multiply, and divide binary numbers just like decimal numbers. The rules are simpler because there are only two digits. For example, 1 + 1 in binary equals 10 (which is 2 in decimal), because you carry a 1 to the next position.
Bitwise operations work on individual bits. AND returns 1 only when both bits are 1. OR returns 1 when at least one bit is 1. XOR returns 1 when exactly one bit is 1. NOT flips every bit, turning 0s into 1s and 1s into 0s. Bit shifting slides all the bits left or right by a set number of positions. A left shift by 1 doubles the value, and a right shift by 1 halves it (dropping any remainder).
Why Binary Matters
Computers use binary because their circuits have two states: on and off. Every file, image, video, and program on your device is ultimately a long string of 0s and 1s. Learning how to convert between binary, decimal, and hexadecimal helps you understand how computers store data, how colors are coded on websites, how IP addresses work, and how basic computer logic functions. If you work with networking, tools like our Subnet Calculator, CIDR Calculator, and Bandwidth Calculator put binary knowledge into practical use. For other foundational math concepts, explore our Scientific Notation Calculator, Log Calculator, and Fraction Calculator.