"Consider as an example a typical computer of that era which might have had a 16 bit address field in its instructions and 4096 words of memory.A program on this computer could address 65536 words of memory."

I don't understand some of the terms. What is meant by "16 bit address field" , "words of memory" . And what does "4096" denote ?

I don't get the feel of what the author is saying.Please explain the whole sentence.


3 Answers 3


Let's start with the word "word" (pun intended)

In this case it represents the default size of the storage medium of the system. This could be any number of bits, but was commonly 8 bits (in, for example the Z80 of the ZX Spectrum, etc), or 16 bits in the early PC systems (8086, 80286 etc).

So an 8 bit computer has a word size of 8 bits.

Then there are 16 address bits. This is literally the number of address lines on the chip. Again, taking the Z80 as an example, there were 16 of them (A0 to A15). This gives a possible \$2^{16}\$ addresses - 65536.

Each one of those addresses represents the memory location of one word of data.

That's 65535 available words - on an 8-bit system that's 64KBytes. On a 16-bit system it would be double that at 128KBytes.

Now, the RAM memory, the ROM memory, and (depending on the architecture) the IO peripherals will all take a number of those 65536 addresses.

Say for example you have 2K of ROM and 4K of RAM. That's 2048 addresses of ROM and 4096 addresses of RAM. Not all the addresses are used up, so there is room for memory expansion say.

The ZX Spectrum 48K had 16K of ROM and 48K of RAM for example. That's 16384 addresses pointing to ROM, and 49152 addresses pointing to RAM.

How much of the available 65536 addresses are actually used is purely down to the designer of the computer.

  • \$\begingroup\$ early PC was 8088 based, which had an 8 bit data path. I believe IBM decided on the 8088, rather than the 16 bit 8086, in order to use cheaper 8 bit peripheral devices in order to keep the price down. \$\endgroup\$
    – JustJeff
    Nov 16, 2011 at 17:10
  • \$\begingroup\$ That they did - that's why I specifically mentioned 8086 not the 8088 which is almost akin to the Z80. \$\endgroup\$
    – Majenko
    Nov 16, 2011 at 17:12
  • \$\begingroup\$ can you please explain this "Say for example you have 2K of ROM and 4K of RAM. That's 2048 addresses of ROM and 4096 addresses of RAM" how ? \$\endgroup\$ Nov 17, 2011 at 11:03
  • 1
    \$\begingroup\$ 1KByte is 1024 bytes - that's \$2^{10}\$ bytes. If one word is 8 bits, then one word is one byte. That means that there are 1024 words in 1KByte of RAM. The \$2^{10}\$ tells you instantly that it takes 10 address lines to represent 1024 possible combinations. For 2KBytes it would be 2048, and for 4KBytes it would be 4096 (\$4\times(2^{10})\$). \$\endgroup\$
    – Majenko
    Nov 17, 2011 at 11:07

Here is a start. I recommend reading a textbook, perhaps the one from which you have copied the text.

In the meantime here are some links I googled for you:

4096 denotes a number. 4096 is also 2^12. For more information on 4096 please see http://www.wolframalpha.com/input/?i=4096


Instructions words inside a computer can thought of as being composed of a set of bit "fields" as apposed to merely a collection of bits. Look at the binary encoding of any instruction set and you will see how this works. For example, let's say a computer uses 16 bit instruction words. The high 4 bits of these 16 might indicate the overall opcode. These 4 bits together would be called the opcode "field". Since it contains 4 bits, there are 16 possible high level opcodes on this computer.

Opcode field = 0 might indicate a add, 1 a AND, 2 OR, 3 XOR, 4 jump, etc. The computer still needs more information about each of these operations to perform them. For example, opcode 0 means the ALU will be set to the ADD operation, but there is likely still a choice of what two things to add and where to put the result. This is what the remaining 12 bits (in this example) are used for. Let's say this computer uses a register architecture with 16 registers tightly coupled to the ALU. In that case the remaining 12 bits could be three fields of 4 bits each. Two fields specify the two source registers to add, and the third which register to stuff the result into.

Other opcodes require other parameters than register values. For example, a jump needs to somehow specify a program memory address. One way would be for the low 12 bits of the jump instruction to explicitly provide the fixed address. That's fine if the computer has only 2^12 = 4096 program memory locations. If it has more, there are a variety of tricks that can be used. The jump instruction could reference one of the registers which contains the address, or the 12 bit address field could be a signed offset from the current address. A number of other schemes are possible, and quite a variety have been used.

The section you quoted says the particular computer in question had a 16 bit wide address field in the instruction. That means the instruction could specify 2^16 = 65536 different possible addresses. If these are taken as absolute addresses, then this instruction supports a memory size of 65536 words.

The section you quoted also says this computer had 4096 words of memory, which is somewhat contradictory. Perhaps this makes sense considering the context before or after this single sentence. Some computers have separate program memory and data memories, which can therefore have different sizes. Perhaps on this computer whatever is being addressed by the 16 bit field is a memory that can contain up to 65536 words, but another memory is smaller. Note that 4096 = 2^12, so a full address of the smaller memory only needs to be 12 bits wide.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.