How are extremely large floating-point numbers represented in memory?

余生颓废 提交于 2019-11-28 14:34:25

Current computers have 32 or 64-bit registers, so doing calculations on bytes is very inefficient. Also, computers work in binary, so using a base that is a power of 2 is more efficient. They'll use base 232 or 264 like Mysticial said. Each computer word will store a digit of the number and they work digit-by-digit.

In some cases you don't need much calculations but most of the time you're inputting and outputting decimal characters instead. This case using a base that is a power or 10 is more efficient. You can use base 109 in 32-bit computers and 1019 in 64-bit ones because that's the largest power of 10 you can store in a 32 or 64-bit value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!