Binary ↔ Decimal Converter

Online Binary & Decimal Converter

Our free online Binary Decimal Converter allows you to convert between binary, decimal, and hexadecimal number systems. Perfect for students learning computer science and developers working with low-level data.

Features:

  • Decimal to Binary: Convert base-10 numbers to binary representation.
  • Binary to Decimal: Convert binary numbers back to decimal.
  • Hex Conversion: Also supports decimal to hex and hex to decimal.
  • Large Numbers: Handles numbers up to JavaScript's safe integer limit.
  • Instant Results: Real-time conversion with no server requests.

1. Understanding Number Systems

Binary (Base 2): Uses only 0 and 1. Each position represents a power of 2.
Decimal (Base 10): Our everyday number system using 0-9.
Hexadecimal (Base 16): Uses 0-9 and A-F. Common in programming.

2. Binary Number System

Binary is the language of computers. Each binary digit (bit) can be 0 or 1. 8 bits make a byte, which can represent values from 0 to 255. Position values (right to left): 1, 2, 4, 8, 16, 32, 64, 128...

3. Converting Decimal to Binary

Method: Repeatedly divide by 2 and record remainders
Example: 13 → 13÷2=6 R1, 6÷2=3 R0, 3÷2=1 R1, 1÷2=0 R1
Read remainders bottom-up: 1101
Verify: 8+4+0+1 = 13 ✓

4. Converting Binary to Decimal

Method: Multiply each digit by its position value and sum
Example: 1101 → (1×8) + (1×4) + (0×2) + (1×1) = 13
Position values: 8, 4, 2, 1 (powers of 2)

5. Common Binary Values

1 byte (8 bits) max: 11111111 = 255
2 bytes (16 bits) max: 65,535
4 bytes (32 bits) max: 4,294,967,295
Powers of 2: 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024...


This number system converter helps students and developers work with binary and decimal numbers.

100% client-side processing with instant results.

Related Tools

hex-string-converter

base64-encoder-decoder

url-encoder-decoder

Deep Dive: Number Systems in Computing

Why Computers Use Binary:

• Electronic circuits have two states: on (1) and off (0)
• Simple to implement with transistors
• Resistant to electrical noise
• Boolean logic maps directly to binary
• All data (text, images, sound) is ultimately binary

Bits, Bytes, and Beyond:

Bit: Single binary digit (0 or 1)
Nibble: 4 bits (0-15, one hex digit)
Byte: 8 bits (0-255)
Word: Typically 16, 32, or 64 bits
Kilobyte: 1,024 bytes (2^10)

Binary Operations:

AND: 1 AND 1 = 1, all others = 0
OR: 0 OR 0 = 0, all others = 1
XOR: Different = 1, Same = 0
NOT: Inverts bits (0→1, 1→0)
Shift: Move bits left or right

Signed vs Unsigned Numbers:

Unsigned 8-bit: 0 to 255
Signed 8-bit (two's complement): -128 to 127
The leftmost bit indicates sign in signed numbers. Negative numbers use two's complement representation.