Binary to binary coded decimal conversion problem
View Single Post
You are missing couple of point from the link algo.
1. There should be 8 shifts for the 8 bit number.
2. It should be right to left shifting otherwise your calculation for greater than 5 for adding 3 can be wrong.