Bei
diesem A b s c h n i t t werden Grundkenntnisse des B i n a e r s y s t e m s
der hexadezimalen
B i t - o r i e n t i e r t e Boolesche
z e i c h e n l o s e n , p o s i t i v e n
Z a h l e n b e r e i c h zwischen
die
hexadezimale
oder 0 und 65535 d e z i m a l . Dem V C 2 0 - B A S I C - I n t e r p r e t e r
Z a h l e n , m i t denen
f u e h r t werden s o l l e n , jedoch a l s D e z i m a l z a h l e n im B e r e i c h z w i s c h e n
-32767 und +32767 angegeben werden ( s . a . Abschn. 3 . 2 . 1 0 . 4 ) . Z.B:
O p e r a t i o n
1 AND 1
1 AND -1
15 OR 240 e r g i b t 255
NOT 0
NOT 1
F a l l s
d i e zu b e a r b e i t e n d e n
werden
s i e z u n a e c h s t
j e d e s B i t d e s l i n k e n Terms entsprechend dem Booleschen Operator m i t
jedem B i t des r e c h t e n Terms l o g i s c h v e r k n u e p f t . Das E r g e b n i s s t e l l t
wieder e i n e I n t e g e r - Z a h l d a r . P r i n z i p i e l l
zwischen e i n e r gemischten
und e i n e r e i n f a c h e n Booleschen O p e r a t i o n wie:
Der e i n z i g e
p r a k t i s c h e U n t e r s c h i e d i s t d e r , dass
zunaechst d i e beiden V e r g l e i c h s o p e r a t i o n e n a u s g e f u e h r t werden, d i e
0 oder
-1 l i e f e r n
Werten von 0 und/oder -1 a u s g e f u e h r t w i r d , waehrend im z w e i t e n
A und C j e d e
s e i n k a n n . Im F a l l von:
waerden z u n a e c h s t d i e V e r g l e i c h s o p e r a t i o n e n d u r c h g e f u e h r t . Wenn d i e
l i n k e
O p e r a t i o n
s c h l i e s s e n d d i e Boolesche
die
d a s E r g e b n i s 0 l i e f e r t , a l s o
Dies kann man, wie im l e t z t e n A b s c h n i t t b e s c h r i e b e n , a l s
s c h r e i b e n , d.h. d i e Verzweigung w i r d n i c h t a u s g e f u e h r t .
S c h r e i b w e i s e von Zahlen v o r a u s g e s e t z t .
Operationen werden n o r m a l e r w e i s e
1 6 - B i t - Z a h l e n d u r c h g e f u e h r t , a l s o
$0000 und $FFFF (das $-Zeichen
S c h r e i b w e i s e und h a t n i c h t s m i t S t r i n g s
b i t - o r i e n t i e r t e
e r g i b t 1
e r g i b t 1
e r g i b t -1
e r g i b t -2
Terme noch n i c h t
i n d i e s e Form g e b r a c h t .
Booleschen O p e r a t i o n w i e :
A=1 OR C<2
A 0R C
und d a s s dann d i e Boolesche
I n t e g e r - Z a h l im B e r e i c h zwischen
I F A=B AND C<D GOTO 40
"wahr" und d i e r e c h t e
O p e r a t i o n
I F -1 AND 0 GOTO 40
I F 0 GOTO 40
I F 0 <> 0 GOTO 40
Boolesche
Operationen
Hexadezimales A e q u i v a l e n t
0001 AND 0001
0001 AND FFFF
O0OF OR 00F0
NOT 0000
NOT 0001
b e s t e h t k e i n U n t e r s c h i e d
"unwahr" e r g i b t ,
22
an v o r -
i n einem
k e n n z e i c h n e t
z u t u n )
muessen d i e
durchge-
e r g i b t 0001
e r g i b t 0001
e r g i b t 00FF
e r g i b t F F F F
e r g i b t F F F E
I n t e g e r - Z a h l e n s i n d ,
A n s c h l i e s s e n d w i r d
im e r s t e n
O p e r a t i o n
n u r m i t
-32767 und +32767
w i r d an-
sowie
F a l l
F a l l