Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
15477 Discussions

Need help with Binary fractions (fixed) to Decimal notation

Altera_Forum
Honored Contributor II
931 Views

I know the traditional way to convert binary fractions (fixed) to decimal notation. The traditional way is below: 

 

 

------------------------------------------------------------------------------- 

[-A-] Traditional technique for converting decimal number 0.42 

------------------------------------------------------------------------------- 

step 1: 0.47 * 2 = 0.94 ; store integral part: 0 

step 2: 0.94 * 2 = 1.88 ; store integral part: 1 

step 3: 0.88 * 2 = 1.76 ; store integral part: 1 

step 4: 0.76 * 2 = 1.52 ; store integral part: 1 

step 5: 0.52 * 2 = 1.04 ; store integral part: 1 

[-B-]final answer: 0.01111...... 

 

 

question: Can I get the final answer [-B-] using shift operation ? I am looking for something similar to Double Dabble. I don't want to use [-A-] because I'm trying to avoid the Multiplication core in an FPGA. Multiplication core just takes extra clock cycles for each multiplication operation and I'd like to avoid that. 

 

 

[-C-] Summary: 

1. Decimal/BCD (whole) --- > Binary : use Reverse Double Dabble. 

2. Decimal/BCD (fraction) --- > Binary : ????? (I don't want to use [-A-]) 

3. Binary(whole) --- > Decimal/BCD : use Double Dabble 

4. Binary(fraction) --- > Decimal/BCD : use Reverse Double Dabble. 

 

 

For [-C-].2, I'm trying to find/come up with a technique similar to [-C-].1, [-C-].3, and [-C-].4. Any suggestions?
0 Kudos
0 Replies
Reply