Byte addressing
   HOME

TheInfoList



OR:

Byte addressing in hardware architectures supports accessing individual
byte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable uni ...
s. Computers with byte addressing are sometimes called ''byte machines,'' in contrast to '' word-addressable'' architectures, ''
word machine In computer architecture, ''word addressing'' means that addresses of memory on a computer uniquely identify words of memory. It is usually used in contrast with byte addressing, where addresses uniquely identify bytes. Almost all modern comput ...
s'', that access data by
word A word is a basic element of language that carries an objective or practical meaning, can be used on its own, and is uninterruptible. Despite the fact that language speakers often have an intuitive grasp of what a word is, there is no conse ...
.


Background

The basic unit of digital storage is a bit, storing a single 0 or 1. Many common architectures can address more than 8 bits of data at a time. For example, the Intel 386SX processor can handle 16-bit (two-byte) data, since data is transferred over a 16-bit bus. However, data in memory may be of various lengths. Byte addressable memory supports accessing data in units that are narrower than the bus. An eight-bit processor like the
Intel 8008 The Intel 8008 ("''eight-thousand-eight''" or "''eighty-oh-eight''") is an early byte-oriented microprocessor designed by Computer Terminal Corporation (CTC), implemented and manufactured by Intel, and introduced in April 1972. It is an 8-bit CP ...
addresses eight bits, but as this is the full width of the bus, this is regarded as word-addressable. The 386SX, which addresses memory in 8-bit units but can fetch and store it 16 bits at a time, is termed byte-addressable. The advantage of word addressing is that more memory can be addressed in the same number of bits. The IBM 7094 has 15-bit addresses, so could address 32,768 words of 36 bits. The machines were often built with a full complement of addressable memory. Addressing 32,768 bytes of 6 bits would have been much less useful for scientific and engineering users. Or consider the 32-bit
Pentium Pentium is a brand used for a series of x86 architecture-compatible microprocessors produced by Intel. The original Pentium processor from which the brand took its name was first released on March 22, 1993. After that, the Pentium II and P ...
processor. Its 32-bit address bus can address 4 billion different items. Using word addressing, a 32-bit address bus could address 4 Gigawords; or 16 Gigabytes using the modern 8-bit byte. If the 386SX and its successors had used word addressing, scientists, engineers, and gamers could all have enjoyed programs that were 4x larger on 32-bit machines. Then again, word processing, rendering HTML, and all other text applications would have run more slowly. When computers were so costly that they were only or mainly used for science and engineering, word addressing was the obvious mode. As it became cost-effective to use computers for handling text, hardware designers moved to byte addressing. To illustrate why byte addressing is useful, consider the
IBM 7094 The IBM 7090 is a second-generation transistorized version of the earlier IBM 709 vacuum tube mainframe computer that was designed for "large-scale scientific and technological applications". The 7090 is the fourth member of the IBM 700/7000 s ...
, which is word-addressable and has no concept of a byte. It has 36-bit words and stores its six-bit character codes six to a word. To change the 16th character in a string, the program has to determine that this is the fourth character of the third word in the string, fetch the third word,
mask A mask is an object normally worn on the face, typically for protection, disguise, performance, or entertainment and often they have been employed for rituals and rights. Masks have been used since antiquity for both ceremonial and pra ...
out the old value of the fourth character from the value held in the register,
bitwise or In computer programming, a bitwise operation operates on a bit string, a bit array or a binary numeral (considered as a bit string) at the level of its individual bits. It is a fast and simple action, basic to the higher-level arithmetic oper ...
in the new one, and then store back the amended word. At least six machine instructions. Usually, these are relegated to a subroutine, so every store or fetch of a single character involves the overhead of calling a subroutine and returning. With byte addressing, that can be achieved in one instruction: store this character code at that byte address. Text programs are easier to write, they are smaller, and run faster.


Hybrid systems

Some systems, such as the
PDP-10 Digital Equipment Corporation (DEC)'s PDP-10, later marketed as the DECsystem-10, is a mainframe computer family manufactured beginning in 1966 and discontinued in 1983. 1970s models and beyond were marketed under the DECsystem-10 name, espec ...
, use word addressing but facilitate access to individual bytes using special instructions which can access memory using a ''byte pointer'', which contains both a word address and the index of a specific byte within the word.


See also

* Data structure alignment *
Endianness In computing, endianness, also known as byte sex, is the order or sequence of bytes of a word of digital data in computer memory. Endianness is primarily expressed as big-endian (BE) or little-endian (LE). A big-endian system stores the mos ...


References

{{DEFAULTSORT:Byte addressing Computer architecture Central processing unit