This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

BCD to binary conversion in Assembly

Hi,

I want to know how the 6 digit bcd is converted into hex value Ex: 123456 to 1E240. Please help me by providing the assembly code for 8051.

Parents
  • You didn't follow the instructions for posting source code, did you?

    Look at the picture - it tells you clearly what to do: www.danlhenry.com/.../keil_code.png

    Your code is also devoid of any meaningful comments.

    Your first step to understanding what that code does should be to comment what it is doing.

    Again, if you understand what your code is doing, you should easily be able to extend it to extra digits...

    BTW: Are you sure you are dealing with BCD here...?

Reply
  • You didn't follow the instructions for posting source code, did you?

    Look at the picture - it tells you clearly what to do: www.danlhenry.com/.../keil_code.png

    Your code is also devoid of any meaningful comments.

    Your first step to understanding what that code does should be to comment what it is doing.

    Again, if you understand what your code is doing, you should easily be able to extend it to extra digits...

    BTW: Are you sure you are dealing with BCD here...?

Children