Difference between revisions of "Word"
Chris Tyler (talk | contribs) |
Chris Tyler (talk | contribs) (→Bit) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | [[Category:Computer Architecture]] | + | [[Category:Computer Architecture]] |
A word is a set number of bits managed as a unit. | A word is a set number of bits managed as a unit. | ||
Line 7: | Line 7: | ||
A ''hardware word'' is the group of bits normally managed by a processor. The word size is a distinguishing feature of a processor, and is typically a power-of-two multiple of eight bits (8, 16, 32, or 64 bits), although some rare or early processors used different word sizes. | A ''hardware word'' is the group of bits normally managed by a processor. The word size is a distinguishing feature of a processor, and is typically a power-of-two multiple of eight bits (8, 16, 32, or 64 bits), although some rare or early processors used different word sizes. | ||
− | The word size is usually associated with the size of general-purpose [[Register|registers]] and the amount of data read from or written to memory at one time. Most modern processors can read/write alternate word sizes (for example, a "64-bit" x86_64 system can also read/write 32, 16, and 8 bit values to/from memory, and 64-bit registers can be accessed as 32, 16, or 8-bit subsets). | + | The word size is usually associated with the size of general-purpose [[Register|registers]] and the amount of data read from or written to memory at one time. Most modern processors can read/write alternate word sizes (for example, a "64-bit" x86_64 system can also read/write 32, 16, and 8 bit values to/from memory, and 64-bit registers can be accessed as 32, 16, or 8-bit subsets). Additionally, many modern systems use a different memory word size than CPU word size (for example, a "64-bit" system may be built to read/write memory 128 bits at a time), but this is transparent to the programmer and user. |
== Common Names for Various Word Sizes == | == Common Names for Various Word Sizes == | ||
− | == Bit == | + | === Bit === |
A bit is a single ''binary digit'', a value that can take one of two states. These states may be referred to as: | A bit is a single ''binary digit'', a value that can take one of two states. These states may be referred to as: | ||
* 1 or 0 | * 1 or 0 | ||
* True or False | * True or False | ||
* On or Off (electrically) | * On or Off (electrically) | ||
+ | * Positive or Negative charge, or Forward or Reverse current flow (electrically - differential signalling) | ||
=== Byte === | === Byte === | ||
− | A byte is a collection of eight '''bits'''. It is a convenient size for use with many small character sets such as | + | A byte is a collection of eight '''bits'''. It is a convenient size for use with many small character sets such as [http://czyborra.com/charsets/iso646.html ASCII], [http://czyborra.com/charsets/iso8859.html ISO8859], and [http://czyborra.com/charsets/iso646.html#EBCDIC EBCDIC], and can also be used with the [http://czyborra.com/utf/#UTF-8 UTF-8] encoding of Unicode. It is often viewed as the smallest hardware word size that makes sense for general-purpose computing. |
− | Most computers with larger hardware word sizes continue to rank memory, storage, and data sizes in bytes (or prefixed multiples of bytes) for comparability. For example, an x86_64 system will be advertised as having "16 gigabytes" of memory instead of " | + | Most computers with larger hardware word sizes continue to rank memory, storage, and data sizes in bytes (or prefixed multiples of bytes) for comparability. For example, an x86_64 system will be advertised as having "16 gigabytes" of memory instead of "2 gigawords". |
=== Octet === | === Octet === | ||
Line 29: | Line 30: | ||
A nibble (or nybble) is a half-byte, corresponding to one hexadecimal or BCD digit. | A nibble (or nybble) is a half-byte, corresponding to one hexadecimal or BCD digit. | ||
+ | |||
+ | === Half word, Single word, Double word, Quad word === | ||
+ | |||
+ | The terms half word (or halfword or half-word), single word, double word, and quad word are often used in contemporary computing to refer to common word sizes relative to a 32-bit base word size: | ||
+ | * half word = 16 bits | ||
+ | * single word = 32 bits | ||
+ | * double word = 64 bits | ||
+ | * quad word = 128 bits | ||
+ | |||
+ | This terminology can be seen, for example, in the lane naming conventions for AArch64 SIMD (where <code>v0.8h</code> refers to the 128-bit vector register 0 divided in eight half word lanes) and x86_86 instruction suffixes (MOVQ to move a quad word). | ||
+ | |||
+ | The 32-bit base size is reflective of the 32-bit standard integer size used in the predominant LP64 (and less common ILP32) programming models. |
Latest revision as of 10:57, 5 September 2018
A word is a set number of bits managed as a unit.
Contents
Hardware Word
A hardware word is the group of bits normally managed by a processor. The word size is a distinguishing feature of a processor, and is typically a power-of-two multiple of eight bits (8, 16, 32, or 64 bits), although some rare or early processors used different word sizes.
The word size is usually associated with the size of general-purpose registers and the amount of data read from or written to memory at one time. Most modern processors can read/write alternate word sizes (for example, a "64-bit" x86_64 system can also read/write 32, 16, and 8 bit values to/from memory, and 64-bit registers can be accessed as 32, 16, or 8-bit subsets). Additionally, many modern systems use a different memory word size than CPU word size (for example, a "64-bit" system may be built to read/write memory 128 bits at a time), but this is transparent to the programmer and user.
Common Names for Various Word Sizes
Bit
A bit is a single binary digit, a value that can take one of two states. These states may be referred to as:
- 1 or 0
- True or False
- On or Off (electrically)
- Positive or Negative charge, or Forward or Reverse current flow (electrically - differential signalling)
Byte
A byte is a collection of eight bits. It is a convenient size for use with many small character sets such as ASCII, ISO8859, and EBCDIC, and can also be used with the UTF-8 encoding of Unicode. It is often viewed as the smallest hardware word size that makes sense for general-purpose computing.
Most computers with larger hardware word sizes continue to rank memory, storage, and data sizes in bytes (or prefixed multiples of bytes) for comparability. For example, an x86_64 system will be advertised as having "16 gigabytes" of memory instead of "2 gigawords".
Octet
Another name for byte, commonly used in telecommunication standards and in French.
Nibble
A nibble (or nybble) is a half-byte, corresponding to one hexadecimal or BCD digit.
Half word, Single word, Double word, Quad word
The terms half word (or halfword or half-word), single word, double word, and quad word are often used in contemporary computing to refer to common word sizes relative to a 32-bit base word size:
- half word = 16 bits
- single word = 32 bits
- double word = 64 bits
- quad word = 128 bits
This terminology can be seen, for example, in the lane naming conventions for AArch64 SIMD (where v0.8h
refers to the 128-bit vector register 0 divided in eight half word lanes) and x86_86 instruction suffixes (MOVQ to move a quad word).
The 32-bit base size is reflective of the 32-bit standard integer size used in the predominant LP64 (and less common ILP32) programming models.