How many bits is a WORD and is that constant over different architectures?

后端 未结 9 945
清歌不尽
清歌不尽 2021-02-02 13:37

Is a machine WORD always the same or does it depend on the machine architecture? And is the meaning of the word WORD context sensitive or generally applicable?

9条回答
  •  误落风尘
    2021-02-02 14:39

    A word is typically the "native" data size of the CPU. That is, on a 16-bit CPU, a word is 16 bits, on a 32-bit CPU, it's 32 and so on.

    And the exception, of course, is x86, where a word is 16 bit wide (because x86 was originally a 16-bit CPU), a DWORD is 32-bit (because it became a 32-bit CPU), and a QWORD is 64-bit (because it now has 64-bit extensions bolted on)

提交回复
热议问题