Tools: MPW
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Support

MPW Command Reference


Appendix C (continued)

Number Prefixes

0b  Binary number

The characters 0b before a number indicate a binary, or base 2, number. For example, the command

Evaluate 0b01 + 0b10

returns the result 3. The command

Evaluate 0b01110101 + 0b11101110

returns the result 11,400,183. Binary numbers are recognized only in the Evaluate command.

$  Hexadecimal number

The $ character indicates a hexadecimal, or base 16, number. It has the same meaning as 0x. The command

Evaluate $A05 * $F5E

multiplies the hexadecimal numbers A05 and F5E.

Hexadecimal numbers are recognized only by the Evaluate command and as command-line options to certain tools.

0x  Hexadecimal number

The 0x character indicates a hexadecimal, or base 16, number. It has the same meaning as $. The command

Evaluate $A05 * $F5E

multiplies the hexadecimal numbers A05 and F5E and displays the result of 10090710 in the active window.

Hexadecimal numbers are recognized only by the Evaluate command and as command-line options to certain tools.

0  Octal number

When used as the first digit of a number, the 0 indicates that the number is an octal, or base 8, number. For example, the command

Evaluate 047 + 032

adds the octal numbers 047 and 032 and displays the value 65 in the active window. Octal numbers are recognized only in the Evaluate command.

 
 


Last Updated July 2000