beautypg.com

Decimal numbers, Hexadecimal numbers, Binary numbers – Zilog ZUSBOPTS User Manual

Page 250: Octal numbers, D the

background image

Expressions

UM017105-0511

222

Zilog Developer Studio II – ZNEO™
User Manual

# LOW (X) ; 8 bits of X starting at bit 0 = 56H

# LOW16 (X) ; 16 bits of X starting at bit 0 = 3456H

Decimal Numbers

Decimal numbers are signed 32-bit integers consisting of the characters

0

9

inclusive

between

-2147483648

and

2147483647

. Positive numbers are indicated by the absence

of a sign. Negative numbers are indicated by a minus sign (

-

) preceding the number.

Underscores (_) can be inserted between digits to improve readability. For example:

1234 ; decimal

-1234 ; negative decimal

1_000_000; decimal number with underscores

_123_; NOT an integer but a name. Underscore can be neither

first nor last character.

Hexadecimal Numbers

Hexadecimal numbers are signed 32-bit integers ending with the

h

or

H

suffix or starting

with a

%

character and consisting of the characters

0

9

and

A

F

. A hexadecimal number

can have 1 to 8 characters. Positive numbers are indicated by the absence of a sign. Nega-
tive numbers are indicated by a minus sign (

-

) preceding the number. Underscores ( _ ) can

be inserted between hexadecimal digits to improve readability. For example:

ABCDEFFFH ; hexadecimal

%ABCDEFFF ; hexadecimal

-0FFFFh ; negative hexadecimal

ABCD_EFFFH; hexadecimal number with underscore

ADC0D_H; NOT a hexadecimal number but a name; hexadecimal digit

must follow underscore

Binary Numbers

Binary numbers are signed 32-bit integers ending with the character

b

or

B

and consisting

of the characters

0

and

1

. A binary number can have 32 characters. Positive numbers are

indicated by the absence of a sign. Negative numbers are indicated by a minus sign (

-

)

preceding the number. Underscores ( _ ) can be inserted between binary digits to improve
readability. For example:

-0101b ; negative binary number

0010_1100_1010_1111B; binary number with underscores

Octal Numbers

Octal numbers are signed 32-bit integers ending with the character

o

or

O

, and consisting

of the characters

0

7

. An octal number can have 1 to 11 characters. Positive numbers are

This manual is related to the following products: