mIRC: Scripting Language
ASCII stands for American Standard Code for Information Interchange. ASCII is a character encoding based on the English alphabet. ASCII codes represent text.
Base
The $base identifier can be used to convert a number from one base to another.
| Numeral System | Base |
|---|---|
| Binary | 2 |
| Quaternary | 4 |
| Octet | 8 |
| Decimal | 10 |
| Hexadecimal | 16 |
| Duotrigesimal | 32 |
| Base 64 (Not Supported) | 64 |
Using the table above you can convert any number form one base to the other
$base(<N>,<inbase>,<outbase>[,zeropad][,precision])
;N - Decimal Value
;Let's convert the letter "A" to Binary
;We first need to find the decimal/ascii value of the letter
var %decimal = $asc(A)
;Now that we have it in decimal numeral system (Base 10, our inbase)
;we can convert it to Binary (Base 2, outbase)
echo -a A -> $base(%decimal,10,2,8)
;A -> 01000001






0 komentar:
Post a Comment