aculty of Engineering Systems & Biomedical Dept. irst Year Cairo University Sheet 6 Computer I 1. Choose rue or alse for each of the following statements a) In a direct addressing mode instruction, the effective address is the same as the address given in the operands section of the instruction. b) he ALU typically contains some internal registers that can be accessed by the code ALU.R1, ALU.R2, etc. c) he basic computer has an address space of 4096 and a word size of 16 bits. herefore, all of its registers must be 16 bits to handle the data. d) he I bit of the instruction format in the basic computer indicate whether the value read is an instruction (I = 1) or data (I = 0) e) or the basic computer, the micro operation complement AC (CMA) has an opcode 7200 the condition: D 7 I 3 B 11 : AC AC will be executed during the 3 state. f) Allowing different addressing modes such as direct and indirect addressing will typically lead to instructions of varying execution time in our Basic Computer. g) he bus system in the microprocessor consists of very complicated hardware and additional software needed for controlling it. h) he micro-instructions generate the control signals needed to implement the different micro-operations of the machine instruction. i) he 2 s complement representation of a negative number is the two s complement of the number had it been positive. j) If there is a carry out after an addition in 2 s complement representation, then there is an over-flow. k) If the following micro operation appears in a program, it will cause an infinite loop :R1 R2, R2 R1-0 1
l) A microprocessor that has a 16-bit address register can access a maximum of 64K addresses. m) he job of the sequencer in a micro programmed control unit is to determine the address of the microinstruction to execute next. n) A microprocessor that has a total of 69 different operations needs a minimum of 7 bits for the opcode. o) Considering all aspects, a microprocessor with only a few registers would be faster as the instructions would be shorter. 2. A computer uses a memory Unit with 256K words of 32 bits each. A binary instruction code is stored in one word of memory. he instruction has four parts: an indirect bit, an operation code, a register code part to specify one of 64 registers, and an address part. a. How many bits are there in the operation code, the register code part, and the address part? b. Draw the instruction word format and indicate the number of bits in each part. c. How many bits are there in the data and address inputs of the memory? 3. Analyze the following circuit: (D2_4E is a DECODER) 4. Explain why each of the following microoperations cannot be executed during a single clock pulse in the system shown in ig. 5-4. Specify a sequence of microoperations that will perform the operation. a. IR M [PC] -0 2
b. AC AC + R c. DR DR + AC (AC does not change) 5. he following control inputs are active in the bus system shown in ig. 5-4 for each case, specify the register transfer that will be executed during the next clock transition. S2 S1 S0 LD Memory Adder ALU OP a. 1 1 1 IR Read b. 1 1 0 PC c 1 0 0 DR Write d. 0 0 0 AC Add 6. Show the contents in hexadecimal of registers PC, AR, DR, IR, and SC of the basic computer when an ISZ indirect instruction is fetched from memory and executed: he initial content of PC is 7. he content of memory at address 7 is EA9. he content of memory at address A9 is 0C35. he content of memory at address C35 is. Give the answer in a table with five columns, one for each register and a row for each timing signal. Show the contents of the registers after the positive transition of each clock pulse. 7. A computer uses a memory of 65,536 words with eight bits in each word. It has the following registers: PC, AR, R (16 bits each), and AC, DR, IR (eight bits each). A memory-reference instruction consists of three words: an 8-bit operation-code (one word) and a 16-bit address (in the next two words). All operands are eight bits. here is no indirect bit. a. Draw a block diagram of the computer showing the memory and registers as in ig. below. (Do not use a common bus). b. Draw a diagram showing the placement in memory of a typical three- word instruction and the corresponding 8-bit operand. c. List the sequence of microoperations for fetching a memory reference instruction and then placing the operand in DR. Start from tinting signal 0 8. Derive the control gates associated with the program counter PC in the basic computer. -0 3
9. Derive the control gates for the write input of the memory in the basic computer. A 32-bit memory unit has 67108864 memory words. ind the number of address lines and data lines for this memory unit. 10. Derive the Boolean expression for the gate structure that clears the sequence counter SC to 0. Draw the logic diagram of the gates and show how the output is connected to the INR and CLR inputs of sc (see igure). Minimize the number of gates. 11. Consider the basic computer whose microinstruction ADD direct has an opcode 1xxx. If the initial content of the AC is 0D10 and that of PC is 54A and the memory contents are as follow: 12. Show the content of each register (in hexadecimal) to fetch and execute the given instruction by completing the table ( given the detailed microinstructions as follows): Address 54A 4A Content 14A 1264 Instruction Phase Microinstruction ADD etch 0 : AR PC 1 : IR M[AR], PC PC +1 Decod 2 : AR IR(0-11) (copy the 12 bits to the AR) e Addres 3 : AR M[AR] s Execut 4 : DR M[AR] e 5 : AC AC + DR, SC 0-0 4
Instruction Phase ime Hexadecimal content of the register PC AC AR DR IR SC etch 0 1 ADD Decode 2 Address 3 Execute 4 5 13. Consider the basic computer registers connected to a common bus system similar to one studied in the course, if the memory size is 128 k instead of 4096 words each of length 24 bits instead of 16 bits, and the instruction format has three parts: an Indirect address bit (I), the op-code part and the address part for this system perform the following: 1) What is the number of bits of the address bus? 2) What is the number of memory reference instructions, register reference instructions and input-output instructions? 3) What is the number of bits of the registers: DR, AR, AC, IR, PC, R, INPR and OUR? ANSWER: Number of bits of the address Bus =.. Number of memory reference instructions =.. Number of register reference instructions =.. Number of input-output instructions =.. DR AR AC IR PC R INPR OUR Size of -0 5
14. Consider the basic computer registers connected to a common bus system shown fig.5-4 in or each indicated micro-instruction, complete the following table: Bus select Source Destination Memory Microinstruction S 2 S 1 S 0 Name Name LD INR CLR Read Write DR 0 R PC AC M [AR] PC PC+1 AR IR DR M [AR] AC AC^DR 15. Consider the basic computer whose microinstruction set is described by able, for each microinstruction completes the following table: Symbol Hexadecimal code Binary Code Reference ype or Category ADD 1xxx or 9xxx memory Arithmetic INC 7200 1111000100000000 IO 7040 CMA 16. Consider the basic computer registers connected to a common bus system shown in figure 5-4 and its microinstruction set described b, write a program (assembly code) that moves the contents of three bytes in the memory start address (0A0) to of three bytes in the memory start address n (0180) -0 6