Decimal Converter
Convert decimal numbers to binary, hexadecimal, and octal. Essential tool for programming and computer science.
About this calculator
Every number system -- decimal, binary, hexadecimal, octal -- represents the same quantities using a different count of unique digit symbols before the notation "carries over" into an additional place value: decimal carries every ten units, binary carries every two, hexadecimal every sixteen, and octal every eight. Because people count in decimal day to day but computer hardware operates natively in binary, this calculator starts from the decimal number you already understand and produces its equivalent form in each of the other three bases at once, so you never have to manually track carries or remainders by hand.
The binary output is shown both raw and padded to fixed 8-bit and 16-bit widths, which matters for low-level work: a padded binary form makes it immediately clear whether a value fits within a single byte or needs a wider field, something the unpadded form doesn't show at a glance. The hexadecimal and octal conversions follow the same base-change logic in different radixes -- hex packing four bits per digit, octal packing three -- and both are widely used as more compact stand-ins for binary in contexts like memory addressing, color values, and Unix file permissions, where writing out a long string of ones and zeros would be impractical.
Convert
Results
How to Use This Calculator
- Enter the Decimal Number you want to convert (e.g., 255 for 0xFF).
- Instantly see the Binary representation — useful for bit-masking and low-level programming.
- Read the Hexadecimal output (with 0x prefix) — commonly used in color codes, memory addresses, and protocols.
- Check the Octal value for Unix file permission calculations.
- Use the 8-bit and 16-bit padded binary forms when working with fixed-width data fields.
Recommended for this calculation
We may earn a commission if you sign up through these links.
Fast, reliable WiFi 6 for every device in the house
TP-Link Archer AX21 AX1800 WiFi 6 Router
See on AmazonAnker: As an Amazon Associate I earn from qualifying purchases.
TP-Link: As an Amazon Associate I earn from qualifying purchases.
Raspberry Pi: As an Amazon Associate I earn from qualifying purchases.
What each input means
- Decimal Number
- Enter a decimal number
How this is calculated
Formula
Convert decimal to different number basesWorked example, using the default values
- Identify Input ParametersDecimal Number = 255 = 1 input(s) provided
- Calculate BinaryBinary11111111 = 11111111
- Calculate HexadecimalHexadecimalFF = FF
- Calculate BinaryBinary11111111 = 11111111
- Calculate HexHex0xFF = 0xFF
Engine last updated . Checked against 1 independently-derived test — how we verify calculators.
Frequently Asked Questions
Why does binary need three different padding options while hex and octal don't?
Binary representations get long fast -- a modest decimal number can need eight or more binary digits -- so fixed-width padding (8-bit or 16-bit) matters for spotting whether a value fits a byte or a word boundary at a glance. Hex and octal are already compact enough (four and three bits per digit respectively) that this calculator doesn't offer the same fixed-width padding for them.
How is a decimal number actually converted into binary?
The conversion repeatedly divides the decimal value by 2 and records the remainders, which read in reverse order to form the binary digits -- this calculator performs that base-16, base-8, and base-2 conversion using standard number formatting rather than manual long division, but the underlying math is the same repeated-division process taught in an introductory computer science course.
What's the practical difference between the 8-bit and 16-bit padded binary outputs?
The 8-bit form pads the binary string to exactly one byte, while the 16-bit form pads it to two bytes (a common integer width in many systems). Comparing a value against both quickly shows whether it overflows a single-byte field and needs the wider representation, which matters when working with fixed-width data structures or network protocols.
Why do color codes and memory addresses use hexadecimal instead of decimal?
Hexadecimal digits map exactly onto four binary digits each, so a byte always converts to precisely two hex characters with no rounding or ambiguity. That clean alignment with binary, combined with being far more compact than writing out binary directly, is why hex became the standard notation for colors, memory addresses, and similar binary-backed values.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Binary/Hex/Decimal Converter
Convert a decimal number into its binary, octal, and hexadecimal representations. Includes bit count, byte size, and ASCII character lookup.
Technology & ComputingHex Converter
Convert between hexadecimal, decimal, binary, and octal number systems. Essential for programming and computer science.
Technology & ComputingNumber Converter Suite
Convert binary, hex, decimal, colors, ASCII, and signed integers.
Number TheoryNumber Base Converter
Convert numbers between any base (2-36). Enter a number in one base and convert to another.
Math & StatisticsUltimate Calculator
Scientific calculator, graphing, and unit conversions — all in one.
More in Technology & Computing.