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

Problem 3 (12 points) Consider the following two 7-bit floating point representa

ID: 3666583 • Letter: P

Question

Problem 3 (12 points) Consider the following two 7-bit floating point representations based on the IEEE floating point format. Neither has a sign bit - they can only represent non-negative numbers.

i). Format A.

There is 1 sign bit

There are k=5 exponent bits. The exponent bias is 1.5.

There are n=3 fraction bits.

ii). Format B.

There is 1 sign bit

There are k=4 exponent bits. The exponent bias is 7.

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 round towards +infinity. In addition, give the values of numbers given by the Format A and Format B bit patterns. Give these as whole numbers (e.g., 17) or as fractions (e.g., 17/64 or 17/2).

Format A Format B

Bits Value Bits Value 1 01111 001 -9/8 101110010 -9/8 0 10110 011 1 00111 010 0 00000 111 1 11100 000 0 10111 100

Explanation / Answer

i)010110011 in the 1-5-3 format is sign 0, biased exponent 101102, and encoded significand 011. The sign is +, the unbiased exponent is 22–15 = 7, and the significand is 1.0112 = 1.375. (We prefixed the encoded significand with “1.”) So the number represented is +27•1.375 = 176.

ii)To encode 176 in the 1-4-4 format, take advantage of the fact that you already know it is +27•1.375. Thus, the sign is +, the unbiased exponent is 7, and the significand is 1.0112. This significand fits in four bits (so no rounding is needed); the encoded significand (removing the leading “1.”) is 0110. The unbiased exponent is 7, the bias is 7, so the biased exponent is 14 = 11102. So the bit fields are sign 0, exponent 1110, significand 0110, and all nine bits are 011100110.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote