When 173 is not just 173
A designer hands you the color code AD and asks what it equals as an ordinary number. A networking tutorial shows the subnet mask 255.255.255.0 and wants you to see it as bits. In both cases you already know the value, you just need it rewritten in a different counting system. That is what this converter does: type a plain decimal number and it rewrites it in binary, octal, and hexadecimal, the bases computers actually work in.
The idea behind the conversion
Formula: decimal value = d_n x 10^n + ... + d_1 x 10^1 + d_0 x 10^0, where each digit d is between 0 and 9.
Every decimal number you have ever written is already a sum of powers of ten. The number 173 is 1 x 100 + 7 x 10 + 3 x 1. Converting to another base just means regrouping that same quantity into powers of 2, 8, or 16 instead of powers of 10. The tool divides your number by the target base again and again, collecting the remainders, and those remainders become the digits of the new representation, read from last to first.
How to use it
- Type your decimal number into the input box, digits only, no commas or spaces.
- Choose the base you want: binary, octal, or hexadecimal.
- Read the converted result, shown grouped so it is easy to copy.
- Switch bases to compare the same value in each system.
Worked example: 173 in binary and hex
Divide 173 by 2 and write down each remainder: 173 / 2 = 86 remainder 1; 86 / 2 = 43 remainder 0; 43 / 2 = 21 remainder 1; 21 / 2 = 10 remainder 1; 10 / 2 = 5 remainder 0; 5 / 2 = 2 remainder 1; 2 / 2 = 1 remainder 0; 1 / 2 = 0 remainder 1. Reading the remainders bottom-up gives 10101101, so 173 in decimal equals 10101101 in binary. For hexadecimal, divide by 16: 173 / 16 = 10 remainder 13, and in hex 10 is written A and 13 is written D, so 173 = AD. Both answers describe the exact same quantity.
Where this comes up in real life
Web designers translate between decimal RGB values like 173 and hex codes like AD every time they pick a color. Networking students convert 255 into 11111111 to see which bits of an address mark the network portion. People tinkering with Arduino boards read sensor values in decimal but write hardware settings in hex. If you are learning to program, converting small numbers by hand and then checking them here is one of the quickest ways to make number bases feel natural.
Mistakes to avoid
- Dropping leading zeros. The full byte for 5 is 00000101, not 101. Trimmed zeros change the width and confuse anyone reading your result.
- Treating hex letters as words. AD is a number here, not an abbreviation. In hexadecimal, A through F are simply the digits for 10 through 15.
- Typing commas or fractions. Base conversion works on whole numbers, so enter 1000 rather than 1,000, and whole values rather than decimals.
Good to know
This tool converts whole numbers; extremely large values may lose precision in the browser, so cryptography-sized integers belong in a dedicated big-number tool. For the everyday range, the conversion is exact. To work the other direction, the hex converter turns hexadecimal back into decimal, the binary converter handles conversions starting from bits, and the text to binary converter encodes whole words into binary for you.