Where can I find a free or open source C++ library to do Binary Coded Decimal math?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here you go. I just wrote this, and am making it public domain.
It converts an unsigned bcd to an unsigned int and vice-versa. Use bcd2i() to convert your BCDs to unsigned ints, do whatever math you need, then use i2bcd() to bring the numbers back to BCD.