How is 64-bit math accomplished on a 32-bit machine?

后端 未结 3 578
轻奢々
轻奢々 2020-12-19 04:53

If a 32-bit processor is, indeed, really only 32 bits in length, then how can math operations work on 64-bit numbers? For example:

long lngTemp1 = 1234567891         


        
3条回答
  •  执笔经年
    2020-12-19 05:27

    Even 32-bit processors often came with a 64-bit floating point unit - but the data could only be bussed in 32-bits at a time.

    More generally, however, 64-bit floating point could be accomplished even if the underlying processor only allows 8-bit integer operations. However, the compiler or programmer would have to insert sufficient code in order to virtualize the effect.

提交回复
热议问题