Binary Converter

Convert numbers between binary, decimal, hexadecimal, and octal number systems

Number System Converter

Range: -128 to 127

Only 0s and 1s allowed (spaces for formatting)

Use digits 0-9 and letters A-F

Only digits 0-7 allowed

Common Binary Conversions

DecimalBinaryHexOctal
00000 000000
10000 000111
20000 001022
40000 010044
80000 1000810
160001 00001020
320010 00002040
640100 000040100
1281000 000080200
2551111 1111FF377

Number Systems

Binary (Base 2)

Uses digits: 0, 1

Each position represents a power of 2

Decimal (Base 10)

Uses digits: 0-9

Standard numbering system

Hexadecimal (Base 16)

Uses digits: 0-9, A-F

Common in computer programming

Octal (Base 8)

Uses digits: 0-7

Used in some computer systems

Conversion Tips

Each binary digit represents a power of 2

Hexadecimal is base 16: A=10, B=11, C=12, D=13, E=14, F=15

Binary groupings of 4 bits equal 1 hex digit

Two's complement is used for negative binary numbers

Understanding Binary and Number Systems

What is the Binary System?

The binary system 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, starting from 2⁰ = 1 on the right.

Binary Example: 1101

  • 1 × 2³ = 1 × 8 = 8
  • 1 × 2² = 1 × 4 = 4
  • 0 × 2¹ = 0 × 2 = 0
  • 1 × 2⁰ = 1 × 1 = 1
  • Total: 8 + 4 + 0 + 1 = 13

Converting Decimal to Binary

To convert a decimal number to binary, repeatedly divide by 2 and track the remainders:

Example: Convert 19 to Binary

  • 19 ÷ 2 = 9 remainder 1
  • 9 ÷ 2 = 4 remainder 1
  • 4 ÷ 2 = 2 remainder 0
  • 2 ÷ 2 = 1 remainder 0
  • 1 ÷ 2 = 0 remainder 1
  • Result: 10011 (read remainders bottom to top)

Negative Numbers (Two's Complement)

To represent negative numbers in binary, we use two's complement:

  1. 1. Start with the positive binary representation
  2. 2. Invert all bits (one's complement)
  3. 3. Add 1 to get two's complement

Applications

  • Computer programming and data representation
  • Digital electronics and circuit design
  • Network addressing and subnetting
  • Computer graphics and image processing