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

prinzdezibel picture prinzdezibel · Mar 7, 2009 · Viewed 39.3k times · Source

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?

Answer

Guffa picture Guffa · Mar 7, 2009

The machine word size depends on the architecture, but also how the operating system is running the application.

In Windows x64 for example an application can be run either as a 64 bit application (having a 64 bit mahine word), or as a 32 bit application (having a 32 bit machine word). So the size of a machine word can differ even on the same machine.

The term WORD has different meaning depending on how it's used. It can either mean a machine word, or a type with a specific size. In x86 assembly language WORD, DOUBLEWORD (DWORD) and QUADWORD (QWORD) are used for 2, 4 and 8 byte sizes, regardless of the machine word size.