Your progress
Your place is saved automatically on this browser.
A simple addition with no interesting flags
$10 hexadecimal is 16 decimal. $05 hexadecimal is 5 decimal. Therefore the result is $15, which is 21 decimal.
Odin showed AF = 1500. That tells us A = $15 and F = $00. For this deliberately chosen example, none of the main arithmetic flags needed to be set.
An addition that wraps an 8-bit value
This example is interesting because $FF is the largest unsigned value that fits in one byte. Adding one gives the mathematical result $100, which needs nine bits.
$FF + $01 = $100
8-bit A keeps the low eight bits -> $00
the extra carry is reported by the Carry flagOdin showed AF = 0051. That means A = $00 and F = $51. The important result is not that you memorise $51, but that you understand why the Z, H and C flags are set for this arithmetic.
