# Binary Calculations with AddUp 2

Binary calculations are done by specifying a base-2 prefix for such numbers. Indeed, AddUp reads numbers expressed in any number base from 2 to 36. A number is in a base other than 10 when it is prefixed by its base value and a single quote. Base-8 (octal) numbers use a 8' prefix, base-16 (hexadecimal) numbers use an 16' prefix, base-3 numbers use a 3' prefix, and so on. For binary (base-2) numbers, this means using a 2' prefix before the number. So binary number 11111111 (decimal 255) is written as 2'11111111 while binary 10010110 (decimal 150) is written as 2'10010110.

Output of all AddUp calculations is given in decimal unless specified otherwise. To explicitly ask for binary output, start an expression with a prefix similar to what is used in front of binary numbers: use '2 at the start of the line. Notice how the quote is on the left side of the requested output base. This line prefix must be followed by a space to separate it from the expression to evaluate. The expression to evaluate could either contain all binary numbers or a mixture of numbers in various numeric bases, but the result will be presented in the number base that the line prefix specifies. The default base-10 applies when no base is specified.