Binary Integers; Strings - HP -28S Manual

Advanced scientific calculator
Hide thumbs Also See for HP-28S:
Table of Contents

Advertisement

Binary Integers
Binary integers represent a sequence of bits. The length of the se-
quence, from 1 to 64 bits, depends on the current wordsize. The
current binary integer base determines how binary integers are dis-
played but has no effect on their internal representation.
Large Integers. Using binary integers in decimal base mode, you
can express a 19-digit positive integer exactly; this is 7 digits more
than you can express exactly using real numbers.
Programming Example. The programs in "Displaying a Binary Inte-
ger," on page 257, work together to display a binary integer in all four
bases.
Preserving Status. The command RCLF
(recall flags)
returns a bi-
nary integer representing the status of all 64 user flags; the command
STOF
(store flags)
sets the user flags according to a binary-integer ar-
gument. These commands are demonstrated in "PRESERVE (Save and
Restore Previous Status)", one of the programs in "Displaying a Binary
Integer" described above.
Strings
A string comprises a sequence of characters. Part 1 showed the fol-
lowing uses for strings .
• In chapter 14, "Unit Conversion," you used strings to represent a
combination of unit products and powers .
• In chapter 15, "Printing," you entered a message as a string in order
to print it. You can also display messages by using the command
DISP; it is described in chapter 27, "Interactive Programs."
Most often a string represents text, but each character can also repre-
sent a numerical value from 0 through 255. The commands CHR
(character)
and NUM
(character number)
convert between characters
and their numerical values.
156
16: Objects

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents