# address field and words of memory

"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.

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.

• 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. – JustJeff Nov 16 '11 at 17:10
• That they did - that's why I specifically mentioned 8086 not the 8088 which is almost akin to the Z80. – Majenko Nov 16 '11 at 17:12
• 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 ? – Suhail Gupta Nov 17 '11 at 11:03
• 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})$). – Majenko Nov 17 '11 at 11:07

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