Instantly convert between binary (base‑2), decimal (base‑10), and hexadecimal (base‑16) number systems.
| Decimal | Binary (4‑bit) | Hexadecimal | Decimal | Binary (4‑bit) | Hexadecimal |
|---|
Understanding different numeral systems is fundamental to computer science, digital electronics, and low‑level programming. Our converter provides real‑time translation between the three most essential bases: binary (the language of computers), decimal (human‑friendly), and hexadecimal (compact binary shorthand).
1011₂ = 1·2³ + 0·2² + 1·2¹ + 1·2⁰ = 8+0+2+1 = 11₁₀.1101₂.F=1111, A=1010).
In programming, bitmasks are often expressed in hex for clarity. For instance, to extract the lower 4 bits of a number, you can use value & 0x0F. With our converter, you can instantly see that 0x0F equals decimal 15 and binary 00001111. This helps when debugging register flags or network protocol headers.
Try entering 0x0F in the hex field and observe the binary and decimal representations.
IPv4 addresses are often represented in dotted decimal, but subnet masks and CIDR rely on binary understanding. Hex appears in IPv6.
CSS hex colors like #FF5733 directly map to RGB components via hex values: FF = 255, 57 = 87, 33 = 51.
Registers, bitmasks, and memory dumps are displayed in hex, while binary shows individual flag states.
0x001F is the same as 0x1F – the converter automatically normalizes, but be aware that some systems require a fixed width.
0b for binary, 0x for hex).
This tool focuses on unsigned integers. For signed numbers (e.g., in programming languages like C or Java), negative values are typically represented using two's complement. To convert a negative decimal to binary/hex using two's complement, first decide the bit width (e.g., 8, 16, 32), then add 2ⁿ to the negative number to get its unsigned representation. For example, -1 in 8-bit two's complement is 0xFF (255 decimal). You can use our converter to obtain the unsigned value and then interpret it as signed.
Our tool handles only integers. For floating-point conversion (e.g., IEEE 754 single/double precision), specialized tools are required. However, the integer part can be converted using this tool, and the fractional part can be handled by repeated multiplication by 2 (binary) or 16 (hex) – a common exercise in computer science courses.
All algorithms are verified against authoritative references including Wolfram MathWorld and classic texts like The C Programming Language (Kernighan & Ritchie).Last content review: March 2026
Conversions are performed locally in your browser – no data leaves your device, ensuring privacy and offline availability.