how to calculate fractional part of a floating point number in verilog
<p>I have floating point numbers. Lets say 4.6 and 3.8. We convert them to fixed point (Q4.4) by doing 4.6 x 2^4 = 74 and 3.8 x 2^4 = 61. We add both numbers 74 + 61 = 135. Now we convert this result 135 to floating point by doing 135 / 2^4 = 8.4. This will give integer part of result which is 8.</p>

<p>Now fractional part is calculated by doing (2^-2 + 2^-3 + 2^-4). 
Can someone tell how to get this value of 4 in verilog so that I can display it on 7 segment display as 8.4?</p>