If we use 4 bits IEEE Std 754-1985 similar floating point number representation.
ID: 3821182 • Letter: I
Question
If we use 4 bits IEEE Std 754-1985 similar floating point number representation. We have 1 sign bit, 2 bits for Exponent and 1 bits for Fraction. Exponents 00 and 11 are NOT reserved. Bias is 1. Here are questions: a) List all the NONNEGATIVE floating point number representation by lasing 4 bits IEEE Std 754-1985 similar floating point number representation. b) If we are using the binary number system which use the left most one bit as the sign bit and the last one bit as the fraction part and the rest two bits as the integer part. List all the NONNEGATIVE floating point number representation by using this one. c) suppose we want to resolve a real problem and want to select a floating point representation. The typical values that we will use for this variable are: 0.0, 0.5, 1.5, 2.5, 3.0, 4.0 What kind of floating point number representation should we choose from the two mentioned above if we only have 4 bits can use? Give the reason by using some quantitative analysis method.Explanation / Answer
Checking:
if( (myInteger | -2147483648) == myInteger )
// myInteger is BOTH negative and an integer
if( (myFloat | -2147483648) == myFloat )
// Won't happen
var myInteger = 6;
var myFloat = 6.2;
if( myInteger > 0 )
// Cool, we correctly identified this as a positive integer
if( myFloat > 0 )
regex: /^[1-9]+d*$/
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.