Binary Calculator with Steps
This binary calculator does arithmetic on base-2 numbers: enter two numbers, pick an operation, and the result appears at once in binary, decimal, hexadecimal and octal. For addition you see the written method with carries, for AND, OR and XOR the bits lined up one under the other.
Source: Wikipedia – Two’s complement (Zweierkomplement, Darstellung negativer ganzer Zahlen). Updated: .
How it is calculated
The binary system has only the digits 0 and 1, and arithmetic follows the same rules as in decimal, except that a carry already occurs at 1 + 1. Adding 1011 and 110 gives 10001, which is 11 + 6 = 17 in decimal. The calculator does the work and shows the decimal check alongside.
The operations
- Addition and subtraction: digit by digit from the right. 0+0=0, 0+1=1, 1+1=10 (zero, carry 1). The table shows the carry under each position.
- Multiplication and division: computed exactly, even for very large numbers up to 200 digits. Division shows quotient and remainder.
- AND, OR, XOR: these combine each bit separately: AND gives 1 only if both bits are 1, OR if at least one is 1, XOR if exactly one is 1.
- Shifts: shifting left by n places equals multiplying by 2 to the power n, shifting right equals integer division by 2 to the power n.
Negative numbers and two’s complement
Computers store negative integers in two’s complement: invert all bits and add 1. With 8 bits, −1 is therefore 1111 1111 and −128 is 1000 0000. The bit width decides which numbers can be represented (8 bits: −128 to 127 signed, 0 to 255 unsigned). To convert single numbers between systems, use the number base converter, and for text in zeros and ones the text to binary converter. Fractions with a binary point are not supported here; the calculator works with whole numbers.
Frequently asked questions
How do you add binary numbers?
Like column addition in decimal, from right to left: 0+0=0, 0+1=1, 1+1=10 (write 0, carry 1) and 1+1+1=11. Example: 1011 + 110 = 10001 (11 + 6 = 17).
How do you subtract binary numbers?
Either by column subtraction with borrowing or through two’s complement: add the two’s complement of the second number. The calculator gives the result directly, including negative ones, and shows it in two’s complement.
What do AND, OR and XOR mean?
They are bitwise operations. AND gives 1 if both bits are 1. OR gives 1 if at least one bit is 1. XOR gives 1 if the bits differ.
How does two’s complement work?
Invert all the bits of a number and add 1. That lets subtraction be written as addition. In 8 bits, −5 is 1111 1011.
Can the calculator handle binary fractions?
No, it works with whole numbers only. Binary fractional digits stand for 1/2, 1/4, 1/8 and so on; the number base converter handles those.
Sources and legal basis
- Wikipedia – Two’s complement (Zweierkomplement, Darstellung negativer ganzer Zahlen)
- Wikipedia – Binary number (Rechnen im Dualsystem: Addition, Multiplikation, Division)
- Wikipedia – Bitwise operation (AND, OR, XOR, Schiebeoperationen)
As of: · Editorial policy
Related tools
- Number base converter with stepsConvert between binary, octal, decimal, hex and any base from 2 to 36 – with full working, fractions, repeating digits and two’s complement (8–64 bit).
- Binary to decimal and decimal to binary converterBinary to decimal: add the powers of 2 where there is a 1, so 1011 = 11. Type bits for decimal, hex and octal, or go back from decimal, with the working.
- Hex to decimal and decimal to hex converterHex to decimal: multiply each digit by a power of 16, so FF = 255. Type hex for decimal, binary and octal, or go back from decimal, with the working.
- Text to binary converter (and binary to text)Convert text to binary, hex, decimal or octal and translate binary back to text – with UTF-8 for accents and emoji, right in your browser, nothing uploaded.
- Online CalculatorCalculator online, free and instant: type or tap and see the answer as you go – order of operations, brackets, percent, square root, steps and a history list.
- Number system conversion practice with answersNumber system conversion practice: binary, octal, decimal and hex problems to solve on screen and check, or print as a worksheet with an answer key.
- Interactive Periodic Table of the ElementsPeriodic table with all 118 elements: atomic mass, electron configuration, melting and boiling point. Search, temperature slider, colour modes, print to PDF.
- Double integral calculatorDouble integral calculator: integrate f(x, y) over rectangles, regions with curved limits or in polar coordinates – result, error estimate, area and average.
- Lakh to Million and Crore to Million / Billion ConverterLakh to million converter: change lakh and crore into million, billion and trillion or back, with Indian commas (1,00,000), the number in words and a table.