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

multiply-high

An instruction that gives the top half of a product, the bits that do not fit in one register.

The full product of two n-bit values needs 2n bits; multiply-high returns bits n..2n-1 (x86-64 one-operand mul/imul into rdx; ARM64 umulh/smulh; RISC-V mulhu/mulh), signed or unsigned.

Examples

  • ARM64 umulh x0, x1, x2 with x1 = x2 = 2³² gives 1: the top 64 bits of 2⁶⁴.

Read the full section →