Label the Number Base Before 101 Stops Meaning One Hundred One
Prevent binary, octal, decimal, and hexadecimal values from becoming ambiguous by carrying the radix through every debugging and documentation step.
Open Number Base ConverterA log contains 101, a register note says 0x65, and a test fixture expects 1100101. They can describe the same decimal value only when the base is explicit. Without that label, the digits look precise while the interpretation remains undecided.
A digit string is not a complete number
Positional notation assigns each digit a power of the base. In binary, 101 means 1×2² + 0×2¹ + 1×2⁰, or decimal 5. In decimal it means 101. The characters alone do not carry the radix unless a prefix, suffix, field definition, or nearby label supplies it.
Use a base-aware debugging check
- Record the source exactly, including prefixes such as 0b, 0o, or 0x when present.
- Choose the declared source base in Number Base Converter rather than guessing from familiar-looking digits.
- Reject digits the base cannot contain: binary has only 0 and 1, while hexadecimal extends through A–F.
- Compare the decimal value first, then copy the target representation with its base label.
- Keep leading zeros only when they encode width, padding, or a protocol field; they do not change the numeric value.
Separate numeric value from storage width
Hex FF may represent decimal 255, but whether it occupies one byte, sits inside a signed field, or is padded to 00FF is a separate question. Base conversion preserves the value; it does not infer signedness, byte order, or field width.
FAQ
What does 101 mean in binary?
Binary 101 equals decimal 5 because the set bits represent 4 and 1.
Can a number base converter determine signedness?
Not from the digits alone. Signedness depends on the field width and encoding convention, such as two's complement.
Do leading zeros change the converted value?
No, but they can communicate fixed width or padding and may matter to the surrounding file or protocol.