Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Tom Rettigs Library - base(<n base>, <n decimal number>) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 BASE(<N base>, <N decimal number>)
 Converts a decimal number (base 10) to a different base value.
 <expC> value of <decimal number> in the mathematical format of <base>.

 Maximum <base> is 36, in the format "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"

 Changes negative <decimal numbers> to positive.


 BASE(  2, -255 ) returns "11111111" (negative number changed to positive)

 BASE(  2,  100 ) returns "1100100"

 BASE( 16,  255 ) returns "FF"
 BASE( 16, -100 ) returns "64"

 BASE( 32, 1023 ) returns "VV"
 BASE( 32,  255 ) returns "7V"
 BASE( 32, -100 ) returns "34"

 BASE( 36, 1295 ) returns "ZZ"
 BASE( 36,  255 ) returns "73"
 BASE( 36, -100 ) returns "2S"

 Hazard
    Does not accurately convert negative numbers, so the
    absolute value is used to produce all positive numbers.


             Placed in the Public Domain by Tom Rettig Assoc.

See Also: BASE10() BIN() DEC() HEX()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson