question 4 A though F thank you lfreeCooecamo Forum: nderstand Javascript . r i
ID: 3721963 • Letter: Q
Question
question 4 A though F thank you
lfreeCooecamo Forum: nderstand Javascript . r i g csci 201 | Class profile à Homework3ndr 3 Hunter x Hunter :2011) 1 x e cuestion l parts l Throux × Secure I https://piazza-resourcess3.amazonaws.com/jgopch0cb93d8/j k3.pdf AWSAcce skyld-AKIAltDNKLJ4ALKBW6HA8Expires-1520015685&Signature-ORqiKArW4JLWSXcSRqlL93ki; A.. Question 4 (12 points) Represent the following numbers using 32-bit single-precision floating point format as per the EEE 754 standard. b) -22.7 d) NaN e) Negative infinity f) 1.25 x 1041 Submission Instructions (read carefully) Create a single PDF file that contains all your answers, and name it your HowardU username plus pdf, for example my submission would be named gedare.bloom.pdf Check your conversion for any errors! Fill in your answers under the Homework3 assignment on BlackBoard, and upload your PDF file there too (Under the first question). LinkedListN evi...ppox 02222018-Doubl pptx ^ | Show all 06integers:1].potx okpala.richardtog zip O Type here to search 103 AM 3/2/2013 ^ LExplanation / Answer
IEEE-754 floating point representation (single precision)
1 sign bit; bit 31
8 exponent bit; bit 23 to 30
23 fraction bit; bit 0 to 22
a) 0.810=1.10011002 * 2-1
Sign +
Exponent is 2-1
Exponent bias= 127-1=12610= 011111102
Fraction bits: 10011001100110011001100
32 bit format is 0 01111110 10011001100110011001100
b) -22.710=1.011010110011001100110102 * 24
Sign -
Exponent is 24
Exponent bias= 127+4=13110= 100000112
Fraction bits: 01101011001100110011010
32 bit format is 1 10000011 01101011001100110011010
b) (3/8)10=1.12 * 2-2
Sign +
Exponent is 2-2
Exponent bias= 127-2=12510= 011111012
Fraction bits: 10000000000000000000000
32 bit format is 0 01111101 10000000000000000000000
d) NaN
NaN is a not defined number
Its floating point representation defines all exponent bits to 1 and fraction bits non zero & zero
32 bit format is 0 11111111 10000000000000000000000
e) Negative Infinity
Its representation is exponent bits are 1 and fraction bits are all zero and sign bit is 1
32 bit representation is 1 11111111 00000000000000000000000
f) 1.25*1041 =1.011 0010 0101 1101 1111 1010 * 2137
Sign +
Exponent is 2137
Exponent bias= 127+137=26410= 000010002 which will give overflow
Fraction bits: 011 0010 0101 1101 1111 1010
32 bit format is 0 00001000 011 0010 0101 1101 1111 1010
Single precision will cause overflow error. Double precision(64 bit) can overcome this issue.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.