Number Systems Problem
Number Systems Problem
01
Subtract 45 from 102 using 2,s complement
102-45
Notepositive number remains as such in 2,s
complement or any base complement
----------------------------------------------------------------------------------
0 1 1 0 0 1 1 0 represent 102
00101101
represent 45
1 1 0 1 0 0 1 0 on inverting we get this number
adding 1 we get
11010011
Problem-02
Add
Problem-3
Add -82-46 in 2,s complement
0 1 0 1 0 0 1 0 --------- 82
10101101
on inverting
1 0 1 0 1 1 1 0 by adding 1 , we get 2.s
Complement of 82
00101110-----46
Similarly 2,s complement of 46 is
11010010
---------------------------------------------------------------------------------------------------------1
10101110
11010010
1 10000000
Carry in to MSB,s and out of MSB is same
thus no overflow and MSB 1 indicate it is
ve number.revert it back to bainary
10000000
1 subtraction
------------------0 1 1 1 1 1 1 1 now invert this we get
1,s compliment
10010001------ = -110
11100111
= - 24
2,s compliment
10010001------ = -111
11100111
= - 25
BCD REPRESENTATION
1001 0001------ = 91
1110 0111
= not defined