Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

add with carry

An add that also adds in the carry flag from the previous add, so big numbers can be added in 64-bit pieces.

adc (x86-64; ARM64 adc/adcs) computes a + b + C; chained after an add of the low halves it propagates the carry into the high halves. RISC-V has no carry flag and recovers the carry with sltu.

Examples

  • Adding two 128-bit numbers on x86-64: add rax, rcx for the low halves, then adc rdx, rbx for the high halves plus the carry.

Read the full section →