添加使用32位运算的64位号码 [英] Adding 64 bit numbers using 32 bit arithmetic

查看:107
本文介绍了添加使用32位运算的64位号码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何使用添加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

这篇关于添加使用32位运算的64位号码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆