To convert from binary to BCD, you write a programme to do the following:-
If the number is > one thousand, then subtract one thousand (in binary of course) from the number & if necessary, repeat until the remainder is < one thousand. Count the number of times the subtraction is done. This counts the number of thousands.
If the number is > one hundred, then subtract one hundred from the number & if necessary, repeat until the remainder is < one hundred. . Count the number of times the subtraction is done. This counts the number of hundreds.
Then do the same for ten.
Once the remainder is < ten, then that is saved as the Units digit.