EasyManuals Logo
Home>Casio>Calculator>ClassPad 300

Casio ClassPad 300 Programming Guide

Casio ClassPad 300
125 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #86 background imageLoading...
Page #86 background image
For example, let’s say you want to store 1750. The value of the mantissa will be 1750.
But remember we must calculate the exponent as if 1.750 is actually stored in the
mantissa. Therefore the exponent needs to be 10^3 (because 1.75 * 10^3 = 1750). Since
1750 is positive the OBCD’s exponent starts at 1000. We then add the exponent value
(3) to get:
1000 + 3 = 1003
which means that our exponent has the value of 1003.
The OBCD representation of 1750
eF 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 eS e1 e2 e3
0 1 7 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 3
Now let’s try –0.0065. The mantissa will be 65, so we need the exponent to be –10^-3
(6.5 * -10^-3 = -0.0065). Since our value is negative this time we need to add to 6000.
So the value of the exponent is:
6000 + (-3) = 5997
The OBCD representation of –0.0065
eF 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 eS e1 e2 e3
0 6 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 9 9 7
Finally, let’s look at the value 2.25. This will be stored in the mantissa as 225. The value
we want for an exponent is 10^0 since 2.25 * 10^0 = 2.25. Again, our number is positive
so we add to 1000: 1000 + 0 = 1000. So the representation of 2.25 is:
The OBCD representation of 2.25
eF 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 eS e1 e2 e3
0 2 2 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
Here are some more examples that of exponents and their OBCD representation:
Exponent Value eS e1 e2 e3
0 0 0 0 0
10^-999 0 0 0 1
10^-1 0 9 9 9
10^0 1 0 0 0
10^1 1 0 0 1
-10^1 6 0 0 1
-10^-1 5 9 9 9
Setting the Value of an OBCD
To assign a value to an OBCD number there are several functions that you can use. The
first three we will look at will look at can be used to set an OBCD to a whole number:
word Cal_setn_OBC(word wx, OBCD * x);
word Cal_shortto_OBC(short wx, OBCD * x);
word Cal_longto_OBC(long wx, OBCD * x);
86

Table of Contents

Other manuals for Casio ClassPad 300

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Casio ClassPad 300 and is the answer not in the manual?

Casio ClassPad 300 Specifications

General IconGeneral
BrandCasio
ModelClassPad 300
CategoryCalculator
LanguageEnglish

Related product manuals