'Examples of using different numeral systems
' A binary number
0b1101001101010001
Ans = 54097
' A hexagonal number
0xE3DD1
Ans = 933329
' An octal number
0o1773
Ans = 1019
' Specify the numeral system by enclosing
' the line with a function Bin, Dec, Hex or Oct
Bin(3 + 18 * 2)
Ans = 0b100111
' Convert a binary value to a hexadecimal value
Hex(0b1101001101010001)
Ans = 0xD351
Hex(26)
Ans = 0x1A
Hex(15)
Ans = 0xF
Hex(255)
Ans = 0xFF
Hex(65340)
Ans = 0xFF3C
0xFF3C
Ans = 65340
Hex(-12)
Ans = 0xFFFFFFF4
Oct(13)
Ans = 0o15
Oct(120 + 5)
Ans = 0o175
0o175
Ans = 125
' The specification of a the numeral system is lost when
' you perform an operation after the conversion.
Bin(24 + 2)
Ans = 0b11010
Bin(24) + 2
Ans = 26
' Negative values. First specify the number of bytes for the values
Bytes = 1;
0b11111111
Ans = -1
Bytes = 2;
0b11111111
Ans = 255
' Set Bytes to the maximum available
Bytes = 4;