Day 9

I. Last Time:
A. ASCII
Letters are in order

B. IEEE-754
Floating Point Format
Truncate at 23 bits or precision
(Only about 5-6 decimal digits)
Double precision has more sig digits
and bigger/smaller exponent.

C. Endian-ness:
Little Endian vs. Big Endian

II. New Stuff:
   A. MIPS and Data Types:
       MIPS uses a 32-bit word (MIPS is built to work with 32 bits of 
       data at a time)
       Question: What is the meaning of 0x476F6F64
       Answer: What type of data is it?
       1. ASCII: "Good" 
       2. Unsigned 32-bit Big Endian:
             = 4+6*16+15*16^2+6*16^3+15+16^4+6*16^5*7*16^6+4*16^7
             = 738,872,887,701,363
       3. 32-bit Signed 2's Compliment Big Endian:
          It's positive - Same as above
       4. Unsigned 32-bit Little Endian:
          REAL order: 0x646F6F47
             = 7+4*16+15*16^2+6*16^3+15+16^4+6*16^5*4*16^6+6*16^7
             = 422,214,075,772,758
       5. 32-bit Signed 2's Compliment Little Endian:
          It's positive - Same as above  
       6. As IEEE-754 Floating Point (Big Endian):
          0100 0111 0110 1111 0110 1111 0110 0100
          Sign = 0 = Positive
          Stored Exponent = 1000 1110 = 8*16+14 = 142.
              Real Exponent = Stored - 127 = 15
          Significand = 1.110 1111 0110 1111 0110 0100
          1+2^-1+2^-2+2^-4+2^-5+2^-6+2^-7+2^-9+2^-10+2^-12+
            2^-13+2^-14+2^-15+2^-17+2^-18+2^-21
          = 1.87058687210083007812
          Result = significand*2^Real Exponent = 
          = 1.87058687210083007812*2^15
          = 61295.39062499999999983616

B. 2's compliment Trick / Shortcut:
Remember that the "2's compliment"
is just the "negative" of the number:
1. Long way: Invert ALL bits and add 1.
(How the computer will do it)
2. Short Cut: (For us)
Find the rightmost ONE and flip
everything to its LEFT (don't flip it)

C. Test Review
Chapter 1 & History of C.S
  Important Historical Figures
  Important Events
  Components of the Computer
Chapter 2 & Performance
  Performance Measurements
  Clock Based Performance
Benchmarking
  SPEC & SPEC 2000
Number Representation (Part of Chapter 4)
   Binary/Hexadecimal
ASCII/Character Representation
Unsigned Integer Representations
Signed Integer Represenataions (Esp. 2's Compliment)
IEEE 754 Floating Point Representation
Endian-ness / Memory Usage
Misc.
Compiler/Assembler/Linker/Loader Interaction &
Responsibilities (Appendix A, sections 1,2, parts of 4)


D. Homework Review: (Solutions posted)
1. People / Function / Testing
2. Moore's Law and Slacking

III. Next Time:
A. Test #1