Skip to content
Calcrivo

Hex Calculator

Hexadecimal arithmetic and conversion to binary, octal and decimal.

Inputs

Hex

FF

Hex Result

0

Decimal

255

Binary

11111111

Octal

377

Step by step

  1. Hex input

    = 0xFF

  2. Decimal (base 10)

    = 255

  3. Binary (base 2)

    = 11111111

  4. Octal (base 8)

    = 377

  5. Breakdown

    15 × 16^1 = 240 + 15 × 16^0 = 15

    = = 255

How it works

Hexadecimal (base 16) uses digits 0–9 and letters A–F, where A=10, B=11, …, F=15. One hex digit encodes exactly 4 binary bits (a nibble), making hex a compact representation of binary data. A byte (8 bits) is always exactly 2 hex digits. FF in hex = 11111111 in binary = 255 in decimal = 377 in octal. Hex arithmetic works like decimal arithmetic but with base 16 carrying.

Formulas

Hex to decimal

d = Σ hᵢ × 16ⁱ (sum of hex digit values × powers of 16)

Decimal to hex

Repeatedly divide by 16; remainders (read bottom-up) are the hex digits

Frequently Asked Questions

Why is hexadecimal used in computing?

Each hex digit maps exactly to 4 binary bits, so two hex digits represent a byte. This makes memory addresses, colour values (#RRGGBB), and binary data much more readable. For example, 0xFF = 255 is cleaner than 11111111.

What is 0xFF in decimal?

0xFF = 15×16 + 15 = 240 + 15 = 255. It's the maximum value of an unsigned 8-bit integer, equivalent to 11111111 in binary.

How do I convert a decimal number to hex manually?

Repeatedly divide by 16 and collect the remainders. For 255: 255 ÷ 16 = 15 rem 15 (F); 15 ÷ 16 = 0 rem 15 (F). Reading remainders bottom-up: FF.

You might also need