Write a program in object code that will convert a 3-bit binary number to a decimal number,For example, if input is 101, output should be 5; if input is 011, output should be 3. that is what I have to do,this is what I have so far but its not working, Can someone point out what is wrong or what need to be changed

49 00 30
D1 00 30
1C
F1 00 33
51 00 33
zz

Hi, I just want give u idea how to do that, try to convert my idea into code if it work for u then ok other wise post your work fo futher help...
See what all you have to do

step 1. binarynumber=101
step 2. rtmostdigit=101 mod 10
step 3. decimaldigit=rtmostdigit*2^0    (0,1,2 index of binary number)
step 4. binarynumber=binarynumber/10

I hope it will help you

Thanks for the respond but I think we are talking about 2 different things, My code is already posted. I am writing the code in machine language using pep8 program, have you used it before?

Sorry, Its an accedent, I did't see that your want help in machine language. I don't machine language so I can't help you may some ones else help you....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.