Determining memory address width from memory size

computer-architecturecomputersmemoryregister

Given a computer A with 1024 x 16 memory and a computer B with 16K x 32 memory, how big are the registers of an Accumulator, program counter, instruction, temporary register, address register, data register?

Computer A we have 1K of words that are 16 bits each.
Computer B is 16K of words with 32 bits each.

My understanding is that DR, AC, IR, TR are simply the size of a word. So they are 16 bits for computer A and 32 bits each in Computer B
But AR and PC depend on the width of a memory address. How do you determine a memory address from the 16K x 32 memory information?

Best Answer

You can't tell for sure just by looking at the size of the memory. Often the processor will have an addressing range that exceeds the amount of memory the computer is designed to take. Most processors have at least a 64k address range, so a computer with only 1k or 16k of memory is probably limited by other factors.

At the other end of the scale, having a large amount of memory does not mean that the processor must have equally large address registers. For example the Intel 8086 achieved a 1 Megabyte address range by adding two 16 bit registers together. Another way to increase addressing range is to use an I/O port to set the upper address lines, thus switching different bits of memory in one bank at a time (this is commonly used with 8 bit CPUs to access more than 64k of memory).

The size of data and instruction registers may match the data bus width, but there are many exceptions. 16 and 32 bit processors often have 8 bit registers that can be used independently or concatenated to make 16 or 32 bits. Some are able to access single bytes on a 16 or 32 bit data bus. It is also possible to have internal registers that are wider than the buses. For example the Motorola MC68008 executes 16 bit instructions and has 32 bit data and address registers, but only has an 8 bit data bus and a 20 bit address bus.