Quotient and remainder
Hex Division Calculator
Divide two hexadecimal values and get an exact integer quotient and remainder, with the digit-dropping shortcut for powers of sixteen explained.
—
—
—
—
Integer division, and why not fractions
This calculator returns a quotient and a remainder rather than a decimal fraction, because that is what hex division is nearly always for. Splitting an address into a page and an offset, working out how many whole records fit in a buffer, extracting a field — every one of those wants the remainder as a separate answer, not as digits after a point.
FF ÷ 10 255 ÷ 16 = 15 remainder 15 quotient → F remainder → F check: F × 10 + F = F0 + F = FF ✓
The check in the last line works for every division: quotient times divisor, plus remainder, returns the original value.
The shortcut for powers of sixteen
Dividing by 10, 100 or 1000 in hex needs no arithmetic at
all. Split the digits and you have both answers.
| Divide by | Decimal | Do this | Remainder is |
|---|---|---|---|
| 10 | 16 | Drop the last digit | The digit you dropped |
| 100 | 256 | Drop the last two | The two you dropped |
| 1000 | 4,096 | Drop the last three | The three you dropped |
| 10000 | 65,536 | Drop the last four | The four you dropped |
1A2B ÷ 100 drop the last two digits quotient → 1A (26) remainder → 2B (43) check: 1A × 100 + 2B = 1A00 + 2B = 1A2B ✓
Splitting an address into a page number and an offset is exactly this operation. With 256-byte pages, address 1A2B is page 1A, offset 2B — and the answer is visible without a calculator, which is precisely why memory layouts are described in hex.
Long division with an awkward divisor
When the divisor is not a power of sixteen, the process is ordinary long division with each place worth sixteen times the next.
1A2B ÷ 7 1 ÷ 7 = 0 remainder 1 1A ÷ 7 = 3 remainder 5 → 3 52 ÷ 7 = B remainder 5 (82 ÷ 7 = 11 r 5) → B 5B ÷ 7 = D remainder 0 (91 ÷ 7 = 13 r 0) → D quotient → 3BD (957) remainder → 0 check: 957 × 7 = 6699 = 1A2B ✓
What the remainder is telling you
- A remainder of 0 means the value divides evenly, which for a power of two divisor means the value is aligned to that boundary.
- Dividing an address by 4 or 8 checks word or doubleword alignment. Any remainder means a misaligned access.
- Dividing a length by a record size gives whole records as the quotient and leftover bytes as the remainder — usually a sign of truncation.
Division by zero
There is no answer, and the calculator says so rather than returning infinity or an error code. Hardware behaves differently again: most processors raise a trap or fault on integer division by zero, which is a crash rather than a value.
Frequently asked questions
How do I divide hexadecimal numbers?
Use long division as in decimal, but each place is worth sixteen times the one to its right. The result is a quotient and a remainder.
What is FF divided by 10 in hex?
F remainder F. In decimal that is 255 divided by 16, which is 15 remainder 15.
Why does dividing by 10 just drop a digit?
Because 10 in hex is sixteen, the base itself. Dividing by the base removes the last digit, and that digit becomes the remainder.
Why is there no decimal point in the answer?
Hex division is normally used to split a value into whole parts, such as a page and an offset. The remainder is the useful second answer, not a fraction.
How do I check a division result?
Multiply the quotient by the divisor and add the remainder. You should get the original value back.
What happens if I divide by zero?
Nothing valid. The calculator reports it rather than returning a number. Most processors raise a fault in the same situation.