Ithy

Binary, decimal, octal and hex converter with integer steps

Convert a whole number between bases 2, 8, 10 and 16. Choose the input base explicitly. Large integer conversion uses integer arithmetic rather than a floating-point number, and an optional 8-bit interpretation makes the signed-versus-unsigned distinction visible.

Free to use, with no sign-in. Inputs and results stay in this page and are not sent with the form. Download a result before leaving; this tool does not save your work.

Enter your values

Worked result

173 decimal = 10101101 binary = AD hexadecimal.

  1. Repeated division by the output base gives remainder digits.
  2. Read remainders in reverse order.
  3. A byte stores 8 bits; signed interpretation changes the meaning of a high first bit.

Convert decimal 173 into 8-bit binary

The powers of two selected by 173 are 128, 32, 8, 4 and 1.

173 = 128 + 32 + 8 + 4 + 1
Binary = 10101101
Octal = 255
Hexadecimal = AD
As an unsigned byte: 173
The same 8 bits in two’s complement: 173 − 256 = −83

10101101 is not inherently negative. It denotes 173 as an unsigned byte and -83 when those bits are interpreted as a signed two’s-complement byte. A sign convention must be specified.

A base changes the notation, not the integer

Each digit multiplies a power of the selected base. Hexadecimal uses A–F for values ten through fifteen. A leading minus sign in ordinary notation applies to the whole magnitude; it is not itself a two’s-complement representation.

For values between 0 and 255, the tool also displays an 8-bit padded bit pattern and its signed interpretation. For signed values between -128 and -1, it shows the corresponding 8-bit two’s-complement pattern. Larger integers are converted without a byte interpretation.

value = Σ(digit × base^position)
For an 8-bit pattern u:
signed value = u if u < 128, otherwise u − 256

Input limits and common mistakes

Only integer digits valid for the chosen base are accepted. Prefixes 0b, 0o and 0x may be used when they match that base. Spaces, fractions and expressions are rejected. The input is limited to 256 digits.

Leading zeros are not treated as a chosen word width. The main converted forms use a sign and magnitude. The separate byte note applies only where an 8-bit value is representable. Endianness concerns byte order and is not inferred here.

Questions about binary, decimal and hex

What is decimal 173 in 8-bit binary?

It is 10101101. The selected powers are 128 + 32 + 8 + 4 + 1.

Why can 11111111 mean 255 or -1?

Those are unsigned and signed two’s-complement interpretations of the same eight bits.

Will a long integer lose digits?

No. Base conversion uses integer arithmetic. This does not extend the tool to fractions or floating-point binary formats.

Sources and verification

These references explain the formulas or formats. The worked examples above were created for this tool and checked against independent calculations or format round trips. AI-assisted development does not imply a named human expert review.

Published 2026-10-23. Examples are illustrations, not measurements of a service or claims about search rankings.

Related tools

Scientific notation

Convert a finite decimal or e notation into normalized scientific notation and an exact decimal expansion without rounding the entered digits.

GCD and LCM

Find the greatest common divisor and least common multiple of signed whole numbers using exact integer arithmetic and Euclidean steps.

Text and UTF-8 byte counter

Count UTF-8 bytes, Unicode code points, UTF-16 units, grapheme clusters, lines and whitespace-separated words. Inspect the difference with emoji.

Further reading

All calculators and developer tools · Source-checked guides · How Ithy checks sources