We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,809 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Pep8 convert a 3-bit binary number to a decimal number

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

2
Contributors
3
Replies
1 Day
Discussion Span
2 Months Ago
Last Updated
17
Views
goha1414
Newbie Poster
4 posts since Mar 2013
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

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

prvnkmr449
Junior Poster
113 posts since Sep 2010
Reputation Points: 3
Solved Threads: 16
Skill Endorsements: 0

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?

goha1414
Newbie Poster
4 posts since Mar 2013
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

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....

prvnkmr449
Junior Poster
113 posts since Sep 2010
Reputation Points: 3
Solved Threads: 16
Skill Endorsements: 0

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.2939 seconds using 2.68MB