User`s manual

8-15
Examples
A! = 2 will be stored as follows
2 = 10 Binary, normalized as .1 E2 = .1 x 2
2
So exponent of A is 128+2 = 130 (called excess 128)
MSB of A is 10000000;
however, the high bit is changed to zero since the value is positive (called
hidden or implied leading one).
So A! is stored as
Exponent (K+3) MSB (K+2) Next MSB (K+l) LSB (K)
130 0 0 0
A!= -.5 will be stored as
Exponent (K+3) MSB (K+2) Next MSB (K+1) LSB (K)
128 128 0 0
A!= 7 will be stored as
Exponent (K+3) MSB (K+2) Next MSB (K+1) LSB (K)
131 96 0 0
A!= -7
Exponent (K+3) MSB (K+2) Next MSB (K+1) LSB (K)
131 224 0 0
Zero is simply stored as a zero-exponent. The other bytes are insignificant.
Logical Operators
In Chapter 1 we described how AND, OR and NOT can be used with
relational expressions. For example,
100 IF A=C AND NOT(B>40) THEN 60 ELSE 50
AND, OR and NOT can also be used for bit manipulation, bitwise
comparisons, and Boolean operations. In this section, we will explain how
such operations can be implemented using LEVEL II BASIC. However, we
will not try to explain Boolean algebra, decimal-to-binary conversions, binary
arithmetic, etc. If you need to learn about these subjects, Radio Shack's
Understanding Digital Computers
(Catalog Number 62-2027) would be a
good place to start.
AND, OR and NOT convert their arguments to sixteen-bit, signed
two's-complement integers in the range -32768 to +32767. They then perform
the specified logical operation on them and return a result within the same
range. If the arguments are not in this range, an "FC" error results.