Programmer Calculator (Binary, Hex, Octal & Decimal Converter)

Convert a number between decimal, hexadecimal, binary and octal in one step, with grouped digits, the bit and byte length, and the matching ASCII/Unicode character.…

Results

Enter your details and click Calculate to see your results.
About This Calculator

Type the number and pick its base, or just type a prefix: 0x for hex, 0b for binary or 0o for octal. Each hex digit is exactly 4 bits, which is why programmers use hex as shorthand for binary.

Decimal to binary works by repeatedly dividing by 2. The remainders, read upwards, are the bits.

Example

Example: decimal 255 = hex FF = binary 1111 1111 = octal 377, which fits in 1 byte.

Assumptions

Whole numbers only (any size). Negative numbers are shown with a minus sign; for fixed-width signed patterns use the Two's Complement Calculator.

Frequently Asked Questions

How do I convert decimal to binary?

Divide by 2 repeatedly and read the remainders from last to first. 13 → 1101.

What is FF in decimal?

255.

Related Calculators

About the Author

Imran Hossain
Imran Hossain

Professional SEO, Digital Marketer Specialist

I am a Certified Google Ads Expert And Professional SEO, Digital Marketing Specialist

View full profile