Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
how do i make a program that converts binary digits?
Author Message
prima_rory

Posted: Wed Apr 07, 2004 7:15 pm   Post subject: how do i make a program that converts binary digits?

my teacher assigned us a task to write a program which converts binary digits to decimals...can you please help me and suggest anything easy i can add into the program?

Dan

Posted: Wed Apr 07, 2004 7:19 pm   Post subject: (No subject)

have it so it can covert any base to any base.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Paul

Posted: Wed Apr 07, 2004 7:22 pm   Post subject: (No subject)

Well if I were to make it, I'd get the length of the binary number, then use an array to hold the calculated "chart" up to that number. you know like
1, 2, 4, 8, 16 (is that it?) except in reverse, then get the sum of the product of each digit to the chart.
Delos

Posted: Wed Apr 07, 2004 8:07 pm   Post subject: (No subject)

Look here (I used the "Search" button...amazing...)

http://www.compsci.ca/v2/viewtopic.php?t=3245
the_short1

Posted: Thu Apr 08, 2004 10:54 pm   Post subject: (No subject)

heheheh.... not to mention the scientific calculator on ur computer (go to accessories then calculator...) and click on view scientific... wow...

decimal to hex,binary,etc... and back and forth... kinda cool eh!...

yea... the search button is AMAZING! if only more ppl used it...
prima_rory

Posted: Mon Apr 12, 2004 6:01 pm   Post subject: (No subject)

Thank you
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 6 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: