954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Converting binary code to decimal value.

I am very new to C++ and I want to make a program that converts a binary number (up to seven digets) into a decimal value. Anyone know how I can do this?

Programmer88
Newbie Poster
7 posts since Jan 2005
Reputation Points: 10
Solved Threads: 0
 

Welcome. Have you met Google ? Please peruse the announcement .

Dave Sinkula
long time no c
Team Colleague
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
 

Take a look at the C code snippet at:
http://www.daniweb.com/code/snippet109.html

vegaseat
DaniWeb's Hypocrite
Moderator
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
 

hey just take a look over this link http://www.daniweb.com/code/snippet93.html ...this however change changes the binary code to gray but in middle of the code u will find the binary equivalent code also.
Cheers,
Harsh

harshchandra
Junior Poster in Training
68 posts since Nov 2004
Reputation Points: 7
Solved Threads: 1
 

Aside from those two snippets you can also find more info by searching the forum for the question - as this question gets asked a lot :) I remember from one thread you can get another 4 code solutions written by people replying to the thread!

1o0oBhP
Posting Pro in Training
445 posts since Dec 2004
Reputation Points: 16
Solved Threads: 6
 

one question... can java used for binary coding???

pampres
Newbie Poster
1 post since Mar 2010
Reputation Points: 6
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You