Skip to content

Why Did One Byte Have More Than One Address?

Friday, December 4, 2026

On an Intel 8086, 1000:0010 and 1001:0000 are two addresses for the same byte. I mean this quite literally. Write a value through the first address, then read through the second, and you get the value you just wrote. It seems to me that if you have gone to the trouble of supplying two numbers to identify a single byte, there ought to be one right answer. There are 4,096.

The arithmetic is easier than the notation. Both numbers are hexadecimal. The one on the left is the segment, and the one on the right is the offset. To get the address that goes out to memory, the processor shifts the segment value left four bits, which is the same as appending a hexadecimal zero, and adds the offset.

1000:0010    10000 + 0010 = 10010
1001:0000    10010 + 0000 = 10010

If you move the beginning of the segment forward 16 bytes and move your offset back 16 bytes, you end up where you started. The same byte can be the first byte of one segment, the seventeenth byte of another, and so on. For this particular byte, every offset from 0000 through FFF0 in steps of 0010 gives you a valid spelling when you choose the segment to match.

What DOS Programmers Had to Know

Intel’s designers wanted the 8086 to reach a megabyte of memory while doing most of its work with 16-bit quantities. A 16-bit offset can reach 65,536 bytes, which gives you a 64 KiB window. The processor had separate registers for the current code, data, stack, and an extra segment, so it could keep several windows open at once. Their positions could be as little as 16 bytes apart. The CPU could fetch the next instruction using a 16-bit offset into the code segment and fetch a variable using a 16-bit offset into the data segment, with each instruction relying on the appropriate segment register to supply the rest of the address.1

That arrangement made its way into DOS C compilers. A near pointer needed only the offset because the compiler knew which segment to use. A far pointer carried both the segment and the offset. A program with a lot of code and little data might need far pointers for functions and near pointers for variables. A program with the opposite problem might want the opposite arrangement. This is what you were choosing when you selected a memory model such as medium or compact. There were also huge pointers. An ordinary far pointer could reach anywhere, but its arithmetic could still wrap the offset inside a 64 KiB window. A huge pointer could walk an array across that boundary by adjusting the segment as it went. The compiler did extra work every time you advanced the pointer.2

People also remember DOS in connection with a 640 KiB memory limit. You can make sense of that number by looking at a different manual. In the IBM PC/XT memory map, the reserved upper region starts at A0000 hexadecimal, which is 640 KiB from the beginning of the address space. Farther up the map are the monochrome and color display memory and, near the top, the system ROM. The processor could address that whole region. Indeed, it had to, if it was going to put anything on the screen. The 64 KiB window tells you how much of the address space one offset can reach. The 640 KiB boundary tells you where IBM stopped setting aside addresses for ordinary RAM.3

What Else Could a Segment Be?

Zilog’s Z8001 also gave the programmer a 16-bit offset, but it used a seven-bit segment number to select one of 128 logical regions of 64 KiB each. Add one to the 8086 segment value and the start of the window moves 16 bytes. Add one to the Z8001 segment number and you move 65,536 bytes in the logical address space. So the little arithmetic trick at the start of this post fails on the Zilog. Its two fields fit together directly. An optional Z8010 memory management unit could then translate that logical address for you.4

Multics had already done something more ambitious. A Multics segment could hold a procedure or a body of data, with its own length and access rights. In the design described by Robert Daley and Jack Dennis in 1968, a process could refer to a segment by number and then use an offset measured in 36-bit words. Two processes could share the same procedure segment, even if they knew it by different segment numbers. The system could bring individual pages of that procedure into memory as needed. The segment told Multics what the processes were sharing, and the pages told it which parts had to be in memory right now.5

Other machines used the idea even when the programmer saw a single number. The IBM System/360 Model 67 split a virtual address into three fields. The segment field picked a page table, the page field picked an entry in that table, and the byte field located the byte within the page. On a PDP-11 with split instruction and data space, the kind of access could change the interpretation of the number. Fetch an instruction at a particular 16-bit address and you could land in one place in physical memory. Read data at the same address and you could land somewhere else. On the 8086, we had to explain how two addresses could name one byte. On that PDP-11, we have to explain how one address can name two.67

Intel itself changed the meaning of the left-hand number. In the 80286’s protected mode, the segment register held a selector. It told the processor where to look up a descriptor containing the base address, a limit, and the permissions that applied to it. Take an ordinary data segment 4 KiB long. An offset of 5,000 bytes fits quite comfortably in 16 bits, but the processor would reject the access because the descriptor says it’s outside the segment. You could still write a pair of numbers with a colon between them. The processor now had rules to check before it could use the resulting address.8

I started with two addresses for the same byte because that was the part that seemed peculiar. After looking at these machines, I think the more revealing question is what the machine was supposed to know about that byte. Multics could use the segment to keep track of a procedure that belonged in several processes at once. The 286 could use it to decide whether a program was allowed to read a byte at all. The 8086 could give a program a choice of 4,096 ways to ask for a particular byte, and the memory bus would see 10010 every time.

Footnotes

  1. Intel, The 8086 Family User’s Manual, and Stephen P. Morse et al., “Intel Microprocessors: 8008 to 8086”, section III.A. ↩

  2. Raymond Chen, “A look back at memory models in 16-bit MS-DOS”. ↩

  3. IBM, Personal Computer XT Technical Reference, “System Memory Map.” ↩

  4. Zilog, Z8000 CPU Technical Manual, section 3.4.2. ↩

  5. Robert C. Daley and Jack B. Dennis, “Virtual Memory, Processes, and Sharing in Multics”, 1968. ↩

  6. IBM, IBM System/360 Model 67 Functional Characteristics, “Dynamic Address Translation.” ↩

  7. Digital Equipment Corporation, PDP-11 Processor Handbook, chapter 6. ↩

  8. Intel, iAPX 286 Programmer’s Reference Manual, chapters 6 and 7. ↩