Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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 floating point addition / subtraction
Teaching Aids to be used : Ppts
CM303.30 1
RECAP
CM303.30 2
Objective
CM303.30 3
Add/subtract operation
To perform add/ subtracting operation, the floating point
numbers need two registers one holding mantissa and the
other exponent
Eg.
The number 0.1011001X2-3 is represented using two
registers as
01011001 1011
Reg A Reg a
mantissa exponent
CM303.30 4
Add/subtract operation
Contd..
Here Reg A is assumed to be 8 bit
And Reg a is assumed to be 4 bit
CM303.30 5
Add/subtract operation
Contd..
Eg:
Similarly The number
-0.1010001X24 can be represented as
11010001 0100
Reg A Reg a
mantissa exponent
CM303.30 6
Add/subtract operation
Contd..
Here Reg A is assumed to be 8 bit
And Reg a is assumed to be 4 bit
CM303.30 7
Add/subtract operation
Contd..
Normalization:
The representation of a floating point number is said
to be in normalized form if it is in the form of
b0.b1b2b3b4.. Ee0e1e2e3..
Where
b0 is sign bit of mantissa
b1=1
e0 is sign of exponent
e1e2e3e4.. Is magnitude of exponent
Add/subtracting operation
CM303.30 8
Add/subtract operation
Contd..
Example:-
CM303.30 9
Addition/subtract
Contd..
CM303.30 10
Addition/subtract
Contd..
Eg:
case 1: Exponents are equal
operand 1 0.1234
operand 2 0.2345*10-3
the sum is 0.9753*10-3
As
0.1234
0.2345
0.9753
CM303.30 11
Addition/subtract
Contd..
Eg:
case 2: Exponents are equal
operand 1
0.9234X10-3
operand 2 0.8345X10-3
the sum is 0.9753X10-3
CM303.30 12
Addition/subtract
Contd..
Right shift its magnitude once and
increment its exponent by 1
We get
operand2 0.08345X103
the sum is 1.00685X103
0.92340
0.08345
1.00685
Which can be normalized as 0.100685X104
CM303.30 13
Addition/subtract
Contd..
Eg:
case 3:singns of operands are different
operand 1
0.1234X102
operand 2 - 0.2345X102
9’s complement of 0.2345 is 9.7654
add 1 1
10,s complement 9.7655
Contd..
CM303.30 15
For binary numbers the same procedure is
followed
CM303.30 16
Summary
CM303.30 17
Quiz
CM303.30 18
Quiz
CM303.30 19
Frequently asked questions
1. Perform addition between the numbers
i) 0.1010111E0110
0.1110101E0100
ii) 1.1011000E1001
0.1000111E1110