Bitwise operations: Difference between revisions
Content added Content deleted
Line 2,892: | Line 2,892: | ||
`) |
`) |
||
}</syntaxhighlight> |
}</syntaxhighlight> |
||
=={{header|EasyLang}}== |
|||
<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 |
|||
call bout x |
|||
call bout y |
|||
call bout bitnot x |
|||
call bout bitand x y |
|||
call bout bitor x y |
|||
call bout bitxor x y |
|||
call bout bitshift x y |
|||
call bout bitshift x -y |
|||
</syntaxhighlight> |
|||
=={{header|ECL}}== |
=={{header|ECL}}== |
||
<syntaxhighlight lang="ecl"> |
<syntaxhighlight lang="ecl"> |