Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 18

Components of a

Computer
Processor
 Datapath  Control
 Components of the  Component of the
processor that processor that
perform arithmetic commands the
operations and datapath, memory,
holds data I/O devices
according to the
instructions of the
memory
Micro operations
• Elementary operation performed with the data stored in registers
• 4 categories
• Register transfer micro operation
• Arithmetic micro operation
• Logic micro operation
• Shift micro operation
Arithmetic Microoperations

• Microoperation: Operation performed with the data stored in registers.


Eg: Store, Load, Count, Clear etc.
Four Categories:
1. Register transfer microoperations : Transfer binary information
from one register to another.
R3 R1 +R2
2. Arithmetic microoperations: Perform arithmetic operation on data
stored in registers.

3. Logic microoperations: perform bit manipulation operations on data


stored in registers.

4. Shift microoperations: Perform shift operations on data stored in


registers.
Arithmetic Microoperations
• To implement micro operation we need a
hardware
• Adder
Adder
• Half adder: Carry generated from previous addition is not
added in next step.
Applications: Calculators, computers, digital measuring
devices etc
.
• Full adder: Carry generated from previous addition is added
in the next step
Applications: Multiple bit addition, digital processors
Full adder
Binary adder

• To implement the add micro-operation with hardware, we need


– The registers that hold the data and
– The digital component that performs the arithmetic addition.

• Full adder: The digital circuit that forms the arithmetic sum of two bits
and a previous carry is called a full-adder.

• Binary adder: The digital circuit that generates the arithmetic sum of two
binary numbers of any length is called a binary adder.
4-bit binary adder

Binary adder is constructed with full-adder circuits connected in


cascade, with the output carry from one full-adder connected to the
input carry of the next full-adder.

The carries are connected in a chain through the full=adders.

Input : n data bits for the A inputs come from one register (such as R1)
and n data bits for the B inputs come from another register (Such as R2).
The sum can be transferred to a third register or to one of the source
registers (R1 or R2)

Output: S0 S1 S2 S3 C4(carry)
Binary Adder-Subtractor

• Subtractions of binary numbers can be done most conveniently by means


of complements.
• R1-R2= R1 + R2 + 1
• 1’s complement can be implemented with inverters and a one can be
added to the sum through the input carry.
• The addition and subtraction operations can be combined into one
common circuit by including an exclusive-OR gate with each full-adder.
Binary Adder-Subtractor

• Mode M controls the operation


– M=0, the circuit is an adder
– M=1, the circuit is subtractor

• Each XOR gate receives input M and one of the inputs of B.


– When M=0, we have B ⊕ 0= B. The full adders receives the value of B, the
input carry is 0, and the circuit performs A+B.
– When M=1, we have B ⊕ 1= B’ and C0=1. The B inputs are all complemented
and a 1 is added through the input carry. The circuit performs A- B (2’s
complement of B).
Arithmetic circuit-hardware
implementation
• Arithmetic micro operations can be implemented using one composite
Arithmetic circuit
• Basic component is parallel adder
• Arithmetic circuit has:
• 4 Full adder(4 bit arithmetic circuit)
• 4 MUX-for choosing different operations
• Two 4 bit inputs:A & B
• 4 bit output:D
Arithmetic Microoperations

• The arithmetic micro-operations listed in the table can be implemented in one


composite arithmetic circuit.
Arithmetic Circuit

The output of the binary adder: D =A + Y + Cin


Arithmetic Circuit
Figure 4.9 components
• Four full-adder circuits in parallel (4-bit adder)
• Four Multiplexers (for choosing different operations)
• Two 4 bit Inputs A (A0, A1, A2, A3) and B (B0, B1, B2, B3)
• The four inputs from A (A0, A1, A2, A3) go directly to the X inputs of the
binary adder.
• Multiplexer inputs
– Each of the four inputs from B (B0, B1, B2, B3) are connected to the
data inputs of the multiplexers.
– The multiplexers data inputs also receive the complement of B.
– Other two inputs to multiplexers are: Logic 0 (fixed voltage value, 0
volts for TTL integrated circuits) and Logic 1 (signal generated through
inverter).
– 4 multiplexers are controlled by two selection inputs S1 and S0.
• The input carry Cin goes to the carry input of the FA. The other carries a
connected from one stage to the next.
Arithmetic Circuit

D= A+ Y+ Cin. It is possible to generate 8 arithmetic micro-operations


Floating point representation
• 11000000110110011001100110011010
• 11000001010111100000000000000000
• 10111111100100000000000000000000
Single precision
S E Mantissa

1 8 23
double precision

S E Mantissa

1 11 52

You might also like