cost 10 ms
Binary to BCD conversion

I was asked to convert 8 bits binary to 3 digits of BCD. I saw online people use DIV but I do not understand that way at all, why would I divide by # ...

Convert amount (int) to BCD

I need to convert an Int left padded 6 bytes (amount) to a BCD in Python. The closest I come is with this code (but it needs to loop in byte pair) ...

2019-08-13 11:29:31   2   122    python / bcd  

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM