![Campbell CR9000 Скачать руководство пользователя страница 175](http://html1.mh-extra.com/html/campbell/cr9000/cr9000_instruction-manual_489197175.webp)
Section 8. Processing and Math Instructions
8-15
NOT (-1) = 0
NOT (0) = -1
NOT (NAN) = NAN
(NAN= Not A Number)
OR Operator
Used to perform a bit-wise disjunction on two numbers.
Syntax
result
=
number1
Or
number2
The
Or
operator performs a bit-wise comparison of identically positioned bits in
two numeric expressions and sets the corresponding bit in result according to the
following truth table:
If bit in
And bit in
The result
expr1 is
expr2 is
is
0 0
0
0 1
1
1 0
1
1 1
1
Although OR is a bit wise operator, it is often used to test Boolean
(True/False) conditions. The CR200 decides if something is true or false on the
criteria that 0 is false and any non-zero number is true (Section 4.5). In the
CR200, the pre-defined constant, True = -1.The binary representation of –1 has
all bits equal 1. Thus any number OR -1 returns -1. Any number AND -1
returns the original number.
The predefined constant True = -1
The predefined constant False = 0
If
number
1 is:
Number
2 is:
The
result
is:
-1 Any
Number -1
-1
NAN (not a number)
NAN
0 Any
Number
Number
2
0 NAN
NAN
Expressions are evaluated to a number (Section 4.5) and can be used in place
of one or both of the numbers. Comparison expressions evaluate as True (-1)
or False (0) For example:
If Temp(1) > 50 OR Temp(3) < 20 Then
X = True
Else
X = False
EndIf
and
X = Temp(1) > 50 OR Temp(3) < 20
Содержание CR9000
Страница 6: ...CR9000 Table of Contents iv This is a blank page ...
Страница 22: ...CR9000 Overview OV 16 This is a blank page ...
Страница 26: ...Section 1 Installation 1 4 CR9000 FIGURE 1 1 3 CR9000 Battery Pack ...
Страница 72: ...Section 3 CR9000 Measurement Details 3 28 This is a blank page ...
Страница 88: ...Section 5 Program Declarations 5 6 This is a blank page ...
Страница 217: ...This is a blank page ...