Documente Academic
Documente Profesional
Documente Cultură
ANDHRA PRADESH
Name : A Rajeswara Rao
Designation : Head
Branch : Computer Engg
Institute : GMR Polytechnic, Karimnagar
Year/Semester : III Semester
Subject : Computer Architecture
Subject Code : CM-303
Topic : Arithmetic operations
Duration : 50 Mts
Sub. Topic : Basics of division of fixed point numbers
Teaching Aids to be used : ppts, flow Charts
CM303.28 1
RECAP
CM303.28 2
Objective
magnitude representation.
CM303.28 3
Division of fixed point binary numbers
CM303.28 4
Division of fixed point binary numbers
Contd..
Example:
Consider division of decimal nos.
dividend
divisor3)198(15 quotient
13
68
65
remainder 3
CM303.28 5
Division of fixed point binary numbers
Contd..
Similarly for binary numbers
1011)1 0 0 1 0 1 0 0(1101
1011
01111
1011
01000 0
101 1
10 1
CM303.28 6
Division of fixed point binary numbers
Contd..
Let the divisor and dividend be loaded in register BR,AR.Q
Here Bs is sign of divisor and As is sign of dividend
BR=Bs.B AR=As.A QR=Qs.Q
The length of B,A,Q registers is n bits (4 here)
So sequence counter is set to 4
A0 A1A2A3 An B0 B1B2B3 Bn
B0=Bs
A0=As Q0=Qs
Q0 Q1Q2Q3 QN
The subtraction of divisor B from dividend A.Q can be performed
by 2’s complement method
Now the following steps can be written for division
CM303.28 7
B=1011
B’+1=0101 A.Q=1001 0100
SC Action E A Q Qn
initialization - 1001 0100 0
3 Shift left E.A.Q 1 0010 100X X
add B’+1 0101
1 0111 100X X
E=1,set Qn=1 1 0111 1001 1
7 Shift left E.A.Q 0 1111 001X X
add B’+1 0101
1 0100 001X X
E=1,set Qn=1 1 0100 0011 1
11 Shift left E.A.Q 0 1000 011X X
add B’+1 0101
0 1101 011X X
E=0,restore (add B) 1011
set Qn=0 1000 0110 0
16 Shift left E.A.Q 1 0000 110X X
add B’+1 0101
1 0101 110X X
E=1,set Qn=1 1 0101 1101 1
0 stop CM303.28 remainder Quotient 8
The sign of the quotient
Sign of Sign of
dividend divisor Sign of quotient
As Bs Qs
+ + +
+ - -
- + -
- - +
CM303.28 9
The Flowchart For Fixed Point Division
CM303.28 10
Summary
CM303.28 11
Frequently asked questions
CM303.28 13
Quiz
CM303.28 14