ICT1.
003 – Computer Architecture
        Chapter 2: Data Presentation exercises
1. Radix conversion: do the following conversions and give your explana on:
   a. (1001 1100)2 = (?)10
   b. (0101.1010)2 = (?)10
   c. (24)10 = (?)2
   d. (15.250)10 = (?)2
   e. (1010 1100)  (?) 2’s complement
2. Radix & format conversion:
   a. Find the two-complement binary representa on of -6810 using 8 bits. Write the
       result in hexadecimal format.
   b. Find the binary representa on of -6810 in IEEE 754 single precision format. Write the
       result in hexadecimal format.
3. Sign magnitude data representa on:
   a. Assume 185 and 122 are unsigned 8-bit decimal integers. Calculate 185–122. Is there
       overflow, underflow, or neither?
   b. Assume 185 and 122 are signed 8-bit decimal integers stored in sign magnitude
       format. Calculate 185 + 122. Is there overflow, underflow, or neither?
   c. Assume 185 and 122 are signed 8-bit decimal integers stored in sign magnitude
       format. Calculate 185 − 122. Is there overflow, underflow, or neither?
4. Two-complement numbers:
   a. Assume 151 and 214 are signed 8-bit decimal integers stored in two’s complement
       format. Calculate 151 + 214 using satura ng arithme c. The result should be wri en
       in decimal. Show your work.
   b. Assume 151 and 214 are signed 8-bit decimal integers stored in two’s complement
       format. Calculate 151 − 214 using satura ng arithme c. The result should be wri en
       in decimal. Show your work.
   c. Assume 151 and 214 are unsigned 8-bit integers. Calculate 151 + 214 using
       satura ng arithme c. The result should be wri en in decimal. Show your work.
5. Write down the bit pa ern in the frac on of value 1/3 assuming a floa ng-point format
   that uses binary numbers in the frac on. Assume there are 24 bits, and you do not need
   to normalize. Is this representa on exact?
6. Data in difference representa on:
   a. What decimal number does the bit pa ern 0x0C000000 represent if it is a two’s
       complement integer? An unsigned integer?
   b. What decimal number does the bit pa ern 0x0C000000 represent if it is a floa ng-
       point number? Use the IEEE 754 standard.
   c. If the bit pa ern 0x00458593 is placed into the Instruc on Register, what RISC-V
       instruc on will be executed?
7. IEEE 754 floa ng-point format
   a. write down the bit pa ern that would represent −1/4. Can you represent −1/4
       exactly?
   b. What do you get if you add −1/4 to itself four mes? What is −1/4 × 4? Are they the
       same? What should they be?
8. IEEE 754-2008 contains a half precision that is only 16 bits wide. The le most bit is s ll
   the sign bit, the exponent is 5 bits wide and has a bias of 15, and the man ssa is 10 bits
   long. A hidden 1 is assumed. It uses an excess-16 format to store the exponent.
   a. Write down the bit pa ern to represent −1.5625 × 10−1.
   b. Comment on how the range and accuracy of this 16-bit floa ng point format
       compares to the single precision IEEE 754 standard.
   c. Calculate the sum of 2.6125 × 101 and 4.150390625 × 10−1 by hand in IEEE 754 half
       precision format. Assume 1 guard, 1 round bit, and 1 s cky bit, and round to the
       nearest even. Show all the steps.
   d. Calculate the product of –8.0546875 × 100 and −1.79931640625 ×10–1 by hand in
       IEEE 754 half precision format. Assume 1 guard, 1 round bit, and 1 s cky bit, and
       round to the nearest even. Show all the steps. How accurate is your result? How
       does it compare to the number you get if you do the mul plica on on a calculator?
9. Construct a number using your birthday as follows. Using your date of birth and your
   month of birth in the decimal format with your month of birth is the integer part, and
   your date of birth is the frac onal part. For example, if you were born on January 19, the
   number should be 01.19.
   a. What is its representa on in 16-bit binary format with 8 bits for the integer part and
       8 bits for the frac onal part. Also write the result in hexadecimal format
   b. What is its representa on in IEEE 754 single precision format.
   c. If the constructed number with the point is presented in hexadecimal format (for
       example, 0119)
          i.    What is its binary representa on using 16 bits?
         ii.    Find its two-complement representa on using 16 bits?