onlinecalculator.me
Download App

5 real-world examples of number base conversions

Learn how computers and software engineers translate data between decimal, binary, hexadecimal, octal, and base 36. We break down the math behind web colors, IP addresses, Linux permissions, and short URLs.

Sep 5, 2026 6 min read

A computer technician working on a server rack in a brightly lit data center, plugging in a blue ethernet cable.

We naturally count in base 10, or the decimal system, largely because humans have ten fingers. In a positional numeral system, the location of a digit determines its actual value. A “2” sitting in the hundreds column means something very different than a “2” in the ones column.

Computers, however, run on electricity. Hardware is fundamentally either on or off, forcing machines to operate in base 2 (binary). To bridge the gap between human readability and machine efficiency, software engineers rely on other positional numeral systems like base 16 (hexadecimal), base 8 (octal), and even base 36 to compress data.

Moving numbers between these different bases comes down to two simple math operations. You either multiply digits by a positional weight to convert them back into decimal, or you repeatedly divide a decimal number to find its new digits in a different base. Let’s look at how this plays out in practice.

Decoding web colors (Hexadecimal to Decimal)

If you do any web design or digital graphics work, you have seen hexadecimal colors. Hexadecimal uses sixteen distinct characters to represent numbers: 0 through 9, plus the letters A through F. In this system, A equals 10, B is 11, and so on up to F, which equals 15.

Say you have an orange color where the red channel is set to E2. To figure out what E2 means on a standard 0 to 255 decimal scale, you read the value from right to left, multiplying each digit by a power of 16.

The rightmost digit sits in the 16 to the zero power column. Anything to the zero power is 1. 2 × 1 = 2.

Move one spot left to the 16 to the first power column, which is just 16. The digit here is E, which translates to 14 in decimal. 14 × 16 = 224.

Add the results together: 224 + 2 = 226. That web color tells the monitor to blast red at a level of 226.

Translating IP addresses (Decimal to Binary)

When you type in a local network IP address like 192.168.1.1, you are reading familiar decimal numbers. Your router, however, reads that first block as an 8-bit binary string.

To translate a decimal integer into another base, you do the opposite of the multiplication trick above. You repeatedly divide the decimal number by your target base—which is 2 in this case—and keep track of the remainders. Let’s convert 192 into binary.

192 ÷ 2 = 96 remainder 0 96 ÷ 2 = 48 remainder 0 48 ÷ 2 = 24 remainder 0 24 ÷ 2 = 12 remainder 0 12 ÷ 2 = 6 remainder 0 6 ÷ 2 = 3 remainder 0 3 ÷ 2 = 1 remainder 1 1 ÷ 2 = 0 remainder 1

You stop dividing once you reach zero. To get the final binary string, you read the column of remainders from the bottom to the top. The decimal number 192 becomes 11000000 in binary.

Reading system permissions (Octal to Binary)

Server administrators deal with base 8, or octal, on a daily basis when setting file permissions in Linux. A very common permission configuration is 755. Octal is handy for this specific task because it maps flawlessly to binary. Exactly three binary digits (called bits) fit perfectly into one octal digit.

The 755 permission string represents three distinct categories: User, Group, and Others. Each digit dictates the Read, Write, and Execute rights for that specific category. You can translate 755 into binary just by knowing the 3-bit equivalent for each number.

The number 7 is 111 (since 4 + 2 + 1 = 7). The number 5 is 101 (since 4 + 0 + 1 = 5). The second 5 is also 101.

String them together and you get 111101101. In plain English system administration terms, the file owner has full read, write, and execute access (111). Meanwhile, the group and the public are restricted to read and execute rights only (101).

Compressing IDs for short URLs (Base 36 to Decimal)

Social media platforms rely on short URLs to save space. Behind the scenes, these services compress massive decimal database IDs into tiny alphanumeric strings using a high number base. Base 36 is incredibly common for this task because it uses every number from 0 through 9 and every single letter in the English alphabet from A through Z.

Let’s say a short link ends with the identifier 4T. To find the original decimal database ID, we calculate the positional weights just like we did with hexadecimal, but this time using powers of 36.

In base 36, A is 10 and Z is 35. Following that logic, T equals 29.

Start on the right with T. Multiply 29 by 36 to the zero power (which is 1). 29 × 1 = 29.

Move left to the 4. Multiply 4 by 36 to the first power (which is 36). 4 × 36 = 144.

Add the two results together: 144 + 29 = 173. The short two-character string 4T actually represents the 173rd entry in the database.

Simplifying memory addresses (Binary to Hexadecimal)

Staring at long strings of ones and zeros is a quick way to give yourself a headache, and it invites transcription errors. Programmers and engineers usually convert binary data into hexadecimal to make it readable.

Because 16 is a power of 2 (specifically, 2 to the 4th power), exactly four binary bits compress neatly into a single hexadecimal digit. These four-bit clusters are called nibbles.

If a diagnostic tool spits out the binary byte 10101111, you just split it in half to convert it into hex.

The left nibble is 1010. In decimal, that is 8 + 0 + 2 + 0, which equals 10. In hex, 10 is represented by A. The right nibble is 1111. In decimal, that is 8 + 4 + 2 + 1, which equals 15. In hex, 15 is represented by F.

Push them together and the binary byte 10101111 becomes AF. It means the exact same thing to the computer’s memory, but it is vastly easier for a human to read, write, and troubleshoot.

Common conversion reference

Understanding these conversion rules helps you spot patterns across different data systems. Here is a quick reference table showing how the specific numbers from our examples look when translated across the four main bases used in computing.

DecimalBinaryOctalHexadecimal
15111117F
17310101101255AD
19211000000300C0
22611100010342E2
25511111111377FF

Working through these translations on paper is a great way to grasp how computers process information. But when you just need the answer quickly, let a machine do the heavy lifting. You can translate instantly between these standards—or any custom base up to 36—using the Number Base Converter.

How do you convert hexadecimal to decimal?
You read the hexadecimal value from right to left and multiply each digit by a power of 16. The rightmost digit is multiplied by 16 to the zero power, the next by 16 to the first power, and so on. Finally, you add all the resulting numbers together to get the decimal value.
Why do computers use binary instead of decimal?
Computers run on electricity and rely on hardware switches that are fundamentally either on or off. This physical limitation forces machines to operate in base 2, or binary. Software engineers use other bases like hexadecimal to make this binary data easier for humans to read.
How do you convert a decimal number to binary?
You repeatedly divide the decimal number by 2 and keep track of the remainders. You stop dividing once you reach zero. To get the final binary string, you read the column of remainders from the bottom to the top.
Number Base Converter Open the calculator →

← More Math articles All articles