ArticleslgStudy

computer science

Byte addressing

Byte addressing is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Byte addressing rather than just read about it. In short: Byte addressing in hardware architectures supports accessing individual bytes. Computers with byte addressing are sometimes called byte machines, in contrast to word-addressable architectures, word machines, that access data by word.

Key takeaways

  • Byte addressing belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Byte addressing to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Byte addressing from memory before moving on to harder problems.

Reference excerpt

Byte addressing in hardware architectures supports accessing individual bytes. Computers with byte addressing are sometimes called byte machines, in contrast to word-addressable architectures, word machines, that access data by word.

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 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-6/10 and the GE-600/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 LDB/DPB instructions loaded or stored one byte, the IBP instruction incremented the byte pointer, and the ILDB/IDPB instructions incremented the byte pointer and then loaded or stored the next byte. These instructions could operate on arbitrary-width bit fields. Programs took advantage of this flexibility: those not needing lowercase letters used the limited character set of 6-bit bytes for efficiency; most used 7-bit ASCII, packed 5 to a word with one unused bit; and the C implementation used 9-bit bytes because C requires all memory to be byte-addressable. On the GE/Honeywell machines, special 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. 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 IBP (increment byte pointer) instruction to become the adjust byte pointer instruction, ADJBP, that could adjust a byte pointer by an arbitrary number of bytes; providing a primitive for indexing into an array of bytes.

See also Data structure alignment Endianness

References

Worked examples

Example 1 — a first encounter with Byte addressing

Start with the simplest possible case. Write down what Byte addressing claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Byte addressing before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Byte addressing ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Byte addressing

In research
Byte addressing appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Byte addressing in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Byte addressing is common in secondary-school and first-year university syllabi. It links to neighbouring topics Central processing unit, Computer architecture, so understanding it makes those chapters shorter.
In everyday life
Look for Byte addressing outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Byte addressing” →

How to study Byte addressing in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Byte addressing means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Byte addressing out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Byte addressing in simple terms?

Byte addressing in hardware architectures supports accessing individual bytes. Computers with byte addressing are sometimes called byte machines, in contrast to word-addressable architectures, word machines, that access data by word.

Why does Byte addressing matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Byte addressing?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Byte addressing.

Tags

  • Central processing unit
  • Computer architecture

Keep exploring