32位计算机如何计算双精度数 [英] How does a 32-bit machine compute a double precision number

查看:108
本文介绍了32位计算机如何计算双精度数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我只有32位计算机,那么cpu如何计算双精度数?此数字为64位宽.FPU如何处理它?<​​/p>

更普遍的问题是,如何计算比我的alu更宽的东西.但是我完全理解整数方式.您可以拆分它们.但是,对于浮点数,您拥有指数和尾数,应该对它们进行不同的处理.

解决方案

并非"32位计算机"中的所有内容都必须是32位.x87样式的FPU从诞生之日起就还不是"32位",这是在创建AMD64之前很长的时间.它始终能够在80位扩展双精度数上进行数学运算,并且曾经是单独的芯片,因此根本没有机会使用主ALU.

它比ALU宽,是的,但它没有通过ALU,浮点单元使用自己的电路,该电路的宽度应达到所需的宽度.这些电路也比整数电路复杂得多,而且它们在组件中并没有真正与整数ALU重叠

If i only have 32-bit machine, how do does the cpu compute a double precision number? This number is 64 bit wide. How does a FPU handle it?

The more general question would be, how to compute something which is wider, then my alu. However i fully understood the integer way. You can simply split them up. Yet with floating point numbers, you have the exponent and the mantissa, which should be handled differnetly.

解决方案

Not everything in a "32-bit machine" has to be 32bit. The x87 style FPU hasn't been "32-bit" from its inception, which was a very long time before AMD64 was created. It was always capable of doing math on 80-bit extended doubles, and it used to be a separate chip, so no chance of using the main ALU at all.

It's wider than the ALU yes, but it doesn't go through the ALU, the floating point unit(s) use their own circuits which are as wide as they need to be. These circuits are also much more complicated than the integer circuits, and they don't really overlap with integer ALUs in their components

这篇关于32位计算机如何计算双精度数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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