SReject commented on a Page, Binary to integer  -  Jun 01, 2012

miRC already has this built in: $base()

The basics:
$base(input,baseIn,baseOut)
input -> number representation to be converted
baseIn -> the base of the input (2 for binary, 8 for octal, 10 for decimal, 16 for hex, but can be any base)
baseOut -> the base to convert 2 (2 for binary, 8 for octal,...)

Example:
Binary to Decimal: $base(10,2,10) = 2
Octal to Decimal: $base(10,8,10) = 8
Hex to Decimal: $base(10,16,10) = 16

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.