24-bit binary to 32-bit bcd
You need to write a testbench to go with your functional code. This should drive the inputs, and you should check the outputs match what you expect. I can see plenty of things that might be wrong in this, but you should try to write test cases (and drivers) and check the results.
As a beginner, it can be difficult to keep track of what is happening concurrently when writing HDL. Writing tests is a very good way of making sure you understand what your design should do, then as a designer you can then look at how and why the results are what they are.