Bitwise operations: Difference between revisions

→‎{{header|PARI/GP}}: move bitneg to lang
(→‎{{header|Perl6}}: Added perl 6 solution)
(→‎{{header|PARI/GP}}: move bitneg to lang)
Line 1,017:
 
=={{header|PARI/GP}}==
Pari does not support bitwise rotations, or negations; thesewhich have no obvious meaning with arbitrary-precision integers. See also <coe>bitneg</code> and <code>bitnegimply</code> for moreanother bitwise operatorsoperator. For shifts, see also <code>shiftmul</code>.
<lang parigp>bo(a,b)={
print("And: "bitand(a,b));
print("Or: "bitor(a,b));
print("Not: "bitneg(a));
print("Xor: "bitxor(a,b));
print("Left shift: ",a<<b);