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

(a) Explain what is meant by a register in a CPU. Explain its purpose and which

ID: 2249134 • Letter: #

Question

(a) Explain what is meant by a register in a CPU. Explain its purpose and which logic circuits are used to realize it. Explain one possible relation between a computer program and a register.

(b) Design an 8-bit ALU that takes two 8-bit inputs A and B, and performs
one of the following functions according to an opcode: A+B, A*B,
Increment A, A AND B, sqrt A , no operation (output=A). Assume logic
elements that perform each of these functions are available.
i) Draw the schematic of the ALU using the logic elements and any
additional combinational circuits and
ii) write down which opcode corresponds to which of the ALU functions.

(c) Draw the schematic of a circuit that realizes a fast division by 8 for
two's complement numbers (assume 8 bits); and write the result
obtained with the following inputs: +45; +1; -1, -60.
[6 marks]

Explanation / Answer

(a) A register in CPU is mainly used to store values. it can be of any size. One bit register means it is capable to store one bit, wheras 8-bit register capable of storing 8 bits of value. The main logic circuit used to create a register is the Flipflops. Flipflops are made of gates. The main category of Flipflops are T-Flipflop, D-Flipflop, S-R-Flipflop, J-K Flipflops. It is not possible to store a computer program in a register. But the results of he program can be stored in register. Computer programs can be stored in computer memory.

(b). An ALU can be designed to perform the all operation, We need some gates, AND, EXOR. Addition can be performed using an 8-bit adder, By modifying this adder we can perform 8-bit mutiplication, square root etc