Unit-3 PPT Co
Unit-3 PPT Co
Unit-3 PPT Co
Arithmetic Processor
• Arithmetic instruction in digital computers manipulate data to produce
results necessary for the solution of the computational problems.
• An arithmetic processor is the part of a processor unit that execute
arithmetic instruction
• An arithmetic instruction may specify binary or decimal data, and it may be
represented in, Fixed point (integer or fraction) OR floating point form.
• An arithmetic processor is simple for binary fixed point add instruction
• It would be more complicated if it includes all arithmetic operations for
binary and decimal data in both representations.
• How to perform basic arithmetic operation with signed magnitude require
valuable knowledge for its hardware implementation.
• The designer must be thoroughly familiar with sequence of steps in order to
carry out the operation and achieve a correct result.
• Algorithm:
– The solution to any problem that is stated by a finite
number of well defined procedural step is called
algorithm.
• Flowchart:
– The convenient method for presenting algorithm is a
flowchart.
– The computational steps are specified in rectangular boxes
– Decision steps indicated inside diamond-shaped boxes
from which two or more alternate path emerge
Addition and Subtraction
• Data types considered for the arithmetic operations are,
– Fixed-point binary data in signed magnitude representation
– Fixed-point binary data in signed-2’s compliment representation
– Floating point binary data
– Binary –coded decimal (BCD) data
• Negative fixed point binary number can be represented in three ways,
– Signed magnitude (most computers use for floating point operations )
– Signed 1’s compliment
– Signed 2’s compliment(most computer use for integers)
Addition and Subtraction with Signed-
Magnitude Data
• Eight different conditions to consider for addition and
subtraction
• The process consist of looking at successive bits of the multiplier, least significant bit
first.
• If the multiplier bit is 1, multiplicand is copied down otherwise zeros are copied down
• Copied number in successive line shifted one position to the left from the previous
number. Finally, the numbers are added and their sum forms the product.
Hardware Implementation
• Multiplication process is change slightly.
• First, instead of providing registers to store and add simultaneously
as many binary numbers as there are bits in multiplier,
– It is convenient to provide an adder for the summation of two number
– And successively accumulate the partial products in a register
• Second, instead of shifting the multiplicand to the left, the partial
product is shifted right
– Which result in leaving the partial product and the multiplicand in the
required relative position
• Third, when the corresponding bit of the multiplier is 0, there is no
need to add all zeros to the partial product since it will not alter its
value
Cont..
• The hardware for multiplication consist of the equipment
shown in figure.
• The multiplier stored in Q register and its sign in Qs.
• The sequence counter SC is initially set to a number equal to
the number of bits in the multiplier.
– The counter is decremented by 1 after forming each partial product.
Fig: (Hardware for multiply operation)
Cont..
• Initially the multiplicand is in register B and the multiplier in Q.
• The sum of A and B forms a partial product which is transferred
to the EA register.
– Both the partial product and multiplier are shifted to the right.(shr EAQ)
– Least significant bit of A is shifted into the most significant position of Q,
– The bit from E is shifted into the most significant position of A and 0 to E.
• After the shift, one bit of partial product is shifted into Q,
pushing the multiplier bit one position to the right.
• In this manner, the rightmost flip-flop in register Q, designated
by Qn, will hold the bit of the multiplier, which must be
inspected next.
Hardware Algorithm
• jl
Fig: Numerical Example for binary multiplier
Booth’s Multiplication Algorithm
Used for multiplication in Signed 2’s complement representation
It operates on the fact that strings of 0’s in the multiplier require no
addition but just shifting
Thus M x 14= M x 24 – M x 21
Used for multiplication in Signed 2’s complement representation
3. The partial product does not change when the multiplier bit is identical
to the previous multiplier bit
Booth’s Multiplication Algorithm
Example - Booth’s Multiplication Algorithm
Binary Division
For Division in hardware, process is slightly changed