Click here to Skip to main content
15,922,894 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
for convert binary to decimal with VHDL language i want follow this stage :

S1. Shift the binary number left one bit.
S2. If 8 shifts have taken place, the BCD number is in the
Hundreds, Tens, and Units column.
S3. If the binary value in any of the BCD columns is 5 or greater,
add 3 to that value in that BCD column.
S4. Go to 1

can anybody explain stage 2& 3 for me ... why I should shift left and add with 3 when greater than 4. ??????
thanks
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900