Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. On the IAS, describe in English the process that the CPU must undertake to re

ID: 3665833 • Letter: 1

Question

1. On the IAS, describe in English the process that the CPU must undertake to read a value from memory and to write a value to memory in terms of what is put intothe MAR, MBR, address bus, data bus, and control bus. addressable 2. Assume a 21 byte/memory Assume a 21 bytelmemory. 2. What are the lowest and highest addresses if memory is byte addressable? What are the lowest and highest addresses if memory is word addressable, assuming 16-bit word? a. b. A digital computer has a memory unit with 24 bits per word. The instruction set consists of 150 different operations. All instructions have an operation code part (opcode) and an address part (allowing for only one address). Each instruction is stored in one word of memory 3. a. How many bits are needed for the opcode? b. How many bits are left for the address part of the instruction? c. What is the maximum allowable size of memory? d. What is the largest unsigned binary number that can be accommodated in one word of memory?

Explanation / Answer

1) For reading a value from memory location, the CPU puts the address of the value into the MAR. The CPU then asserts the Read control line to memory and places the address on the address bus. The contents of the memory location which are passed are placed on the data bus by Memory. After this process this data will be transferred to the MBR.

In order to write a value to memory, the CPU puts the address of the value which it wants to write into the MAR. The CPU also places the data it wants to write into the MBR. The CPU then asserts the Write control line to memory and then places the address on the address bus and the data on the data bus. Memory transfers the data on the data bus into the corresponding memory location.

2)A byte is equal to 8 bits. If it's byte addressable, you cannot refer to an address by anything other than the start of some 8 bits. That is, in a 2^3 byte memory, you will have 8 bytes. The lowest address starts at 0 bytes, and the highest address starts at 7 bytes. (0, 1, 2, …, 6,7 = 8 bytes total)

If the bytes in memory are contiguous then you can fit all 8 bytes of data (or lesser data) into an 8 byte memory perfectly.

2a)If you have 2^24 bytes then

The total number of bits available= 2^ (24 + 3) bits

                                                      = (2^24 * 2^3)

                                                     = 2^ (24+3).

                                                     =134,217,728 bits.

The highest address would be one byte before the end, that is the address at 2^24 - 1. Note that the highest address is 2^24 - 1 and not 2^27 - 1 because we are addressing it by bytes and not by bits.

Therefore

                Highest address = 2^24 - 1

The Lowest address would be 0.

2b)A word is nothing but a group of bytes.

A 1-byte word is literally the same as a byte and also the word is some meaningful piece of data, whereas a byte is not necessarily a meaningful piece of data.

A 16-bit word == a 2-byte word because 8 bits are in a byte, thus if

     The total number of bytes available = 2^24 bytes,

      Then,

      The total number of words = 2^23 words.

Hence

      Lowest address = 0

      Highest address = max number of words - 1 = 2^23 - 1.

3a: 2^8 = 256 which is larger than 150,

      So we take the next lower which is 2^7 = 128 bits.

     Therefore the operation code needs 8bits

3b: 24-8=16.

      There are 16 bits available for the address part of the instruction

3c: 2^16 = 65536.

Max number is XXXXX = 65535.

3d: 2^15 = 32768-1 = 32767