Bitwise operations: Difference between revisions

m
Line 2,895:
<syntaxhighlight lang="easylang">
# numbers are doubles, bit operations use 32 bits and are unsigned
proc bout v . .
for i to 32
s$ = v mod 2 & s$
v = v div 2
.
print s$
.
x = 11
y = 2
print s$x
call bout x
print y
call bout y
call boutprint bitnot x
call boutprint bitand x y
call boutprint bitor x y
call boutprint bitxor x y
call boutprint bitshift x y
call boutprint bitshift x -y
</syntaxhighlight>
 
2,063

edits