Hexadecimal arithmetic uses the same column method as decimal arithmetic, but each column is based on 16. This guide covers hex subtraction, hexadecimal addition, hex multiplication, hexadecimal subtraction, and hexadecimal multiplication with carries, borrows, and decimal checks.
Align operands by place value, work from right to left, and use the same digit-value map for every operation.
Hex Digits and Place Values in Base 16
Hexadecimal uses 16 symbols. The letters continue the values after 9:
- 0–9: values 0 through 9
- A: 10, B: 11, C: 12
- D: 13, E: 14, F: 15
From right to left, place values are 160, 161, 162, and so on. For example, 2A7 equals 2 × 256 + 10 × 16 + 7. Always right-align operands so units, sixteens, and 256s share a column.
Hexadecimal Addition With Carries
In hexadecimal addition, a column produces a carry when its total is 16 or more. Divide the column total by 16: write the remainder in the current column and carry the quotient to the next column. A carry is not made at 10, as it is in base 10.
A complete addition example with a carry
Add 2A7 + 19D:
- Units: 7 + D = 7 + 13 = 20 decimal, or 14 in hexadecimal. Write 4 and carry 1.
- Sixteens: A + 9 + 1 = 10 + 9 + 1 = 20 decimal, or 14 hexadecimal. Write 4 and carry 1.
- 256s: 2 + 1 + 1 = 4. Write 4.
Therefore, 2A7 + 19D = 444. The repeated carries occur because each completed column contains 16 units of the next place value.
Hex Subtraction With Borrows
For hexadecimal subtraction, subtract each right-aligned column from right to left. If the top digit is smaller, borrow 1 from the next column. That borrowed 1 equals 16 units in the current column, not 10.
A hexadecimal subtraction example
Subtract 1C7 from 3A2:
- Units: 2 is smaller than 7, so borrow 1 from A. The units become 2 + 16 = 18, and 18 − 7 = 11, which is B. The A becomes 9.
- Sixteens: 9 is smaller than C, so borrow 1 from 3. The column becomes 9 + 16 = 25, and 25 − 12 = 13, which is D. The 3 becomes 2.
- 256s: 2 − 1 = 1.
The result is 3A2 − 1C7 = 1DB. Each borrow adds 16 to the column being solved, while reducing the next column by 1.
Hexadecimal Multiplication and Decimal Verification
Hexadecimal multiplication follows long multiplication. Multiply by each digit, convert each product into a hexadecimal digit plus carry, shift each partial product one place for every position moved left, and then add the partial products.
A hex multiplication example
Multiply 2F × 1A:
- Multiply 2F by A. F × A is 15 × 10 = 150 decimal, which is 96 hexadecimal. Write 6 and carry 9. Then 2 × 10 + 9 = 29 decimal, or 1D hexadecimal. This partial product is 1D6.
- Multiply 2F by 1. The partial product is 2F, shifted one hexadecimal place left because 1 is in the sixteens column: 2F0.
- Add the partial products: 1D6 + 2F0 = 4C6. In the middle column, D + F = 28 decimal, or 1C hexadecimal; write C and carry 1.
Therefore, 2F × 1A = 4C6.
Verify the result in decimal
Convert the factors and result using powers of 16:
- 2F = 2 × 16 + 15 = 47
- 1A = 1 × 16 + 10 = 26
- 4C6 = 4 × 256 + 12 × 16 + 6 = 1,222
Now check the multiplication: 47 × 26 = 1,222. The decimal product matches 4C6, confirming the hexadecimal result.
