Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the following two 9-bit floating-point representations based on the IEE

ID: 3595875 • Letter: C

Question

Consider the following two 9-bit floating-point representations based on the IEEE floating point format. Neither has a sign bit--they can only represent nonnegative numbers. 1. Format A There are k = 4 exponent bits. The exponent bias is 7. There are n = 5 fraction bits. · · 2. Format B There are k = 5 exponent bits. The exponent bias is 15. · There are n = 4 fraction bits. · Below, you are given some bit patterns in Format A, and your task is to convert them to the closest value in Format B. If necessary, you should apply the round-to-even rounding rule. In addition, give the values of numbers given by the Format A and Format B bit patterns. Specify values as whole numbers or decimals. Finally to summarize the types expected for blanksPlease enter a numeric value for the Value field and enter either a 1 or a 0 for each box in the Bits field. Format A Bits 0111 000001 1011 10101 Format B Bits 01111 0000 Value Value 1100 10110

Explanation / Answer

1.

Format A:

Bit pattern 1011 10101

Exponent bias=10112=1110

Unbiased exponent is 11-7=4

Fraction value=0.101012= (0.5 +0+0.125+0+0.03125)10=0.6562510

Prefix encoded 1 before fraction value=1.65625

Vaue is 24*1.65625=26.5

Format B:

Binary of 26.5= 11010.12=1.10101*24

Exponent is 15+4=1910=100112

Mantissa=101012 =10102 (taking significant 4 bits)

Bit pattern is 10011 1010

Value is 24*(1.0+0.5+0+0.125)=26 (encoded 1 is prefixed here with decimal digit)

2.

Format A:

Bit pattern 1100 10110

Exponent bias=11002=1210

Unbiased exponent is 12-7=5

Fraction value=0.101102= (0.5 +0+0.125+0.0625+0)10=0.687510

Prefix encoded 1 before fraction value=1.6875

Vaue is 25*1.6875=54

Format B:

Binary of 54= 1101102=1.10110*25

Exponent is 15+5=2010=101002

Mantissa=101102 =10112 (taking significant 4 bits)

Bit pattern is 10100 1011

Value is 25*(1.0+0.5+0+0.125+0.0625)=54 (encoded 1 is prefixed here with decimal digit)