uc3m_cs

Materials used for Computer Structure

Exercise 1

(statement) The following numbers are represented in two’s complement using 6 bits. Indicate their corresponding decimal value:

(solution) The corresponding decimal value:

Exercise 2

(statement)

A computer has a word width that allows you to represent numbers in complement to two in the range [-234, 234-1]. Respond:
  1. What is the number of bits that store the registers of this computer?
  2. How much KB of memory can address at most this computer?

(solution)

For this computer:
  1. [2n-1...-1, 0... 2n-1-1] = [-234, 234-1] -> 2n-1=234 -> 9 bits
  2. If this is a 9 bits computer then 29 bytes (memory address by bytes) -> 29/210 KiB -> half a kilobyte

Exercise 3

(statement) Indicate the decimal value of the following numbers represented in the single precision IEEE 754 standard: 0xBF400000, 0x7F804000 and 0x00180000.

(solution)

Exercise 4

(statement) Represent in the single precision IEEE 754 standard the numbers 15 and 3,75.

(solution) The corresponding value:

Exercise 5

(statement) Add the previous numbers represented in the IEEE 754 standard using the IEEE 754 representation.

(solution) The corresponding value:

                                 1 11
   * 15    <-> 1.1110 * 2^3 <->  1.111000 * 2^3
   *  3.75 <-> 1.1110 * 2^1 <->  0.011110 * 2^3
   * 18.75                      10.010110 * 2^3 -> 10010.11