Numbers Converter

Convert between different number systems including decimal, binary, octal, and hexadecimal.

Result

10 (Decimal (Base-10)) = 1010 (Binary (Base-2))

Complete Guide to Number System Conversion

Number system conversion is fundamental to computer science, programming, mathematics, electronics, and digital technology. Understanding how to convert between different number bases like binary (Base-2), octal (Base-8), decimal (Base-10), hexadecimal (Base-16), and even higher bases enables you to work effectively with computers, encode data, understand file permissions, manipulate colors, and solve complex mathematical problems. This comprehensive guide explains positional notation, the most common number systems, and provides clear methods for converting between any number base.

Understanding Positional Number Systems

A positional number system expresses numbers using a finite set of digits, where each digit's position determines its value based on powers of the base. The base (or radix) is the number of unique digits used, including zero. In Base-10 (decimal), we use digits 0-9. In Base-2 (binary), we use 0 and 1. In Base-16 (hexadecimal), we use 0-9 and A-F (representing 10-15). Higher bases like Base-36 use 0-9 and A-Z. Each position represents a power of the base, with the rightmost position being the base raised to the power of 0, the next position base to the power of 1, and so on. For example, in decimal, 123 means 1×10² + 2×10¹ + 3×10⁰ = 100 + 20 + 3 = 123.

Binary (Base-2) Number System

Binary is the foundation of all digital computing. It uses only two digits: 0 and 1, representing "off" and "on" states in electronic circuits. Binary is fundamental to computer processors, memory, storage, and digital communication. Each binary digit is called a bit, and 8 bits form a byte. Binary to decimal conversion involves multiplying each bit by its corresponding power of 2 and summing the results. For example, binary 1011 = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11 (decimal). Binary is essential for understanding how computers store and process information, perform arithmetic operations, and represent data.

Decimal (Base-10) Number System

Decimal is the most familiar number system, using digits 0-9. It's the standard system for everyday mathematics, commerce, and human communication. Decimal is thought to have originated from counting with ten fingers. Converting decimal to other bases involves repeatedly dividing by the target base and collecting remainders from right to left. For example, converting 10 (decimal) to binary: 10 ÷ 2 = 5 remainder 0, 5 ÷ 2 = 2 remainder 1, 2 ÷ 2 = 1 remainder 0, 1 ÷ 2 = 0 remainder 1, reading remainders bottom to top gives binary 1010. Decimal serves as the intermediate step when converting between any two number bases.

Hexadecimal (Base-16) Number System

Hexadecimal uses 16 digits: 0-9 and A-F (where A=10, B=11, C=12, D=13, E=14, F=15). It's widely used in programming, web development, digital electronics, and system administration. Hexadecimal is particularly useful because each hexadecimal digit represents exactly 4 binary bits, making binary-to-hex conversions straightforward. For example, binary 1111 = 15 (decimal) = F (hex), and binary 1010 = 10 (decimal) = A (hex). Memory addresses, color codes (like #FF0000 for red), MAC addresses, and Unicode values are commonly expressed in hexadecimal. In programming languages, hex values are often prefixed with 0x (e.g., 0xFF) or suffixed with h (e.g., FFh).

Octal (Base-8) Number System

Octal uses digits 0-7. It was historically important in computing when systems processed data in 6-bit groups (two octal digits). Today, octal is primarily used for Unix/Linux file permissions (chmod commands), where three octal digits represent read, write, and execute permissions for owner, group, and others. For example, octal 755 represents permissions rwxr-xr-x. Octal is also used in some programming contexts and embedded systems. Converting octal to binary is simple: each octal digit maps directly to three binary bits. Octal 7 = binary 111, octal 5 = binary 101.

Higher Number Bases (Base-2 to Base-36)

Our converter supports all number bases from Base-2 to Base-36. Bases higher than 16 use letters A-Z to represent values 10-35. Base-32 and Base-36 are particularly useful: Base-32 is used in some encoding schemes (like base32 encoding), while Base-36 uses all digits 0-9 and letters A-Z, maximizing information density for alphanumeric strings. Base-12 (duodecimal) has historical significance with its many divisors. Base-20 (vigesimal) was used by the Maya civilization. Base-3 (ternary), Base-4 (quaternary), and other bases have specialized applications in computer science, mathematics, and encoding systems. Converting between these bases follows the same positional notation principles: convert to decimal first, then convert to the target base.

Practical Applications of Number System Conversion

Number system conversions are essential in numerous fields. In programming, developers convert between decimal, binary, and hexadecimal when debugging, working with bitwise operations, or manipulating memory addresses. Web developers use hexadecimal for color codes (RGB colors like #FFFFFF for white). System administrators use octal for file permissions in Unix/Linux systems. Network engineers work with hexadecimal MAC addresses and IPv6 addresses. Cryptographers use various bases for encoding and encryption. Electronics engineers use binary and hexadecimal when designing digital circuits and microcontrollers. Understanding number base conversion enables professionals across technology, science, and engineering disciplines to work effectively with digital systems.

Conversion Algorithm

The standard algorithm for converting between number bases involves two steps: first, convert from the source base to decimal using positional value summation (multiply each digit by base^position and sum), then convert from decimal to the target base using repeated division (divide by target base, collect remainders from right to left). For bases above 10, digits beyond 9 use letters A-Z. Our converter implements this algorithm accurately for all bases from 2 to 36, handling positive integers and providing instant, accurate conversions between any supported number systems.

Quick Conversion Examples

Binary to Decimal

  • • 0 (binary) = 0 (decimal)
  • • 1 (binary) = 1 (decimal)
  • • 10 (binary) = 2 (decimal)
  • • 11 (binary) = 3 (decimal)
  • • 100 (binary) = 4 (decimal)
  • • 1010 (binary) = 10 (decimal)
  • • 1111 (binary) = 15 (decimal)
  • • 10000 (binary) = 16 (decimal)
  • • 11111111 (binary) = 255 (decimal)

Decimal to Binary

  • • 0 (decimal) = 0 (binary)
  • • 1 (decimal) = 1 (binary)
  • • 2 (decimal) = 10 (binary)
  • • 5 (decimal) = 101 (binary)
  • • 10 (decimal) = 1010 (binary)
  • • 16 (decimal) = 10000 (binary)
  • • 255 (decimal) = 11111111 (binary)
  • • 256 (decimal) = 100000000 (binary)

Hexadecimal to Decimal

  • • 0 (hex) = 0 (decimal)
  • • A (hex) = 10 (decimal)
  • • F (hex) = 15 (decimal)
  • • 10 (hex) = 16 (decimal)
  • • FF (hex) = 255 (decimal)
  • • 100 (hex) = 256 (decimal)
  • • FFF (hex) = 4095 (decimal)
  • • FFFF (hex) = 65535 (decimal)

Decimal to Hexadecimal

  • • 10 (decimal) = A (hex)
  • • 15 (decimal) = F (hex)
  • • 16 (decimal) = 10 (hex)
  • • 255 (decimal) = FF (hex)
  • • 256 (decimal) = 100 (hex)
  • • 1000 (decimal) = 3E8 (hex)
  • • 4095 (decimal) = FFF (hex)

Octal Conversions

  • • 7 (octal) = 7 (decimal) = 111 (binary)
  • • 10 (octal) = 8 (decimal) = 1000 (binary)
  • • 64 (octal) = 52 (decimal) = 110100 (binary)
  • • 777 (octal) = 511 (decimal) = 111111111 (binary)

Binary to Hexadecimal

  • • 1010 (binary) = A (hex)
  • • 1111 (binary) = F (hex)
  • • 10101010 (binary) = AA (hex)
  • • 11111111 (binary) = FF (hex)
  • • 10000000 (binary) = 80 (hex)

Number System Conversion Table

DecimalBinaryOctalHexadecimalBase-36
00000
11111
210222
810001088
10101012AA
15111117FF
16100002010G
25511111111377FF73
25610000000040010074
1000111110100017503E8RS

Frequently Asked Questions (FAQ)