Sunday, October 11, 2009 6:08 PM,



A student writes:



	 Professor Patt,
	
	 My group is having a difficult time understanding part b.
	 
	 3) Recall that the standard IEEE 32-bit floating point data type wherein 
	normalized numbers having values (-1)^sign * 1.fraction * 2^(exponent-127) are 
	expressed with 1 bit of sign, 8 bits of exponent, and 23 bits of fraction.
	 
	 In this problem, we will define an 8-bit floating point data type, where we 
	use 1 bit for the sign, 4 bits for the exponent, using an excess-9 code (i.e., 
	BIAS = 9) and 3 bits of fraction.
	 
	 3) Part a) Show the representation for 3 1/4 in this data type:
	 
	     3 1/4 is 11.01, which is 1.101 * 2^1.  The fraction part (after removing 
	the redundant MSB) is 101.
	     The exponent, after adding the bias is ten, or 1010.
	 
	     Therefore, the representation is: 0 1010 101.
	 
	 3) Part b) What is the largest positive normalized number that can be 
	expressed with this 8-bit floating point data type?
	 
	     The largest number would assume the largest exponent and all 1's in the 
	fraction: 0 11l0 111, which
	     represents 1.111 * 2^(14-9) = 111100 = 60.
	 
	 
	 On part b, why is the largest exponent represented by 4 bits in the exponent 
	field 1110 and not 1111. I understand the excess is 9, so shouldn't the max 
	exponent represented by 4 bits be 15 instead of 14? 15-9=6 instead of 14-9=5?
	 
	 Thank you
	 <<name withheld to protect the student who wonders what happened to 
	 1111>>



Recall that if our 8-bit floating point data type is to follow the IEEE 
Standard, the codes 0000 and 1111 would have special meanings.  All 0's are 
used for numbers that are too small to be normalized, and all 1's are used to 
represent + and - infinitiy plus NaNs (things like arcsin 2, 0/0, etc.).  Thus 
1110 is the largest exponent field value for representing a finite number.

Good luck on the exam.
Yale Patt