Question 1: What criteria define Von Neumann architecture? Identify clearly and coherently. [5 marks]
The image above shows the criteria that defines the Von Neumann architecture. The Von Neumann architecture is the basic underlying architecture maintained I most modern computers. It was developed in the late 1950s and described a digital computer that consisted of four significant and essential parts. The basis of the architecture is the fetch, decode, execute and write back to memory cycle. These parts make up the entire architecture that is divided into the processor unit, the control unit, input/output capabilities, and a memory unit.
The processor unit is responsible for carrying out the computing functions of a digital computer. This is mainly because it contains an arithmetic logic unit (ALU) that carries out arithmetic and logic operations as required by the computer. It also consists of processor registers which temporary store data that is being handled by the processor.
Based on the Von Neumann architecture the control unit consists of an instruction register. The control unit is responsible for coordinating all the different components that make up the Von Neumann machine. It helps to fetch the next instruction to be executed by the processor from memory. It also provides timing signals that help to synchronize the digital computer and acts as the central management point through which all resources are effectively managed and shared as needed for different tasks. It consists of an instruction register, which stores the instruction that is being executed by the machine.
The third part the Von Neumann machine is the memory unit. The memory unit stores both data and instructions that are needed by the digital computer.
Question 2: The following Little Man program is supposed to add two number inputs, subtract a third input number from the sum and out put the result. (a) What is wrong with this program? (b) Repair the program so that it produces the correct results. [5 marks]
OUT = IN1 + IN2 - IN3
The problem that has been identified with the code is that the programs first captures the first two digits, adds them, captures the third digit and subtracts it from the result. This may introduce an error since the accumulator has not been loaded. The work of the accumulator stores intermediate results of mathematical operations. Without the accumulator, the value of the initial addition cannot be used for the subtraction since it is not considered as an intermediate result. Without the accumulator, the intermediate result would have to be stored in an external memory location where it can be retrieved for the subtraction stage of the problem. In addition, the code stores the three numbers in the same location. This needs to be changed in order to ensure that the output is correct.
Below is the modified code that includes the use of the accumulator.
Question 3: A modern computer has a 36-bit memory address register. How much memory (in gigabyte) can this computer address? Show your work. [5 marks]
With a 36-bit MAR the computer can be able to address = 2n
n= size of the MAR = 36
236 bytes = 6.871947674 x 1010
In gigabytes = (236 / 230 ) = 2 6 = 64 GB
Therefore, a 36-bit memory address register can address 64 GB of memory.
Question 4: Why are there two different registers (MAR and MDR) associated with memory? What are the equivalents in the Little Man Computer? Explain clearly and coherently. [5 marks]
There are two registers that deal with memory (MAR and MDR) mainly because both registers have different purposes. Both registers work together to ensure that the right memory locations, instructions and data are accessed. The Memory Address Register is a register that contains the memory address of the next instruction or the memory address of the data to be fetched or written. This means that MAR contains the address location of where data is contained or where data is to be stored. This address is used by the MDR to access memory locations. The Memory Data Register (MDR) is a register that act6s as a data buffer between the processor and the computer storage. Unlike the MAR, MDR contains the actual data that is to be operated on by the processor. Therefore, it is a two-way register with two-way copy capability where data is fetched from memory and can be written back into memory.
For the Little Man Computer the MAR can be compared to the Program Counter. As stated earlier, in a modern compute the Memory Address Register is a register that contains the memory address of the next instruction or the memory address of the data to be fetched or written. In a LMC, the program counter contains the address of the next instruction to be executed. This is the same task and thus the two are equivalent. For the LMC the Memory Data Register (MDR) can be compared to the mailbox. The input mailbox contains the data that will be executed or written into memory. This is the same task that is fulfilled by the MDR in a modern computer thus, they are equivalent.
Question 5: If you were building a computer in outer space, would you be likely to use some form of flash memory or RAM as main memory? Explain clearly and coherently. [5 marks]
I would use flash memory for a computer to be used in outer space. The main reason for this decision is that flash memory is not volatile as compared to RAM. RAM requires constant supply of power in order to maintain data as well as reading and writing of data. Flash memory, on the other hand, does not require power to store, read and write data. In space, power supply is a major issue. Therefore, there is a need to have a memory device that does not rely on power. This means that data cannot be lost due to lack of power in space. In addition, as compared to other memory types, flash disks are durable and adverse conditions do not have any effect on the content of the flash memory. Such conditions such extreme temperatures that may be experienced in space would not affect the contents of the flash memory. Last, flash memory is cheap as compared to RAM.
Question 6:Â As computer words get larger and larger, there is a law of diminishing returns; the speed of execution of real application programs does not increase and may, in fact, decrease. Why do you suppose that this is so? [5 marks]
Initially when the word size for computers started to increase the speed would increase, however, at some point it was not practical to increase the execution speeds of applications. Increasing word size involves increasing the size of memory locations and the size of registers. These leads to an increase in the amount of time required to access the larger memory locations. This in turn decreases the speed. Most processor manufacturers have realized that there were practical limits to processor speeds. This led to them increasing the number of processors and this had led to a drastic increase in the number of cores.
Question 7: How does the LM execute the CPU fetch-execute cycle of a store instruction below? [5 marks]
A: PC -> MAR
B: MDR -> IR
C: IR [add] -> MAR
D: A -> MDR
E: PC + 1 -> PC
A: The address of the next instruction to be executed is transferred from the Program Counter (PC) to Memory Address Register (MAR)
B: The content of the Memory Data Register (MDR) is transferred to the Instruction Register (IR)
C: The address of the content of the IR is transferred to the MAR
D: The content of A is transferred from the data bus to the MDR
E: The PC increments and prepares to execute the next instruction