Number Base Converter

Convert a decimal number to binary, octal and hexadecimal.

Result

Binary (base 2)

11111111

Octal (base 8)

377

Hexadecimal (base 16)

FF

How it works

Repeatedly divide by the target base

Changing base changes the notation, not the number. The value we write 255 in decimal is 11111111 in binary, 377 in octal and FF in hexadecimal — four labels for one quantity. The conversion works by repeated division by the target base, collecting remainders. Computers work in binary because a transistor has two stable states, but binary is unreadable for humans: eight bits is already an unmemorable string. Hexadecimal solves that by packing exactly four bits into one digit, so a byte becomes two characters, and 255 — the largest value a byte can hold — becomes the tidy FF. That four-bits-per-digit relationship is why hex appears everywhere near hardware: colour codes, memory addresses, MAC addresses, error codes and file signatures. Octal, grouping three bits, survives mainly in Unix file permissions.

Advertisement

Frequently asked questions

What is 255 in hexadecimal?

255 in decimal is FF in hexadecimal and 11111111 in binary.

Why use hexadecimal?

It is compact: one hex digit equals exactly four binary digits, handy for colors and memory addresses.

How do I convert binary to hex in my head?

Group the bits in fours from the right and translate each group separately: 1011 0110 becomes B6. It works because 16 = 2⁴, so one hex digit is exactly four bits — no arithmetic needed.

Advertisement

Related calculators