Page 2 of 2

Posted: Sun Mar 06, 2011 4:23 pm
by Masti6
Omgaskinhead wrote:Base 7 is a different way to "write" integers. For example: base 2 (or binary) is 01010001100 and so on.. it means, that you can write 2 different chars to write your number. in base 3 you can use 0, 1 and 2, in base 4 you can use 0, 1, 2 and 3. So we use base 10 (0 till 9 are 10 different integers)

Hexadecimal is with 16 different chars.. but we do only have 10 digits, so we use the first few letters from the alphabet (A, B, C .. F)

So in Base 7 you cannot have digits which are higher than 6 --> 0, 1, 2, 3, 4, 5, 6

to convert your number, you have to use the division algorithm (maybe you know '%' or 'modulo', division with remainder)

...
Thank you so much for clearing that out. I couldn't find anything useful about base 7 on google, but as soon as I knew how it works I got my little piece of code to work :)
Not so hard with a little loop after you know this.

Posted: Sun Mar 06, 2011 7:14 pm
by CodeX
Simples, although you'd probably get a better understanding by looking at a couple of bases and noticing the pattern for yourself.