A data word or just a word is a certain amount of data that a computer can process in one step in the arithmetic-logic unit of the processor . If a maximum amount of data is meant, its size is called word width, processing width or bus width.
Twice a word - in context - is a double word (English double word , short DWord ) or long word referred. For four times a word there is in English also have the designation quadruple word , short Quad Word or QWord . The data unit with half the word width is correspondingly referred to as a half word .
Smallest addressable unit
Depending on the system, the word length can differ considerably, with the variants in computers produced so far, starting from 4 bits, almost always following a power of two , i.e. a respective doubling of the word length. (Exceptions to this were, for example, the mainframe computers TR 4 and TR 440 from the 1960s / 1970s with 50 and 52-bit wide words.)
In addition to the largest possible number that can be processed in one computing step, the word length primarily determines the size of the maximum directly addressable memory . Therefore, a tendency towards longer word lengths can be seen:
- The first main processors only had 4-bit data words ( nibbles ). With 4 bits you can map 16 states, this is sufficient for the representation of the ten digits 0 to 9. Many digital clocks and simple pocket calculators still have 4-bit CPUs today .
- In the 1970s, the 8-bit CPUs established themselves and dominated the market for home users until around 1990 . With 8 bits it was now possible to store 256 different characters in one data word. The computers now used alphanumeric inputs and outputs, which were much more legible and opened up new possibilities. The resulting 8-bit character sets , e.g. B. EBCDIC or the various 8-bit extensions to the 7-bit ASCII - Codes have been preserved in part to the 32-bit era, and simple text files are still often in an 8-bit format.
- Since then, the word length is within the x86 - processor family has repeatedly doubled:
- With its first models, this had a 16-bit architecture ,
- which was soon followed by the 32-bit architecture of numerous PC processors, e. B. in the Pentium , Athlon , G4 and Core Duo processors.
- Currently (as of 2019) the 64-bit architecture is common, e.g. B. the Athlon-64 -, G5 -, newer Pentium-4 -, Core-2-Duo -, the Intel-Core-i-series as well as various server processors (e.g. Itanium , UltraSparc , Power4 , Opteron , newer Xeon ).
In programming languages for x86 systems, the size of a word has not grown , partly out of habit, but mainly in order to maintain compatibility with previous processors, but is now colloquially used to denote a bit sequence of 16 bits, i.e. the status of the 8086 processor.
For later x86 processors the designations Doppelwort / DWORD (English double word , also long word / Long ) and QWORD (English quad word ) were introduced. When changing from 32-bit architectures and operating systems to 64-bit , the meaning of long has been separated:
- In the Windows world , the width of such a long word remained 32 bits
- in the Linux world it was expanded to 64 bit.
In other computer architectures (e.g. PowerPC , Sparc ) a word often means a bit sequence of 32 bits (the original word length of these architectures), which is why the designation half-word is used there for sequences of 16 bits.
Processors of the IA-32 -80x86- architecture
|Data width||Data type||Processor register|
|4 bits = ½ byte||Nibble||no registers of their own|
|8 bits = 1 byte||byte||z. B. the registers AL and AH|
|16 bits = 2 bytes||Word||z. B. the register AX|
|32 bits = 4 bytes||Double word||z. B. the register EAX|
|64 bits = 8 bytes||Quadruple Word||z. B. the register MM0|
|128 bits = 16 bytes||Double Quadruple Word||z. B. the register XMM0|
The term Word (or word) is also used in the Windows API for a 16-bit number.
|Data width||Bit data types||Integer data types||Range of values|
|8 bits = 1 byte||BYTE (byte)||(U) SINT (short integer)||0..255||−128..127|
|16 bits = 2 bytes||WORD (word)||(U) INT (integer)||0..65 535||−32 768..32 767|
|32 bits = 4 bytes||DWORD (double word)||(U) DINT (Double Integer)||0..2 32 -1||-2 31 ..2 31 -1|
|64 bits = 8 bytes||LWORD (long word)||(U) LINT (Long Integer)||0..2 64 -1||-2 63 ..2 63 -1|
If the letter U is placed in front of an integer data type (e.g. U DINT), this means “unsigned” (unsigned), without U the integer values are signed .
- QuinnRadich: Windows Data Types (BaseTsd.h) - Win32 apps. Retrieved January 15, 2020 (American English).
- May, Cathy .: The PowerPC architecture: a specification for a new family of RISC processors . 2nd Edition. Morgan Kaufman Publishers, San Francisco 1994, ISBN 1-55860-316-6 .
- Agner Fog: Calling conventions for different C ++ compilers and operating systems: Chapter 3, Data Representation (PDF; 416 kB) February 16, 2010. Accessed August 30, 2010.
- Christof Lange: API programming for beginners . 1999. Retrieved December 19, 2010.