What is a number base, really?
Quick answerA number base (or radix) is simply how many unique digits a counting system uses before it "rolls over" to the next place value. Decimal (base 10) uses 0-9; binary (base 2) uses only 0 and 1; hexadecimal (base 16) uses 0-9 plus A-F for the values 10-15.
Every number base works the same way underneath: each digit position represents a power of the base, increasing from right to left. In decimal, the number present in the hundreds place means "hundred", or 10². In binary, the same idea applies with powers of 2 instead of 10. Once you see this pattern, converting between any two bases from 2 to 36 is just a matter of applying it in one direction or the other — which is exactly what a number base converter automates, along with showing the arithmetic step by step.
Key fact: Computers use binary at the hardware level because a transistor only reliably distinguishes two states — on and off — which map cleanly to 1 and 0.
Converting binary and decimal
Quick answerTo go from binary to decimal, multiply each digit by 2 raised to its position (counting from 0 on the right) and add everything up. To go from decimal to binary, repeatedly divide by 2 and read the remainders in reverse.
Take the binary number 101010 as an example. Reading right to left, the digits sit in positions 0 through 5: 1×32 + 0×16 + 1×8 + 0×4 + 1×2 + 0×1 = 32 + 8 + 2 = 42. Going the other direction, dividing 42 by 2 repeatedly gives remainders 0, 1, 0, 1, 0, 1 — read in reverse, that's 101010 again.
This is exactly the calculation ToolPico's Number Base Converter performs on the "Convert" tab: it shows all four common bases (binary, octal, decimal, hex) side by side and, when the step-by-step option is enabled, prints out each division or multiplication step so you can follow the logic rather than just copy an answer.
Example values across four bases
Illustrative examples — not a complete reference
| Decimal | Binary | Octal | Hex |
| 10 | 1010 | 12 | A |
| 42 | 101010 | 52 | 2A |
| 255 | 11111111 | 377 | FF |
| 1000 | 1111101000 | 1750 | 3E8 |
Why hexadecimal exists (and why bit grouping matters)
Quick answerHexadecimal exists because each hex digit corresponds to exactly 4 binary bits (a "nibble"), so long binary strings can be written far more compactly — and readably — in hex. That's why memory addresses, hash values, and color codes almost always use hex.
Consider a byte: 11111111 in binary is only FF in hex — two characters instead of eight. Grouping bits into nibbles (4 bits) or full bytes (8 bits) is also why tools display binary output as 1111 1111 rather than one long unbroken string; it's purely a readability convention, not a change to the value itself.
Example scenario: say a developer is debugging a color rendering issue and sees the hex code #7c3aed in a stylesheet. Splitting it into byte pairs — 7c, 3a, ed — and converting each to decimal gives the RGB values (124, 58, 237). The mini "Hex → Color" tool on the converter page does exactly this conversion with a live swatch preview.
Negative numbers and two's complement
Quick answerMathematically, a negative binary number just gets a leading minus sign. But computer hardware represents negative integers using two's complement: flip every bit of the positive value and add 1; if the leftmost bit is 1, the stored number is negative.
Two's complement matters because it lets a CPU use the same addition circuitry for both positive and negative numbers — subtraction becomes addition of a two's-complement value. It's always calculated at a fixed bit width (commonly 8, 16, 32, or 64 bits), because the position of that leading "sign" bit depends on how many bits are available.
Example (illustrative only): at an 8-bit width, the unsigned bit pattern 11111111 equals 255, but interpreted as two's complement it equals -1. ToolPico's converter has a dedicated "Bit Click" tab with a clickable bit grid at 8/16/32/64-bit widths, so you can flip individual bits and immediately see both the unsigned and signed (two's complement) value — no manual bit-flipping required.
Related but distinct: text can also be represented as numbers via character codes (ASCII/Unicode) or encoded as Base64 for safe transport in text-based formats. These aren't true positional number bases in the mathematical sense, but the "Text ↔ Bytes" tab on the converter handles both directions instantly.
Convert any base instantly
Binary, octal, decimal, hex, or any base from 2 to 36 — with step-by-step working, bit grouping, two's complement, and text/Base64 conversion, all free and in your browser.
Try the free Number Base Converter →
Frequently asked questions
What is the fastest way to convert binary to decimal?
Multiply each binary digit, from right to left, by an increasing power of 2 (2⁰, 2¹, 2², …) and add the results. For example, 101010(2) = 1×32 + 0×16 + 1×8 + 0×4 + 1×2 + 0×1 = 42(10). A free online number base converter does this instantly and shows every step.
How do you convert decimal to hexadecimal?
Repeatedly divide the decimal number by 16 and record each remainder (using A-F for remainders 10-15). Reading the remainders in reverse order gives the hexadecimal result. For example, 255 divided by 16 is 15 remainder 15, and 15 divided by 16 is 0 remainder 15, so reading in reverse gives FF.
Why do programmers use hexadecimal instead of binary?
Hexadecimal is a compact shorthand for binary: each hex digit represents exactly 4 bits (a nibble), so an 8-bit byte fits in just two hex characters. This makes memory addresses, color codes, and byte dumps much easier to read and type than long strings of 0s and 1s.
What is two's complement and why does it matter?
Two's complement is the method computer hardware uses to represent negative integers in binary at a fixed bit width. To get it, flip every bit of the positive value and add 1; if the leftmost bit (MSB) is 1, the number is negative. It matters because it lets addition and subtraction use the same circuitry regardless of sign.
Is Base64 a number base like binary or hex?
Not exactly. Base64 is a text encoding scheme, not a positional number system — it maps every 3 raw bytes to 4 printable characters from a 64-character alphabet, mainly so binary data can travel safely inside text formats like JSON or email. It's related in spirit to base conversion but serves a different purpose.
Related guides
A note on this guide: the examples above use small, easy-to-verify numbers purely to illustrate the arithmetic; they are for educational purposes and are not a substitute for testing against your own hardware, compiler, or language's exact numeric behavior (bit width, sign handling, and rounding can vary). This article is informational, not engineering or security advice.