0xCONVERTER-HEX

Carry at sixteen

Hex Addition Calculator

Add two hexadecimal values, with the carry rule and column-by-column working explained.

Hexadecimal operands

Expression

Hex result

Decimal

Binary

The one rule that changes

Hex addition is decimal addition with a different overflow point. A column carries when it reaches sixteen, not ten. Everything else — align right, work right to left, carry into the next column — is unchanged.

Decimal thinkingHex reality
9 + 1 = 10, carryF + 1 = 10, carry
A column holds 0–9A column holds 0–F
Carry means +10Carry means +16
Borrow takes 10Borrow takes 16

Adding two digits

Every single-digit hex addition falls into one of two cases.

sum below 16   →  write it, no carry
  7 + 5 = 12 = C

sum 16 or more →  subtract 16, carry 1
  9 + B = 9 + 11 = 20
                  20 - 16 = 4
                  → write 4, carry 1

Full worked example

   1A2B
 + 0C3D
 ------

 ones:  B + D = 11 + 13 = 24 = 16 + 8   → 8, carry 1
 16s:   2 + 3 + 1 = 6                   → 6
 256s:  A + C = 10 + 12 = 22 = 16 + 6   → 6, carry 1
 4096s: 1 + 0 + 1 = 2                   → 2

 result → 2668   (6699 + 3133 = 9832 in decimal)

Additions worth memorising

These come up constantly when working with byte values and masks.

SumResultDecimal
F + 11015 + 1 = 16
F + F1E15 + 15 = 30
FF + 1100255 + 1 = 256
80 + 80100128 + 128 = 256
0F + 011015 + 1 = 16
FFFF + 11000065,535 + 1 = 65,536

The pattern is worth noticing: adding 1 to a run of Fs always rolls over to a 1 followed by zeros, exactly as adding 1 to a run of 9s does in decimal.

Fixed-width addition

Hardware cannot produce a longer answer than the register it is using. When a carry falls off the top it is simply lost, and the result wraps.

8-bit register

  FF + 01 = 100  → only 2 digits fit  → result 00, carry flag set
  7F + 01 = 80   → fits, but the sign bit flipped
                       (127 + 1 = -128 if signed)

This calculator does not wrap — it gives the mathematically exact answer. To model an n-bit register, keep the last n/4 hex digits.

Frequently asked questions

How do I add hexadecimal numbers?

Align them on the right and add column by column, carrying whenever a column reaches sixteen instead of ten.

What is F + 1 in hex?

10, which means sixteen. It is the same rollover as 9 + 1 in decimal.

What is FF + 1?

100 in hex, or 256 in decimal. In a fixed 8-bit register it wraps to 00 and sets the carry flag.

When do I carry in hex addition?

Whenever a column total reaches 16 or more. Subtract 16 from the total and carry 1.

Can I add hex and decimal numbers together?

Convert one to the other's base first. Mixing notations in a single column is where mistakes come from.

Does this calculator wrap on overflow?

No. It gives the exact result with no width limit. Keep the last two digits for 8-bit, four for 16-bit, eight for 32-bit.