I have to convert an unsigned 8-bit binary value to BCD.
There is the 'Double-Dabble' method, but I cannot figure out how to do this in Flowcode.
Does anyone have an idea how to do this? Thanks.
Binary to BCD conversion
-
- Posts: 9
- http://meble-kuchenne.info.pl
- Joined: Thu Jan 14, 2021 7:12 pm
- Has thanked: 2 times
-
- Valued Contributor
- Posts: 991
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 106 times
- Been thanked: 517 times
Re: Binary to BCD conversion
I posted an implementation of this here https://www.matrixtsl.com/mmforums/view ... hp?t=20462
If memory serves then I converted binary to one digit per byte for output as a string rather than BCD - but it should give you some idea of the bit manipulation needed..
Martin
If memory serves then I converted binary to one digit per byte for output as a string rather than BCD - but it should give you some idea of the bit manipulation needed..
Martin