Data word

from Wikipedia, the free encyclopedia

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.

In programming languages, however , the data word is a platform-independent data unit or the designation for a data type and generally corresponds to 16  bits or 32 bits (see examples ).

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:

Different meanings

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 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.

Examples

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.

PLC

When programming programmable logic controllers  (PLC), the IEC 61131-3 standard defines the word sizes as follows:

Data width Bit data types Integer data types Range of values
unsigned signed
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 .

Individual evidence

  1. http://www.wissen.de/lexikon/ververarbeitungbreite
  2. QuinnRadich: Windows Data Types (BaseTsd.h) - Win32 apps. Retrieved January 15, 2020 (American English).
  3. 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 .
  4. 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.
  5. Christof Lange: API programming for beginners . 1999. Retrieved December 19, 2010.