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
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!
{{Short description|Computer architecture with addressable bytes}} {{More citations needed|date=April 2017}} '''Byte addressing''' in hardware architectures supports accessing individual [[byte]]s. Computers with byte addressing are sometimes called '''byte machines''', in contrast to ''[[word-addressable]]'' architectures, ''[[word machine]]s'', that access data by [[word orientation|word]].<ref name="Economia_Word" /><ref name="Hansen_1986"/> ==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. ==Hybrid systems== Some systems with [[word addressing]], such as the [[PDP-10|PDP-6/10]] and the [[GE-600 series|GE-600]]/[[Honeywell 6000 series|Honeywell 6000]] series, have special mechanisms for accessing bytes efficiently. On the PDP-6/10, special instructions operated on a ''byte pointer'' which included a word address, a bit offset, and a bit width. The {{Mono|LDB}}/{{Mono|DPB}} instructions loaded or stored one byte, the {{Mono|IBP}} instruction incremented the byte pointer, and the {{Mono|ILDB}}/{{Mono|IDPB}} instructions incremented the byte pointer and then loaded or stored the next byte. These instructions could operate on arbitrary-width bit fields.<ref name="1982-pdp10-proc-ref-man">{{cite book|url=http://bitsavers.org/pdf/dec/pdp10/1982_ProcRefMan.pdf|title=DECsystem-10/DECSYSTEM-20 Processor Reference Manual|id=AD-H391A-T1|date=June 1982|publisher=[[Digital Equipment Corporation]]}}</ref>{{rp|pages=2{{hyp}}85-2{{hyp}}89}} Programs took advantage of this flexibility: those not needing lowercase letters used the limited character set of [[Six-bit character code|6-bit bytes]] for efficiency; most used [[7-bit ASCII]], packed 5 to a word with one unused bit; and the [[C (programming language)|C]] implementation used 9-bit bytes because C requires all memory to be byte-addressable. On the GE/Honeywell machines, special [[Addressing mode|indirect addressing modes]] could be used on most instruction types, and operated on a byte pointer which could operate on either 6-bit or 9-bit bytes.<ref>{{cite book|url=http://www.bitsavers.org/pdf/ge/GE-6xx/CPB-1004F_GE-635_Prog_Ref_Man_196907.pdf|title=GE-625/635 Programming Reference Manual|date=July 1969|publisher=[[General Electric]]|pages=169, 171β172}}</ref> Neither of these machines originally had direct machine support for random access to bytes; adjusting a byte pointer to point ''N'' bytes before or after the byte to which it currently pointed required a sequence of multiple instructions. The KL10 PDP-10 model extended the {{Mono|IBP}} instruction to become the "adjust byte pointer" instruction, {{Mono|ADJBP}}, that could adjust a byte pointer by an arbitrary number of bytes.<ref name="1982-pdp10-proc-ref-man" />{{rp|pages=2{{hyp}}89-2{{hyp}}91}} ==See also== * [[Data structure alignment]] * [[Endianness]] ==References== {{reflist|refs= <ref name="Hansen_1986">{{cite book |author-first=H. R. |author-last=Hansen |title=Wirtschaftsinformatik |language=German |volume=I |edition=5 |publisher=Gustav Fischer |location=Stuttgart, Germany |date=1986 |page=125}}</ref> <ref name="Economia_Word">{{cite web |title=Wortmaschine |language=German |url=http://www.economia48.com/deu/d/wortmaschine/wortmaschine.htm |access-date=2017-04-09 |url-status=live |archive-url=https://web.archive.org/web/20170409225720/http://www.economia48.com/deu/d/wortmaschine/wortmaschine.htm |archive-date=2017-04-09}}</ref> }} {{DEFAULTSORT:Byte addressing}} [[Category:Computer architecture]] [[Category:Central processing unit]]
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)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite book
(
edit
)
Template:Mono
(
edit
)
Template:More citations needed
(
edit
)
Template:Reflist
(
edit
)
Template:Rp
(
edit
)
Template:Short description
(
edit
)