Академический Документы
Профессиональный Документы
Культура Документы
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 : Information Representation,Arithmetic
operations
Duration : 50 Mts
Sub. Topic : Comparison of two fixed pointnumbers vide
CM303.24 2
Recap
CM303.24 3
X-OR Operation
How to know that the signs of AR, BR are same
or different
It can be known by an X-OR operation between
the sign bits As, Bs
As Bs Y=As Bs
0 0 0
0 1 1
1 0 1
1 1 0
CM303.24 5
Perform subtraction between A and B
Case1 : A>B
CM303.24 6
Perform subtraction between A and B
Contd..
Add 2’s complement of B to A
1001
1100
carry 1 0101 it is +5
CM303.24 8
Perform subtraction between A and B
Contd..
Add 2’s complement of B to A
0011
1011
carry 0 1110
CM303.24 9
Perform subtraction between A and B
Contd..
It can be observed that carry is 0
Hence the result is negative and the magnitude
is 2’s complement of (1110)
1’s complement=0001
add 1 + 1
0010
The result is –0010 or -2
CM303.24 10
Summary
In this class , you have learnt …
CM303.24 12
Quiz
1. After subtraction if the carry is 0, the following
operations have to be performed in 2’s
complement method
CM303.24 13