Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

Conversion IEEE 754 to BCD

Hello everybody,

I'm doing an academic work in which I have to use IEEE 754 to make some operations. I'm using the megafunction to floating point and it's working properly.

Now I need to show the results in 7 seg displays of a kit and I don't know how to do the conversion between IEEE 754 and some format that I can show in the displays. Have you any idea to help me with that?

I've already tried to use TO_INTEGER function and the conversion blocks of the megafunction, but none of them work.

Thank you!

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    post the code - show us the problem you are having, it will help us to help you.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I don't have a code. I only have a block diagram with blocks generated by the floating point megafunction. I need to convert fractionary binary numbers to show its fractionary part in integer ones.

    Example:

    0 10000000 01011010111000010100100 = 2.71

    Then the '2' is easily obtained using the conversion block from megafunction. But the fractional '71' is not coming out correctly.

    Because I need to show the decimal number '2.71' on the 7 seg displays.

    Thank you!