How to do a 32bit multiplication with 64bit result in C? :-)
"... 32 bit "digits" will do nicely" If we're doing it like we'd do it by hand, 32-bit "digits" won't work because 32-bits times 32-bits would overflow. "16B" below represents a 16-bit "digit". 16-bits times 16-bits fits in a 32 integer.
16B,16B (32-bit multiplicand) * 16B,16B (32-bit multiplier) ------------------ + 16B,16B (32-bit partial product) + 16B,16B (32-bit partial product) + 16B,16B (32-bit partial product) + 16B,16B (32-bit partial product) ================== 16B,16B,16B,16B (64-bit product)