Short answer: A NimbusCalc number base converter rewrites one integer in bases 2 through 36 and shows the working. Type a value in Integer to convert, set Base of the input (2 to 36), and press 1. Convert. The number base converter returns the decimal value, five equivalent representations, a positional expansion, a repeated-division table, signed and unsigned ranges, and a two’s-complement bit pattern. Arithmetic on mixed bases is available in tab 3. All scaling uses arbitrary precision integers, so a 40-digit hexadecimal value stays exact. Free, local, no signup.
One digit string, four different numbers
10 is two in binary. 10 is eight in octal. 10 is ten in decimal. 10 is sixteen in hexadecimal. The digits do not change. Their positions do.
A number base, also called a radix, is the number of distinct digit symbols a positional numeral system uses. Decimal is base 10 and uses 0 through 9. Binary is base 2 and uses 0 and 1. Hexadecimal is base 16 and uses 0 through 9 plus A through F, where A means ten and F means fifteen. Above base 10, letters continue up to Z so that base 36 uses the full alphabet. Roman numerals are not positional and have no base in this sense; the Roman numeral converter handles that separate system.
The positional rule behind every conversion
For a digit string with digits dk down to d0 in base b, the value is dk x b^k + ... + d1 x b^1 + d0 x b^0. The rightmost position has index zero. That single formula converts any base into decimal. Binary 1011 is 1x2^3 + 0x2^2 + 1x2^1 + 1x2^0 = 11. Hexadecimal FF is 15x16 + 15 = 255.
To go the other way, use repeated division. Divide the decimal value by the target base and write down the remainder. Replace the value with the integer quotient and divide again. Repeat until the quotient is zero. Read the remainders from last to first; they are the digits from most significant to least significant. Map remainders 10 to 35 to the letters A to Z when the base exceeds 10. A digit’s numeric value must always be smaller than the base: in base 8 the digit 8 is meaningless, in base 2 the digit 2 is meaningless. The tool checks every character and reports which digit is invalid. Common prefixes are recognised: 0b for binary, 0o for octal and 0x for hexadecimal. A prefix that disagrees with the selected base is rejected.
This tool handles integers only. A fractional part needs a radix point and often a repeating expansion. Precision is still important: a JavaScript Number is a double precision value that stops representing every integer exactly above 2^53, as defined by IEEE Std 754-2019. ECMA-262 specifies BigInt, which is what this page uses. Donald E. Knuth gives the classical treatment in The Art of Computer Programming, Volume 2, Section 4.1.
Tab 1, Convert: 255 in five bases, step by step

On load Integer to convert holds 255 with placeholder e.g. FF, 1011 or 255, and Base of the input holds 10, a number input with min 2 and max 36.
- Type the integer in Integer to convert. A leading minus sign is accepted; -0b1010 becomes -10.
- Set Base of the input (2 to 36). Five shortcut buttons sit below it: Base 2, Base 8, Base 10, Base 16 and Base 36.
- Press 1. Convert. The DECIMAL VALUE card shows 255 and the line Read as base 10. The magnitude needs 8 bits, or 1 whole byte(s).
- Read Equivalent representations. Binary 1111 1111 with prefixed form 0b11111111; Octal 377 with 0o377; Decimal 255; Hexadecimal FF with 0xFF; Base 36 value 73.
- Read Positional expansion and repeated division. The expansion line is
2 x 10^2 + 5 x 10^1 + 5 x 10^0 = 255. The division table runs 255, 127, 63, 31, 15, 7, 3, 1, 0 with eight remainder rows of 1. - Press Copy all results to take the full set away. Reading the digit column from the bottom row upwards assembles the converted number.
Tab 2, Two’s complement: why minus one is 0xFF
Computers store signed integers in a fixed number of bits. Two’s complement is the dominant representation. For a width of w bits, let M = 2^w. A signed value v in the range -M/2 to M/2 – 1 is stored as the unsigned pattern v mod M. Values whose top bit is 1 are interpreted as negative by subtracting M. For 8 bits, M = 256, so -1 becomes 255, whose bit pattern is 11111111, written 0xFF. -128 becomes 128, or 0x80.
- Select 2. Two’s complement.
- Type a value in Signed decimal integer. It defaults to -1; the placeholder reads e.g. -1 or 200.
- Choose Bit width. The select offers 8 bit, 16 bit, 32 bit and 64 bit.
- Press 2. Two’s complement. The converter reports whether the input fits the unsigned range, the signed range, or neither, and shows the exact bit pattern. When a value is widened, sign extension copies the top bit into the new high positions.
| Bits | Unsigned range | Signed range | Pattern for -1 |
|---|---|---|---|
| 8 | 0 to 255 | -128 to 127 | 0xFF |
| 16 | 0 to 65535 | -32768 to 32767 | 0xFFFF |
| 32 | 0 to 4294967295 | -2147483648 to 2147483647 | 0xFFFFFFFF |
| 64 | 0 to 18446744073709551615 | -9223372036854775808 to 9223372036854775807 | 0xFFFFFFFFFFFFFFFF |
Tab 3, Base arithmetic: adding hex to binary

- Select 3. Base arithmetic.
- Enter First operand. It defaults to FF, with Base of first operand defaulting to 16.
- Choose Operation. Four options: Add (+), Subtract (-), Multiply (x) and Divide (integer).
- Enter Second operand. It defaults to 1010 with Base of second operand defaulting to 2.
- Press 3. Base arithmetic. The result is FF (255) plus 1010 (10) = 265, shown across the bases.
Reference: decimal 0 to 16
| Decimal | Binary (4 bit) | Octal | Hexadecimal |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 7 | 0111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
Where conversions go wrong
Six errors account for most bad results from a number base converter. Each one is a mismatch between the digits and the base.
- Forgetting which base the input is in. The string 10 is two, eight, ten or sixteen depending on the base.
- Using a digit equal to or larger than the base. The digit 8 cannot appear in octal, and G cannot appear in hexadecimal.
- Dropping leading zeros in a fixed width field. 00001010 is not the same field as 1010 when the width matters.
- Confusing signed and unsigned. The 8-bit pattern 11111111 is 255 unsigned and -1 signed.
- Converting each hex digit separately. Only positional weighting gives the right total for a multi-digit number.
- Trusting floating point with long values. Above 2^53 a JavaScript Number silently rounds integers.
Adjacent NimbusCalc tools
Bit-level network work applies the same binary ideas in the IPv4 CIDR subnet calculator, and its IPv4 subnet calculator guide walks through masks and host ranges. Hex colour values are the natural bridge to the color contrast checker guide and the math calculator when a conversion is one step in a longer calculation. Two guides in this batch share the position-by-position habit: the regex tester guide reports match indices measured in code units, and the unix timestamp converter guide tracks exact unit boundaries for an instant.
Questions from the classroom
- How do I convert binary to decimal? Multiply each digit by 2 raised to its position from the right, starting at zero, and add the products. 1011 is 1×8 + 0x4 + 1×2 + 1×1 = 11.
- How do I convert decimal to binary? Divide the decimal number repeatedly by 2, record each remainder, and read the remainders from last to first.
- Why do programmers use hexadecimal? One hexadecimal digit represents exactly four binary digits, so a byte is written as two compact hex digits instead of eight bits.
- What is the range of a signed 8-bit integer? A signed 8-bit two’s complement integer ranges from -128 to 127, while an unsigned 8-bit integer ranges from 0 to 255.
- Can this number base converter handle numbers larger than 64 bits? Yes. It uses arbitrary precision integers, so conversions remain exact for any length of input.