Anonymous user
Bitwise operations: Difference between revisions
no edit summary
(Correction, and update for revised specification.) |
No edit summary |
||
Line 210:
[[OpenBSD]] <code>/usr/bin/awk</code> (a variant of [[nawk]]) has these same functions, with a few differences. Gawk uses 53-bit unsigned integers, but OpenBSD awk uses 32-bit signed integers. Therefore Gawk prints <code>not 11 = 0x1ffffffffffff4</code>, but OpenBSD awk prints <code>not 11 = 0xfffffff4</code>.
=={{header|Babel}}==
<lang babel>((main { (5 9) foo ! })
(foo {
({cand} {cor} {cnor} {cxor} {cxnor} {cushl} {cushr} {cashr} {curol} {curor})
{ <- dup give ->
eval
%x nl <<}
each
give zap
cnot %x nl <<})</lang>
This program produces the following output:
<lang babel>1
d
fffffff7
c
fffffff3
a00
0
0
a00
2800000
fffffffa</lang>
=={{header|BASIC}}==
|