Please help me solve this. Convert to hexadecimal, and then given the ASCII code
ID: 3664988 • Letter: P
Question
Please help me solve this.
Convert to hexadecimal, and then given the ASCII code for the resulting hexadecimal number (including the code for :ne hexadecimal point): 212.2_10 181.18_10 Because A-B=A+(-B), the subtraction of signed numbers can be accomplished by adding the complement. Subtract each of the following pairs of 5-bit binary numbers by adding the complement of the subtrahend to the minuend. Indicate when an overflow occurs. Assume that negative number are represented in 1's complement. Then repeat using 2's complement. 11010-11100 01011-11100 10101-01010 10111-11010Explanation / Answer
7. (a)
Given decimal number: (212.2)10
212.2 = 212 + 0.2
1st half:
Consider value (212)10
(212)10 = (11010100)2
1101 0100 equivalent number of hexa is (D4)16
2nd half:
Now consider value (o.2)10
Convert (o.2)10 decimal point to hexa decimal point using successive multiplication logic
Multiply 0.2 by 16
1st mult iteration:
0.2 * 16 = 3.2 fractional side =0.2 carry = 3 (MSD)
1nd mult iteration:
0.2 * 16 = 3.2 fractional side =0.2 carry = 3
1rd mult iteration:
0.2 * 16 = 3.2 fractional side =0.2 carry = 3 (LSD)
So, (0.2)10(0.33333)16
Hence adding 1 and 2 half’s will get (212.2)10 = (D4.3333)16
----------------------------------------------------------------------------------------------------------------------------------------------------------------
(b)
Given decimal number: (181.18)10
181.18 = 181 + 0.18
1st half:
Consider value (181)10
(181)10 = (10110101)2
1011 0101 equivalent number of hexa is (B5)16
2nd half:
Now consider value (o.18)10
Convert (o.18)10 decimal point to hexa decimal point using successive multiplication logic
Multiply 0.18 by 16
1st mult iteration:
0.18 * 16 = 2.88 fractional side =0.88 carry = 2 (MSD)
1nd mult iteration:
0.88 * 16 = 14.08 fractional side =0.08 carry = 14 equivalent to E
1rd mult iteration:
0.08 * 16 = 1.28 fractional side =0.28 carry = 1(LSD)
So, (0.18)10(0.2E1)16
Hence adding 1 and 2 half’s will get (181.18)10 = (B5.2E1)16
----------------------------------------------------------------------------------------------------------------------------------------------------------------
8.
(a). Given 5 bit binary numbers:
1 1 0 1 0
(-) 1 1 1 0 0
---------------------
For this we need to take second binary 5 bit singed number : (1 1 1 0 0)2 and do 1’s compliment then add 1 to that result.
1 1 1 0 0
0 0 0 1 1 (reverse is 1’s compliment)
+ 1
-----------------------
0 0 1 0 0 (2’s compliment)
Now we have 2’s complimented number so, do addition
1 1 0 1 0
0 0 1 0 0
---------------------------
1 1 1 1 0
---------------------------
(b). Given 5 bit binary numbers:
0 1 0 1 1
(-) 1 1 1 0 0
---------------------
For this we need to take second binary 5 bit singed number : (1 1 1 0 0)2 and do 1’s compliment then add 1 to that result.
1 1 1 0 0
0 0 0 1 1 (reverse is 1’s compliment)
+ 1
-----------------------
0 0 1 0 0 (2’s compliment)
Now we have 2’s complimented number so, do addition
0 1 0 1 1
0 0 1 0 0
---------------------------
0 1 1 1 1
---------------------------
(c). Given 5 bit binary numbers:
1 0 1 0 1
(-) 0 1 0 1 0
---------------------
For this we need to take second binary 5 bit singed number : (0 1 0 1 0)2 and do 1’s compliment then add 1 to that result.
0 1 0 1 0
1 0 1 0 1 (reverse is 1’s compliment)
+ 1
-----------------------
1 0 1 1 0 (2’s compliment)
Now we have 2’s complimented number so, do addition
1 0 1 0 1
1 0 1 1 0
---------------------------
1 0 1 0 1 1 (left most bit is carray =1)
---------------------------
(d). Given 5 bit binary numbers:
1 0 1 1 1
(-) 1 1 0 1 0
---------------------
For this we need to take second binary 5 bit singed number : (1 1 1 0 0)2 and do 1’s compliment then add 1 to that result.
1 1 0 1 0
0 0 1 0 1 (reverse is 1’s compliment)
+ 1
-----------------------
0 0 1 1 0 (2’s compliment)
Now we have 2’s complimented number so, do addition
1 0 1 1 1
0 0 1 1 0
---------------------------
1 1 1 0 1
---------------------------