|This article does not cite any sources. (April 2007) (Learn how and when to remove this template message)|
The basic unit of digital storage is called 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.
A 64-bit architecture machine might still need to access 8-bit data over its 64-bit address line, and have the data returned in the bottom 8 bits of its longer data line.
Byte addressable memory refers to architectures where data can be accessed and addressed in units that are narrower than the bus. An eight bit processor like the Intel 8008 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.
In the past, bytes have not always been 8 bits. The word "octet" is still used where the context makes byte-length ambiguous.
For example in the 1980's, Honeywell mainframes had 36 bit words, and were byte addressable in 9 bit bytes, or "nonets", They used 7- or 8-bit character codes, either of which were stored one to each 9-bit byte, making characters individually addressable.
To illustrate why byte addressing is useful, consider the IBM 7094 which was word addressable and had no concept of a byte. It had 36 bit words, and stored its six-bit character codes six to a word.
To change the 15th character in a string, the program had to figure out that this occurred in the third word, fetch the third word, figure out that it wanted the fourth character in that word, mask out the old character from the value held in the register, "or" in the new one, and then store back the amended word. At least six machine instructions. Usually these were relegated to a subroutine, so every store or fetch of a single character involved the overheads 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, smaller, and run faster.
The advantage of word addressing is that more memory can be addressed in the same number of bits. The IBM 7094 had 15 bit addresses, so could address 32768 words of 36bits. The machines were often built with a full complement of addressable memory. Addressing 32768 bytes of 6 bits would have been much less useful for scientific and engineering users.
Or consider the 32 bit Pentium processor. Its 32-bit address bus can address 4 billion different items. Using word addressing, a 32 bit address bus could address 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.
|Wikimedia Commons has media related to Computer memory.|
|This computer hardware article is a stub. You can help Wikipedia by expanding it.|