Binary numbers, Octal numbers, Character constants – Zilog EZ80F916 User Manual
Page 215: Operator precedence

UM014423-0607
ZiLOG Developer Studio II
eZ80Acclaim!
®
User Manual
195
be inserted between hexadecimal digits to improve readability, but only when the
%
prefix
is used instead of the
H
suffix. For example:
ABCDEFFFH ; hexadecimal
%ABCDEFFF ; hexadecimal
-0FFFFh ; negative hexadecimal
%ABCD_EFFF; hexadecimal number with underscore
ADC0D_H; NOT a hexadecimal number but a name; hexadecimal numbers
cannot contain both underscore and H suffix
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
indicated by the absence of a sign. Negative numbers are indicated by a minus sign (
-
)
preceding the number. Underscores (_) can be inserted between octal digits to improve
readability. For example:
1234o ; octal number
-1234o ; negative octal number
1_234o; octal number with underscore
Character Constants
A single printable ASCII character enclosed by single quotes (
'
) can be used to represent
an ASCII value. This value can be used as an operand value. For example:
'A' ; ASCII code for "A"
'3' ; ASCII code for "3"
Operator Precedence
The following table shows the operator precedence in descending order, with operators of
equal precedence on the same line. Operators of equal precedence are evaluated left to
right. Parentheses can be used to alter the order of evaluation.