Bitwise operations: Difference between revisions
m
ooRexx output placement
Walterpachl (talk | contribs) (ooRexx added) |
Walterpachl (talk | contribs) m (ooRexx output placement) |
||
Line 1,411:
c2b: return x2b(c2x(arg(1)))</lang>
Output:
<pre>▼
a :0011001000110001 3231▼
b :001100110011010000110111 333437▼
bitand(a,b) :001100100011000000110111 323037▼
bitor(a,b) :001100110011010100110111 333537▼
bitxor(a,b) :000000010000010100110111 010537▼
ooRexx only:▼
a~bitor(b,p):001100110011010111111111 3335FF▼
</pre>▼
=={{header|PARI/GP}}==
Line 1,423 ⟶ 1,431:
print("Right shift: ",a>>b);
}</lang>
▲<pre>
▲ a :0011001000110001 3231
▲ b :001100110011010000110111 333437
▲bitand(a,b) :001100100011000000110111 323037
▲bitor(a,b) :001100110011010100110111 333537
▲bitxor(a,b) :000000010000010100110111 010537
▲ooRexx only:
▲a~bitor(b,p):001100110011010111111111 3335FF
▲</pre>
=={{header|Pascal}}==
|