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

1.The hypothetical machine of Figure 3.4 also has two I/O instructions: 0011 ; e

ID: 3673875 • Letter: 1

Question

1.The hypothetical machine of Figure 3.4 also has two I/O instructions: 0011 ; equals ; Load AC from I/O ; 0111 ; equals ; Store AC to I/O ; In these cases, the 12-bit address identifies a particular I/O device. Show the program execution (using the format of Figure 3.5) for the following program: 1. Load AC from device 5. 2. Add contents of memory location 940. 3. Store AC to device 6. Assume that the next value retrieved from device 5 is 3 and that location 940 contains a value of 2.

2. The program execution of Figure 3.5 is described in the text using six steps. Expand this description to show the use of the MAR and MBR.

3. Consider a hypothetical 32-bit microprocessor having 32-bit instructions composed of two fields: the first byte contains the opcode and the remainder the immediate operand or an operand address.

a. What is the maximum directly addressable memory capacity (in bytes)?

b. Discuss the impact on the system speed if the microprocessor bus has: 1. 32-bit local address bus and a 16-bit local data bus, or 2. 16-bit local address bus and a 16-bit local data bus. c. How many bits are needed for the program counter and the instruction register?

4. Consider a hypothetical microprocessor generating a 16-bit address (for example, assume that the program counter and the address registers are 16 bits wide) and having a 16-bit data bus.

a. What is the maximum memory address space that the processor can access directly if it is connected to a “16-bit memory”?

b. What is the maximum memory address space that the processor can access directly if it is connected to an “8-bit memory”?

c. What architectural features will allow this microprocessor to access a separate “I/O space”?

d. If an input and an output instruction can specify an 8-bit I/O port number, how many 8-bit I/O ports can the microprocessor support? How many 16-bit I/O ports? Explain.

6. Consider a computer system that contains an I/O module controlling a simple keyboard/printer teletype. The following registers are contained in the processor and connected directly to the system bus:

INPR: Input Register, 8 bits OUTR: Output Register, 8 bits FGI: Input Flag, 1 bit FGO: Output Flag, 1 bit

IEN: Interrupt Enable, 1 bit Keystroke input from the teletype and printer output to the teletype are controlled by the I/O module. The teletype is able to encode an alphanumeric symbol to an 8-bit word and decode an 8-bit word into an alphanumeric symbol.

a.Describe how the processor, using the first four registers listed in this problem, can achieve I/O with the teletype.

b.Describe how the function can be performed more efficiently by also employing IEN.

Explanation / Answer

2)
1.The PC contains 300, the address of the first instruction. This instruction (the value 1940 in hexadecimal) is loaded into the IR and the PC is incremented. Note that this process involves the use of a memory address register (MAR) and a memory buffer register (MBR). For simplicity, these intermediate registers are not shown.
2.The first 4 bits (first hexadecimal digit) in the IR indicate that the AC is to be loaded from memory. The remaining 12 bits (three hexadecimal digits) specify the address, which is 940.
3.The next instruction (5941) is fetched from location 301 and the PC is incremented.
4.The old contents of the AC and the contents of location 941 are added and the result is stored in the AC.
5.The next instruction (2941) is fetched from location 302 and the PC is incremented.
6. The contents of the AC are stored in location 941. MAR specifies the address in memory for the next read or write MBR which contains the data to be written into memory or which receives

4)

a. The Maximum memory address space = 2^16 = 64 Kbytes.
b. The Maximum memory address space = 2^16 = 64 Kbytes.
Therefore, in (a) and (b), the microprocessor is to access 64K bytes, but the difference thing between them is that the access of 8-bit memory will transfer a 8 bits and the access of 16-bit memory may transfer 8 bits or 16 bits word.
c. Separate I/O instructions are needed because during its execution will generate separate its own signals I/O signals. That signals will be different from the memory signals which is generated during the execution for memory instructions. Therefore, one more output pin will be needed to carry I/O signals.
d.With an 8-bit I/O port number the microprocessor can support 2^8 = 256 8-bit input ports, and 2^8 = 256 8-bit output ports.With an 8-bit I/O port number the microprocessor can support 2^8 = 256 16-bit input ports,and 2^8 = 256 16-bit output ports. Thus, the size of the I/O port will not change the number of I/O ports since the number of I/O ports depends on the number of bits which is used to represent the I/O port number (equals to 8 bits in both cases).