Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Byte addressing
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Background== The basic unit of digital storage is a [[bit]], storing a single 0 or 1. Many common instruction set architectures can address more than 8 bits of data at a time. For example, 32-bit [[x86]] processors have 32-bit [[general-purpose registers]] and can handle 32-bit (4-byte) data in single instructions. However, data in memory may be of various lengths. Instruction sets that support byte addressing supports accessing data in units that are narrower than the word length. An eight-bit processor like the [[Intel 8008]] addresses eight bits, but as this is the full width of the accumulator and other registers, this could be considered either byte-addressable or word-addressable. 32-bit x86 processors, which address memory in 8-bit units but have 32-bit general-purpose registers and can operate on 32-bit items with a single instruction, are 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 and could hence 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 32-bit x86 processors: their 32-bit linear addresses can address 4 billion different items; using word addressing, a 32-bit processor could address 4 Gigawords β or 16 Gigabytes using the modern 8-bit byte. If the 386 and its successors had used word addressing, scientists, engineers, and gamers could all have run programs that were 4 times larger on 32-bit machines. However, 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]], 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 (computing)|mask]] out the old value of the fourth character from the value held in the register, [[bitwise or]] 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.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)