Binary Calculator

Binary (base 2) is the foundational number system of all digital computing, using only the digits 0 and 1. Every piece of data a computer processes, from text to video, is ultimately represented in binary. Binary arithmetic follows the same rules as decimal arithmetic but carries over at 2 instead of 10. For example, 1011 + 1101 = 11000 in binary (11 + 13 = 24 in decimal). This calculator provides binary arithmetic (addition, subtraction, multiplication, division) and base conversion between binary, decimal, hexadecimal, and octal.

Quick Answer

Binary 1011 + 1101 = 11000 (which is 24 in decimal). Binary 11111111 equals 255 in decimal and FF in hexadecimal.

Binary Arithmetic

Digits 0 and 1 only

Base Conversion

Type in any field to update all others

Common Examples

Input Result
1011 + 1101 11000 (decimal 24)
10000 - 0111 1001 (decimal 9)
110 * 101 11110 (decimal 30)
Binary 11111111 Decimal 255, Hex FF, Octal 377
Binary 1010 Decimal 10, Hex A, Octal 12

How It Works

Binary Number System

Binary is a positional number system with base 2. Each digit (called a bit) is either 0 or 1. The value of a binary number is calculated by multiplying each bit by 2 raised to its positional power (starting from 0 on the right):

value = b(n) x 2^n + b(n-1) x 2^(n-1) + … + b(1) x 2^1 + b(0) x 2^0

For example, binary 1011 = 1 x 2^3 + 0 x 2^2 + 1 x 2^1 + 1 x 2^0 = 8 + 0 + 2 + 1 = 11 in decimal.

Binary Arithmetic

Addition: Follows the same column-by-column approach as decimal addition, but carries at 2 instead of 10. The key rules are: 0+0=0, 0+1=1, 1+0=1, 1+1=10 (write 0, carry 1).

Subtraction: Borrows at 2 instead of 10. The key rules are: 0-0=0, 1-0=1, 1-1=0, 10-1=1 (borrow from the next column).

Multiplication: Works like long multiplication in decimal. Multiply by each bit of the second number and shift left for each position, then add the partial products.

Division: Integer division, returning the whole-number quotient. Works like long division in decimal but with base 2.

Worked Example

To add binary 1011 and 1101: start from the rightmost column. 1+1=10, write 0, carry 1. 1+0+1(carry)=10, write 0, carry 1. 0+1+1(carry)=10, write 0, carry 1. 1+1+1(carry)=11, write 11. Result: 11000. Verification: 11 + 13 = 24, and binary 11000 = 16 + 8 = 24.

To convert binary 1010 to decimal: 1 x 8 + 0 x 4 + 1 x 2 + 0 x 1 = 10. To hex: 10 in decimal = A in hex. To octal: 10 / 8 = 1 remainder 2, so octal 12.

Related Calculators

Frequently Asked Questions

Why do computers use binary?
Computers use binary because digital circuits have two reliable states: on (1) and off (0), represented by high and low voltage levels. This two-state system is simple, reliable, and resistant to electrical noise. All complex operations, from arithmetic to displaying images, are built from combinations of these binary states.
What is a bit and what is a byte?
A bit (binary digit) is the smallest unit of data, representing a single 0 or 1. A byte is a group of 8 bits, capable of representing 256 different values (from 00000000 to 11111111, or 0 to 255 in decimal). Larger units include kilobytes (1,024 bytes), megabytes, and gigabytes.
How do I convert decimal to binary?
Repeatedly divide the decimal number by 2 and record each remainder. Then read the remainders from bottom to top. For example, 13 / 2 = 6 remainder 1, 6 / 2 = 3 remainder 0, 3 / 2 = 1 remainder 1, 1 / 2 = 0 remainder 1. Reading bottom-to-top: 1101.
Can binary numbers be negative?
In pure binary, all numbers are non-negative. Computers represent negative numbers using two's complement, where the leftmost bit acts as a sign bit. In an 8-bit two's complement system, 11111111 represents -1 rather than 255. This calculator works with unsigned (non-negative) binary values.
What is the relationship between binary and hexadecimal?
Each hexadecimal digit maps to exactly 4 binary digits (bits). For example, hex F = binary 1111 and hex A = binary 1010. This makes hex a compact shorthand for binary data. One byte (8 bits) is always represented by exactly two hex digits, which is why hex is commonly used for memory addresses and color codes.