hardware floating point binary to decimal (7 seg LED) displays

WBahn

Joined Mar 31, 2012
26,398
Ok let's say it should display the decimal equivalent to the IEEE754 standard 32 bit floating point binary number.
So why do you want the pattern you showed to display 5.2 and not 5.1999631?

Let's consider the pattern you used as your example as well as the next pattern up and the next pattern down.

0 10000001 0100 1100 1100 1100 0011 000 => +5.199962615966796875000
0 10000001 0100 1100 1100 1100 0011 001 => +5.199963092803955078125
0 10000001 0100 1100 1100 1100 0011 010 => +5.199963569641113281250

The difference between successive patterns (with this exponent) is 0.000000476837158203125, or about 0.0000005

23 bits of significand give you between 7 and 8 sig figs.

So you can't say that you want to display the decimal equivalent of the IEEE-754 single-precision representation and also say that you want it to display only 2 sig figs for a particular example.

You HAVE to DECIDE what you WANT and you must be PRECISE in your specification of that desire.

Do you want it to always display values to two sig figs?

Do you want it to always display values to one digit to the right of the decimal point? Even for very small numbers (like 1x10^-20)? What about for very large numbers (like 1x10^20)?

This decision will have a big impact on how you design either the hardware or the software to do what you want.
 

Thread Starter

hoi2you

Joined Dec 2, 2017
15
Thanks WBahn.
I do not want it to display to 2 significant places (this was a mis-statement on my part) I want it to display to the number of places that are possible for a IEEE754 32 bit floating point number. This is reasonably straight forward to code into C or python or VBA but designing a circuit to do it seems much more challenging.
 

WBahn

Joined Mar 31, 2012
26,398
Thanks WBahn.
I do not want it to display to 2 significant places (this was a mis-statement on my part) I want it to display to the number of places that are possible for a IEEE754 32 bit floating point number. This is reasonably straight forward to code into C or python or VBA but designing a circuit to do it seems much more challenging.
Then you are going to need twelve seven-segment displays. One for the overall sign, eight for the mantissa, one for the sign of the exponent, and two for the exponent.
 

Thread Starter

hoi2you

Joined Dec 2, 2017
15
Thanks Wbahn , Jpanhalt and ci139 it's great to get some input. I will respond soon with any updates and maybe some more questions.
 
Top