Thur, 3rd Sept 2015, 01:33 a few loose ends

My students, A couple of loose ends I want to give you with respect to Chapter 2. 1. The floating point data type. =============================== Recall, 32 bits, broken down as: Bit 31 -- sign bit (0 is positive, 1 is negative) Bits 30:23 -- exponent bits, using an excess 127 code Bits 22:0 -- the significand bits. (Notation: "Bits 30:23" means Bits 30,29,28,27,26,25,24,23) So, for example, if we had the number 21 5/8: 10101.101 We normalize: 1.0101101 x 2^4 The exponent is 4, so in Bits 30:23, we store 4 + EXCESS = 4 + 127 = 131 = 10000011. The fraction we store the significant bits BUT we do not store the 1 to the left of the binary point because we know it is a 1 and so there is no point wasting a bit to store it. So, in bits 22:0, we store 01011010000000000000000. I FORGOT to tell you not to store the most significant bit, since it is redundant. That is, it has to be a 1, so why waste a bit of storage? 2. Some simple terminology for making a bit 0 or making a bit 1. =============================================================== When we make a bit 0, we say we CLEAR the bit. Recall device 2 was free, indicated by bit 2 = 1. We gave it work to do, and wanted to make bit 2 = 0 to indicate that device 2 was now busy. We did that by ANDing the bit vector with 111...11011, forcing bit 2 to 0. We say we CLEARED bit 0. When we make a bit 1, we say we SET the bit. Recall device 0 then finished its work. We indicate that by making bit 0 a 1 (i.e., device 0 is free to accept more work). We did that by ORing the bit vector with the mask 000...0001. We say we SET bit 0. 3. Hexadecimal representations. ============================== I also did not explain hexadecimal representations, which I will at the beginning of class, before we move on to Chapter 3. Enjoy the rest of the week, and the long weekend. I will see you in class next Wednesday. Yale Patt