a) (48)10 - (13)10
b) (-18)10 + (-13)10
solution:
a) :
(48)10 - (13)10
Step 1:- First convert both the values in binary
48 = 00110000
13 = 00001101
Step 2:- convert negative number to 1's complement
00001101 = 11110010
Step 3:- convert 1's complement into 2's complement
11110010 + 1 = 11110011
Note: 2's complement of positive number will be same as binary number
48 - 13
48 +(-13) = 00110000+11110011 = 00100011
b):
(-18)10 - (13)10
Step 1:- First convert both the values in binary
18 = 00010010
13 = 00001101
Step 2:- convert negative number to 1's complement
00010010=11101101
00001101 = 11110010
Step 3:- convert 1's complement into 2's complement
11101101 + 1= 11101110
11110010 + 1 =11110011
Note: negative number represented by their 2's complement...
(-18)+ ( - 13)
(-18) +(-13) = 11101110 + 11110011 = 11100001
Get Answers For Free
Most questions answered within 1 hours.