Question

I would like a step by step explanation as to how the 7-bit floating point representations from Format A were converted...

I would like a step by step explanation as to how the 7-bit floating point representations from Format A were converted to Format B. Thanks.

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 are k=3 exponent bits. The exponent bias is 3.

There are n=4 fraction bits.

ii). Format B.

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

There are n=3 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. 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
011 0000 1 0111 000 1
101 1110 15/2 1001 111 15/2
010 1001 25/32 0110 100 3/4 (Round down)
110 1111 31/2 1011 000 16 (Round up)
000 0001 1/64 0001 000 1/64 (Denormalize -> normalized)
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Since The conversion is same for all the problems; I’ll explan a few examples.

Step1:

Conversion of format A to Decimal Value

2(decimal value of exponent – 3) and add the fractional part to it.

Step2:

Conversion of Decimal value to Format B

1. Convert the decimal number to binary format

2. Normalize the decimal value so that the binary number will be in the foramt 1.xxxxxxxx by shifting the binary point. Now find the mantessa and exponent.

Let’s see the example of 1st conversion. 011 0000

Since there is no sign bit leave it

Next 3 bits exponent

Exponent is 011 decimal equivalent is 3

Subtract that from exponent bias of Format A

2(exponent – exponent bias) 2(3-3) is 20 = 1 and the fractional part is 0000

Step2: Now convert that to format B

Binary Equivalent for 1 is 1.00000

Since the number is in 1.xxxxxx format

No need to shift the number

Exponent will be (7+0) 7 which is 0111 and the fractional part is 0000

Example 2:

101 1110 in Format A

1.1110

Convert that to binary format

Exponent is 101 so subtract 3 from 101; 5-3 = 2 so shift the decimal point to 2 left digits

1.1110 * 22.

111.10 its decimal equivalent is 7.5

Step2:

1. Convert 7.5 to binary format which is 111.1

2. Normalize 1.111 * 22.

3. Exponent is 7+2 which is 9 (1001)

4. And the fractioonal part is 3 bits 111.

Therefore the format B equivalent is

1001 111

Example 3:

010 1001

Step1: Convert the Format A to Decimal number

1. Exponent is 2, Subtract 3 from 2 which is -1

2. So the Binary number is 1.1001 * 2-1 = 0.11001 its decimal equivalent is 0.7815

Step2: Convert the Decimal number to Format B.

1. Binary number is 0.11001

2. Normalize it; 1.1001 * 2-1

3. Exponent will the 7 + (power of 2) which is 7-1; = 6 (0110)

4. Fractional part is reduced to 100(3 bits) which is called as rounding. so the Format B equivalent is 0110 100

Add a comment
Know the answer?
Add Answer to:
I would like a step by step explanation as to how the 7-bit floating point representations from Format A were converted...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT