|
Number systems
|
|
09-03-2009, 05:56 AM
(This post was last modified: 09-15-2009 12:21 AM by drdebcol.)
Post: #1
|
|||
|
|||
|
Number systems
There are some programming tasks that have conversion between different number systems included. That's why i made any to dec and dec to any converter.
I have been doing a bit of research on this and i came to solution. I made Dec to Bin converter which is pretty simple(http://www.pro9ramming.com/showthread.php?tid=82), but comparing to this "code". Okay code tells the best about itself, and if you want to find more about converting, you can use wiki. So code in TPW : Code: program number_systems;There's a fine line between genius and insanity. I have erased this line. Oscar Levant There's a fine line between an administrator and black hat hacker. I have erased this line. Dr DEBCOL |
|||
|
09-03-2009, 08:31 AM
(This post was last modified: 09-03-2009 08:32 AM by G4143.)
Post: #2
|
|||
|
|||
|
RE: Number systems
Here's a question for you. Do you know why functions like
strtol() only offer number conversions from base 2 to base 36...G4143 |
|||
|
09-03-2009, 05:08 PM
Post: #3
|
|||
|
|||
|
RE: Number systems
I really don't know. Maybe base 36 has something to do with some calculus.
I was really thinking about this issue and i think theoretically that the smallest base of number systems is 2, so that makes a question "What is the biggest base of number systems ?" Well decimal system with Base 10 has 10 digits (0123456789) Base 11 has one letter (0123456789A) Base 12 has two letters (0123456789AB) * * * and so on till end of English Alphabet which is number of digits + number of letters and that is 36 because 10 digits (0123456789) and 26 letters (A,B,C . . . X,Y,Z) 10+26=36 Maybe that is the answer, i really couldn't find better ! There's a fine line between genius and insanity. I have erased this line. Oscar Levant There's a fine line between an administrator and black hat hacker. I have erased this line. Dr DEBCOL |
|||
|
09-03-2009, 11:42 PM
Post: #4
|
|||
|
|||
|
RE: Number systems
Yep, that's it. The limiting factor is the ten digits 0 - 9 plus the letters a - z....G4143
|
|||
|
09-04-2009, 12:21 AM
Post: #5
|
|||
|
|||
RE: Number systems
(09-03-2009 11:42 PM)G4143 Wrote: Yep, that's it. The limiting factor is the ten digits 0 - 9 plus the letters a - z....G4143Yeah, that was a fast logical conclusion There's a fine line between genius and insanity. I have erased this line. Oscar Levant There's a fine line between an administrator and black hat hacker. I have erased this line. Dr DEBCOL |
|||
|
« Next Oldest | Next Newest »
|





