Numeric Data And String Data - Sharp mz-800 Owner's Manual

Hide thumbs Also See for mz-800:
Table of Contents

Advertisement

5.2
Numeric Data and String Data
Data handled by the computer is categorized into numeric data and string data. Broadly speaking,
numeric data represents quantity or magnitude, whereas string data represents characters.
(1) Numeric data
The MZ-800 BASIC allows you to use numeric data in either decimal or hexadecimal notation. However,
data in either notation is converted to binary form by the computer so that it can be stored in memory
or used for calculations.
Decimal notation is probably the most familiar numbering system to you, and uses numerals from 0 to 9.
Hexadecimal notation uses numerals from 0 to 9, then characters A to F to represent the values from
10 to 15, With this system, the number of significant digits required to express numbers increases by
one each time the magnitude of the number being expressed increases by a factor of 16, Hexadecimal
numbers are indicated by prefixing ''$'' to the character as follows.
$41=4x 16'+1x 16°=65
$FA = 15x 16'+ 10x 16°= 250
Complements result for hexadecimal numbers greater than $7FFF.
For example, value resulting from $8000 is — 32768 and that resulting from $FFFF is —1,
(2) String data
All characters are represented by numeric codes in the computer, These numeric codes are based on
the ASCII code system. In this system, characters are represented by the numbers 0 to 255 or $00 to
SFF. For example, the character ''A'' is represented by 65 (decimal) or $41 (hexadecimal).
5-3

Advertisement

Table of Contents
loading

Table of Contents