(a). Perform the following:
(i) 10000110002 to Hexadecimal
(ii) ABCDE16 to Decimal
(iii) A1F2.F16 to Octal
________
(i) 19 08 07 06 05 14 13 02 0100 2 ( base 10 ( base 16
= (29) + (24) + (23)
= 536
16|536 =21816 33 8 2 1
(ii) A B C D E16 ( base 10 A4 B3 C2 D1 E 0
= (10*164) + (11*163) + (12*162) + (13*161) + (14*160)
= 70371010
(iii)A1F2.F16 (base 2 ( base 8 A3 12 F1 20 . F-1
=1010 0001 1111 0010.1111 base 2
=1 010 000 111 110 010.111 1 base 8
= 120762.748
(b) A computer stores a number of 16 bits word using floating-point arrangement.
Given that the first bit is reserved for the sign and followed by 6 bits for the exponent using biased form. The remaining bits are used for the mantissa with a hidden bit.
(i) Show how the computer stores -37.87510
(ii) What is the decimal value for 0100 1111 0111 01012?
(i)-37.875 2|37 100101.111 18. 1 9. 0 4. 1 2. 0 1. 0
0.875 2 X
1.750
1 - 1
0.750
2 X
1.500
1 - 1
0.500
2 X
1.000 1
- =100101.1111X 20 |- TE = 5 | Mant = 1.001011110 = 1.00101111 X 25 stored = true expo + bios = =001011110 = 5 + 31 = 36
- convert expo to binary |- Mant = 1.001011110
2| 36 = 1001002 = 001011110 ( 1.100100 001011110 18 0 sign = - 9 0 = 1 4 1 2 0 1 0
(ii) 0 100111 1011101012 Expo mant
-Expo 1001112 = 15 04 03 12 11 10 |- stored expo = true expo + bios = (25)+(22)+(21)+(20) 39 = TE + 31 = 32 + 4 + 2 +1 TE = 8 = 39
-101110101+1 |-18 17 06 15 14 13 02 11 00 . 1-1
=0.101110101+1 = (28)+(27)+(25)+(24)+(23)+(21)+(2-1)
=1.101110101 x 28 = 442 + (2-1)
=110111010.1 = 442.510
(c) Using BCD 8-4-2-1 representation, calculate 6789 + 7156 – 365
______
6789 = 0110 0111 1000 1001
7156 = 0111 0001 0101 0110 +