Skip to main content
Calcimator

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

Binary
11111111
Binary (8-bit)
11111111
Binary (16-bit)
0000000011111111
Hexadecimal
FF
Hex (0x)
0xFF
Octal
377
How to Use This Calculator
  1. Enter the Decimal Number you want to convert (e.g., 255 for 0xFF).
  2. Instantly see the Binary representation — useful for bit-masking and low-level programming.
  3. Read the Hexadecimal output (with 0x prefix) — commonly used in color codes, memory addresses, and protocols.
  4. Check the Octal value for Unix file permission calculations.
  5. 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.

Anker

Never run out of battery mid-project again

Anker PowerCore 10000 Portable Charger

See on Amazon
TP-Link

Fast, reliable WiFi 6 for every device in the house

TP-Link Archer AX21 AX1800 WiFi 6 Router

See on Amazon
Raspberry Pi

A full computer small enough for any project

Raspberry Pi 5, 8GB RAM

See on Amazon

Anker: 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 bases

Worked example, using the default values

  1. Identify Input Parameters
    Decimal Number = 255 = 1 input(s) provided
  2. Calculate Binary
    Binary
    11111111 = 11111111
  3. Calculate Hexadecimal
    Hexadecimal
    FF = FF
  4. Calculate Binary
    Binary
    11111111 = 11111111
  5. Calculate Hex
    Hex
    0xFF = 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.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Technology & Computing.