Homework: IEEE 754, 2's Complement and Base Conversion
1. Use repeated division/multiplication by 8 and a binary 3-digit lookup to convert the following numbers by hand.
1. 88

2. 132

3. 132.456

4. 103

5. 10.1

2. Now convert the binary numbers found in problem #1 to hexadecimal utilizing a 4-digit lookup.

3. Convert the following binary numbers to decimal, hex, and octal. Then convert each octal and hex number back to decimal.
1. 1010.0001100110011
(23 + 21) . (2-4 + 2-5 + 2-8 + 2-9 + 2-12 + 2-13) = 10.099975585938
1 010.000 110 011 001 1 = 12.063148
1010.0001 1001 1001 1 = A.199816
12.063148 = (81 + 2× 80) . (6× 8-2 + 3× 8-3 + 8-4 + 4× 8-5) = 10.099975585938
A.199816 = (10× 160) . (16-1 + 9× 16-2 + 9× 16-3 + 8× 16-4) = 10.099975585938
2. 1000011

3. 10110000.001101001011

4. 1001001

4. Write the following numbers as bytes then convert the Java bytes to hexadecimal using table lookup.
1. 123

2. -123

3. 8

4. -8

5. Write the following as 32-bit integers, convert the 32-bit word to hexadecimal using table lookup.
1. 129

2. -129

3. 12,500

4. -12,500

6. Write the following numbers as 32-bit floats, convert the 32-bit word to hexadecimal.
1. 176.2058 = 0100 0011 0011 0000 0011 0100 1010 1111 = 433034AF

2. -132.456

3. -10.1

7. Convert the following 32-bit words representing floats to their decimal values (spaces added to enhance readability, sign bit is at the left).
1. 1100 0010 0000 0011 1000 0001 1001 0100
C203819416

Key to be released once your answers are posted -after the due date

Convert 16.25 to a 32-bit word using IEEE 754 floating point represention, then write this binary in hexadecimal using 4-bit talbe lookup.

16.25 = 10.416 = 0001 0000.01002 = 1.000001 x 24

Now S = 0, a positive number,

E = 127 + 4 = 131 in excess 127 notation. This is 128 (1000 0000) + 3 (0000 0011) = 1000 0011,

and M = 0000 0100 0000 0000 0000 000 (in 1 plus normailzed notation the l integer is known and not recorded).

01000 0011 0000 0100 0000 0000 0000 000

Regroup for 4-bit hexadecimal lookup:  0100 0001 1000 0010 0000 0000 0000 0000 =  4182000016

by J. A. Tompkins tompkinsj@uncw.edu