- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I have implemented 32-bit to BCD converter, simple algorithm was easy to find on the internet, doing conversion with single shifting pass through data register. Can you please suggest backward conversion - BCD to 32-bit (e.g. without multiplications)? Thanks!
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Finally found it here http://forums.terraria.org/index.php?threads/project-bcd-to-binary-converter.30458/
"The double-dabble mechanism is a well known algorithm to convert binary-to-BCD, so reversing the algorithm allows for the reverse conversion. In the reverse algorithm, the information stored in the bits is right shifted, and then any number greater than 7 stored in any of the BCD units is reduced by 3". Simple and clear. Was worth of an hour of searching as there were some more sources which are badly explained or just seem to be wrong!- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the sharing.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page