Number System Converter

Convert between binary, decimal, hexadecimal, and octal number systems. Enter a value in any format and see instant conversions.

How to use:

Enter a number in any format (binary, decimal, hexadecimal, or octal) and the converter will automatically show the equivalent values in all other number systems. Conversions happen in real-time as you type.

  • Binary: Only 0s and 1s (e.g., 10101010)
  • Decimal: Standard numbers 0-9 (e.g., 255)
  • Hexadecimal: 0-9 and A-F (e.g., FF, 1A3)
  • Octal: Only digits 0-7 (e.g., 377)

Published: December 2025 | Author: TriVolt Editorial Team | Last Updated: February 2026

Understanding Number Systems

Number systems are different ways of representing numeric values. While humans typically use decimal (base 10), computers and network systems use binary (base 2), hexadecimal (base 16), and octal (base 8) for various purposes. Understanding how to convert between these systems is essential for network engineers, programmers, and IT professionals.

Each number system uses a different base, which determines how many unique digits are available before needing to "carry over" to the next position. Converting between systems requires understanding the positional value of each digit and how to express the same quantity in different bases.

Number System Bases

Binary (Base 2)

Binary uses only two digits: 0 and 1. Each position represents a power of 2. This is the fundamental number system used by computers because digital circuits can easily represent two states (on/off, high/low). Binary is essential for understanding:

  • IP addresses and subnet masks
  • Bitwise operations
  • Memory addressing
  • Network protocols

Example: 1010โ‚‚ = 1ร—2ยณ + 0ร—2ยฒ + 1ร—2ยน + 0ร—2โฐ = 8 + 0 + 2 + 0 = 10โ‚โ‚€

Decimal (Base 10)

Decimal is the standard number system we use in everyday life, using digits 0-9. Each position represents a power of 10. This is the most intuitive system for humans and is commonly used for:

  • IP addresses in dotted decimal notation
  • Port numbers
  • General calculations
  • Human-readable values

Example: 255โ‚โ‚€ = 2ร—10ยฒ + 5ร—10ยน + 5ร—10โฐ = 200 + 50 + 5

Hexadecimal (Base 16)

Hexadecimal uses 16 digits: 0-9 and A-F (where A=10, B=11, C=12, D=13, E=14, F=15). Each position represents a power of 16. Hexadecimal is popular because:

  • It's compact (one hex digit = 4 binary bits)
  • Easy to convert to/from binary
  • Commonly used in memory addresses
  • Used in MAC addresses and IPv6

Example: FFโ‚โ‚† = 15ร—16ยน + 15ร—16โฐ = 240 + 15 = 255โ‚โ‚€

Octal (Base 8)

Octal uses digits 0-7. Each position represents a power of 8. While less common today, octal is still used for:

  • Unix/Linux file permissions
  • Historical computing systems
  • Some embedded systems
  • Educational purposes

Example: 377โ‚ˆ = 3ร—8ยฒ + 7ร—8ยน + 7ร—8โฐ = 192 + 56 + 7 = 255โ‚โ‚€

Conversion Methods

Decimal to Binary

Divide the decimal number by 2 repeatedly, keeping track of remainders. Read the remainders from bottom to top to get the binary representation.

Example: Convert 10 to binary

10 รท 2 = 5 remainder 0

5 รท 2 = 2 remainder 1

2 รท 2 = 1 remainder 0

1 รท 2 = 0 remainder 1

Result: 1010โ‚‚ (read remainders from bottom to top)

Binary to Decimal

Multiply each binary digit by its corresponding power of 2 and sum the results.

Example: Convert 1010 to decimal

1ร—2ยณ + 0ร—2ยฒ + 1ร—2ยน + 0ร—2โฐ

= 8 + 0 + 2 + 0 = 10โ‚โ‚€

Decimal to Hexadecimal

Divide the decimal number by 16 repeatedly, keeping track of remainders. Convert remainders 10-15 to A-F.

Example: Convert 255 to hexadecimal

255 รท 16 = 15 remainder 15 (F)

15 รท 16 = 0 remainder 15 (F)

Result: FFโ‚โ‚†

Hexadecimal to Decimal

Multiply each hex digit by its corresponding power of 16 and sum the results.

Example: Convert FF to decimal

Fร—16ยน + Fร—16โฐ = 15ร—16 + 15ร—1 = 240 + 15 = 255โ‚โ‚€

Binary to Hexadecimal

Group binary digits into sets of 4 (starting from the right), then convert each group to its hex equivalent.

Example: Convert 11111111 to hexadecimal

1111 1111 (group into 4-bit groups)

1111โ‚‚ = 15โ‚โ‚€ = Fโ‚โ‚†

1111โ‚‚ = 15โ‚โ‚€ = Fโ‚โ‚†

Result: FFโ‚โ‚†

Practical Applications in Networking

IP Address Conversion

IP addresses are often represented in different formats. Understanding binary is crucial for subnetting, as subnet masks are fundamentally binary operations. Hexadecimal is used in IPv6 addresses and MAC addresses.

Subnet Mask Calculations

Subnet masks are binary numbers that determine which portion of an IP address is the network and which is the host. Converting between decimal and binary is essential for understanding subnet boundaries.

MAC Addresses

MAC (Media Access Control) addresses are typically written in hexadecimal format (e.g., 00:1A:2B:3C:4D:5E). Each pair of hex digits represents one byte.

IPv6 Addresses

IPv6 addresses are written in hexadecimal format, making hex conversion skills essential for working with modern networking.

Bitwise Operations

Network engineers frequently perform bitwise AND, OR, and NOT operations for subnet calculations, ACLs, and routing. These operations require understanding binary representation.

Real-World Examples

Example 1: IP Address Octet

Decimal: 192

Binary: 11000000

Hexadecimal: C0

Octal: 300

This is a common first octet in private IP addresses (192.168.x.x)

Example 2: Maximum Byte Value

Decimal: 255

Binary: 11111111

Hexadecimal: FF

Octal: 377

This is the maximum value for a single byte (8 bits)

Example 3: Common Port Number

Decimal: 80 (HTTP port)

Binary: 1010000

Hexadecimal: 50

Octal: 120

Tips for Using This Converter

  • Enter a number in any format - conversions happen automatically
  • Binary input accepts only 0s and 1s
  • Hexadecimal is case-insensitive (a-f or A-F)
  • Octal accepts only digits 0-7
  • Large numbers are supported for all conversions
  • Use this tool to verify manual calculations
  • Practice conversions to improve your understanding of number systems
  • Remember that leading zeros don't change the value (e.g., 0010 = 10 in binary)

Disclaimer

This calculator is provided for educational and informational purposes only. While we strive for accuracy, users should verify all conversions independently, especially for critical applications. We are not responsible for any errors, omissions, or damages arising from the use of this calculator.


Also in Technical