# Negative Expressions; Basic Arithmetic Operations For Bases; Logical Operation; Chapter 8 : Programming - HP 9g - Graphing Calculator User Manual

Graphing calculator.

You can enter numbers in base 2, base 8, base 10 or base 16. To set the
number base, press [ 2nd ] [ dhbo ], select an option from the menu and
press [
]. An indicator shows the base you selected: d, h, b , or o. (The
default setting is d: decimal base). See Example 49.
The allowable digits in each base are:
Binary base (b): 0, 1
Octal base (o): 0, 1, 2, 3, 4, 5, 6, 7
Decimal base (d): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Hexadecimal base (h): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, IA, IB, IC, ID, IE, IF
Note: To enter a number in a base other than the set base, append the
corresponding designator (d, h, b, o) to the number (as in h3).
Press [
] to use the block function, which displays a result in octal or binary
base if it exceeds 8 digits. Up to 4 blocks can be displayed. See Example 50.

## Negative Expressions

In binary, octal, and hexadecimal bases, negative numbers are expressed
as complements. The complement is the result of subtracting that number
from 10000000000 in that number's base. You do this by pressing [ NEG ]
in a non-decimal base. See Example 51.

### Basic Arithmetic Operations for Bases

numbers. See Example 52.

### Logical Operation

The following logical operations are available: logical products (AND),
negative logical (NAND), logical sums (OR), exclusive logical sums (XOR),
negation (NOT), and negation of exclusive logical sums (XNOR). See Example
53.

### Chapter 8 : Programming

The options on the program menu are: NEW (for creating a new program), RUN
(for executing a program), EDIT (for editing a program), DEL (for deleting a
program), TRACE (for tracing a program), and EXIT (for exiting program mode).
E-25