添加使用32位运算的64位号码号码

2023-09-07 22:07:02 作者:从小就帅

我们如何使用添加32位运算两个64位编号?

How do we add two 64 bit numbers using 32 bit arithmetic??

推荐答案

添加至少显著字节第一,保持进位。添加最显著字节考虑进位LSB的:

Add the least significant bytes first, keep the carry. Add the most significant bytes considering the carry from LSBs:

; x86 assembly, Intel syntax
; adds ecx:ebx to edx:eax
add eax, ebx
adc edx, ecx