UINT - III Remaining Notes
UINT - III Remaining Notes
Control Unit
The Control Unit is part of the computer’s central processing unit (CPU),
which directs the operation of the processor. It was included as part of the
Von Neumann Architecture by John von Neumann. It is the responsibility of
the control unit to tell the computer’s memory, arithmetic/logic unit, and
input and output devices how to respond to the instructions that have been
sent to the processor. It fetches internal instructions of the programs from the
main memory to the processor instruction register, and based on this register
contents, the control unit generates a control signal that supervises the
execution of these instructions.
Examples of devices that require a CU are:
Control Processing Units(CPUs)
Graphics Processing Units(GPUs)
Performance:
The most important measure of the performance of a computer is how
quickly it can execute programs. The speed with which a computer executes
program is affected by the design of its hardware. For best performance, it is
necessary to design the compiles, the machine instruction set, and the
hardware in a coordinated way.
Processor clock:
Register Transfer
The term Register Transfer refers to the availability of hardware logic circuits
that can perform a given micro-operation and transfer the result of the
operation to the same or another register.
Most of the standard notations used for specifying operations on various
registers are stated below.
The following image shows the block diagram that depicts the transfer of
data from R1 to R2.
Here, the letter 'n' indicates the number of bits for the register. The 'n' outputs
of the register R1 are connected to the 'n' inputs of register R2.
A load input is activated by the control variable 'P' which is transferred to the
register R2.
Bus and Memory Transfers
A digital system composed of many registers, and paths must be
provided to transfer information from one register to another. The number of
wires connecting all of the registers will be excessive if separate lines are
used between each register and all other registers in the system.
A bus structure, on the other hand, is more efficient for transferring
information between registers in a multi-register configuration system.
A bus consists of a set of common lines, one for each bit of register, through
which binary information is transferred one at a time. Control signals
determine which register is selected by the bus during a particular register
transfer.
The following block diagram shows a Bus system for four registers. It is
constructed with the help of four 4 * 1 Multiplexers each having four data
inputs (0 through 3) and two selection inputs (S1 and S2).
We have used labels to make it more convenient for you to understand the
input-output configuration of a Bus system for four registers. For instance,
output 1 of register A is connected to input 0 of MUX1.
The two selection lines S1 and S2 are connected to the selection inputs of all
four multiplexers. The selection lines choose the four bits of one register and
transfer them into the four-line common bus.
When both of the select lines are at low logic, i.e. S1S0 = 00, the 0 data
inputs of all four multiplexers are selected and applied to the outputs that
forms the bus. This, in turn, causes the bus lines to receive the content of
register A since the outputs of this register are connected to the 0 data inputs
of the multiplexers.
Similarly, when S1S0 = 01, register B is selected, and the bus lines will
receive the content provided by register B.
The following function table shows the register that is selected by the bus for
each of the four possible binary values of the Selection lines.
A bus system can also be constructed using three-state gates instead of
multiplexers.
The three state gates can be considered as a digital circuit that has three
gates, two of which are signals equivalent to logic 1 and 0 as in a
conventional gate. However, the third gate exhibits a high-impedance state.
The most commonly used three state gates in case of the bus system is
a buffer gate.
The graphical symbol of a three-state buffer gate can be represented as:
Memory Transfer
Most of the standard notations used for specifying operations on memory
transfer are stated below.
Read: DR ← M [AR]
Arithmetic Micro-operations:
In general, the Arithmetic Micro-operations deals with the operations
performed on numeric data stored in the registers.
The basic Arithmetic Micro-operations are classified in the following
categories:
1. Addition
2. Subtraction
3. Increment
4. Decrement
5. Shift
Binary Adder:
The Add micro-operation requires registers that can hold the data and
the digital components that can perform the arithmetic addition.
A Binary Adder is a digital circuit that performs the arithmetic sum of two
binary numbers provided with any length.
A Binary Adder is constructed using full-adder circuits connected in series,
with the output carry from one full-adder connected to the input carry of the
next full-adder.
The following block diagram shows the interconnections of four full-adder
circuits to provide a 4-bit binary adder.
o The augend bits (A) and the addend bits (B) are designated by subscript
numbers from right to left, with subscript '0' denoting the low-order bit.
o The carry inputs starts from C0 to C3 connected in a chain through the
full-adders. C4 is the resultant output carry generated by the last full-
adder circuit.
o The output carry from each full-adder is connected to the input carry of
the next-high-order full-adder.
o The sum outputs (S0 to S3) generates the required arithmetic sum of
augend and addend bits.
o The n data bits for the A and B inputs come from different source
registers. For instance, data bits for A input comes from source register
R1 and data bits for B input comes from source register R2.
o The arithmetic sum of the data inputs of A and B can be transferred to a
third register or to one of the source registers (R1 or R2).
Binary Adder-Subtractor:
The Subtraction micro-operation can be done easily by taking the 2's
compliment of addend bits and adding it to the augend bits.
The Arithmetic micro-operations like addition and subtraction can be
combined into one common circuit by including an exclusive-OR gate with
each full adder.
The block diagram for a 4-bit adder-subtractor circuit can be represented as:
o When the mode input (M) is at a low logic, i.e. '0', the circuit act as an
adder and when the mode input is at a high logic, i.e. '1', the circuit act
as a subtractor.
o The exclusive-OR gate connected in series receives input M and one of
the inputs B.
o When M is at a low logic, we have B⊕ 0 = B.
The full-adders receive the value of B, the input carry is 0, and the
circuit performs A plus B.
o When M is at a high logic, we have B⊕ 1 = B' and C0 = 1.
The B inputs are complemented, and a 1 is added through the input
carry. The circuit performs the operation A plus the 2's complement of
B.
Binary Incrementer
The increment micro-operation adds one binary value to the value of
binary variables stored in a register. For instance, a 4-bit register has a binary
value 0110, when incremented by one the value becomes 0111.
The increment micro-operation is best implemented by a 4-bit combinational
circuit incrementer. A 4-bit combinational circuit incrementer can be
represented by the following block diagram.
o A logic-1 is applied to one of the inputs of least significant half-adder,
and the other input is connected to the least significant bit of the
number to be incremented.
o The output carry from one half-adder is connected to one of the inputs
of the next-higher-order half-adder.
o The binary incrementer circuit receives the four bits from A0 through
A3, adds one to it, and generates the incremented output in S0 through
S3.
o The output carry C4 will be 1 only after incrementing binary 1111.