Binary Calculator

Convert between binary, decimal, octal, and hexadecimal. Perform binary arithmetic and bitwise operations (AND, OR, XOR, NOT).

Formula:Binary = Σ(digit × 2^position)

Conversions

Binary

1010

Decimal10
Octal12
HexadecimalA

Mode

Input Base

Valid characters: 0-1

Value to Convert

Conversion Results

Binary (Base 2)

1010

Decimal (Base 10)

10

Octal (Base 8)

12

Hexadecimal (Base 16)

A

Binary Position Values

Position76543210
Power of 22^72^62^52^42^32^22^12^0
Decimal Value1286432168421

Example: 11001010 = 128 + 64 + 8 + 2 = 202

Common Conversions

DecimalBinaryOctalHex
0000
1111
21022
410044
81000108
10101012A
15111117F
16100002010
321000004020
64100000010040
100110010014464
1281000000020080
25511111111377FF
256100000000400100

Conversions

Binary

1010

Decimal10
Octal12
HexadecimalA

?How to Convert Binary Numbers

To convert binary to decimal, multiply each binary digit (0 or 1) by its positional power of 2 (right to left: 1, 2, 4, 8, 16...) and sum the results. For example, binary 1101 = 1x8 + 1x4 + 0x2 + 1x1 = 13 decimal. To convert decimal to binary, repeatedly divide by 2 and read remainders bottom-to-top.

What is Binary?

Binary is a base-2 number system that uses only two digits: 0 and 1. Each position in a binary number represents a power of 2, making it the fundamental language of computers and digital electronics. Binary arithmetic and conversions are essential for programming, computer science, and understanding how digital systems process information.

Key Facts About Binary Numbers

  • Binary (base-2) uses only digits 0 and 1; each position represents a power of 2
  • Binary to decimal: multiply each digit by 2^position and sum (1011 = 8+0+2+1 = 11)
  • Decimal to binary: divide by 2 repeatedly, collect remainders bottom-to-top
  • 4 binary digits = 1 hexadecimal digit (1111 = F, 1010 = A)
  • Bitwise AND: returns 1 only if both bits are 1
  • Bitwise OR: returns 1 if either bit is 1
  • Bitwise XOR: returns 1 if exactly one bit is 1
  • Computers use binary because circuits have two states: on (1) and off (0)

Quick Answer

To convert binary to decimal, multiply each binary digit (0 or 1) by its positional power of 2 (right to left: 1, 2, 4, 8, 16...) and sum the results. For example, binary 1101 = 1x8 + 1x4 + 0x2 + 1x1 = 13 decimal. To convert decimal to binary, repeatedly divide by 2 and read remainders bottom-to-top.

Frequently Asked Questions

Binary is a base-2 number system using only 0 and 1. Each position represents a power of 2. For example, 1011 in binary = 1×8 + 0×4 + 1×2 + 1×1 = 11 in decimal. Computers use binary because electronic circuits have two states: on (1) and off (0).
Multiply each binary digit by its positional power of 2 (right to left: 1, 2, 4, 8, 16...) and sum the results. Example: 1101 = 1×8 + 1×4 + 0×2 + 1×1 = 8 + 4 + 0 + 1 = 13.
Repeatedly divide by 2 and collect remainders from bottom to top. Example: 13 ÷ 2 = 6 R1, 6 ÷ 2 = 3 R0, 3 ÷ 2 = 1 R1, 1 ÷ 2 = 0 R1. Reading remainders upward: 1101.
Bitwise operations compare bits position by position. AND: both must be 1 to get 1. OR: either can be 1 to get 1. XOR: exactly one must be 1 to get 1. NOT: flips each bit. These are fundamental to computer logic and programming.
Hexadecimal (hex) is base-16 using digits 0-9 and letters A-F (10-15). It's compact for representing binary (4 binary digits = 1 hex digit). Used for colors (#FF0000 = red), memory addresses, and programming. 255₁₀ = FF₁₆ = 11111111₂.

Last updated: 2025-01-15