Bitwise operations: Difference between revisions
Content added Content deleted
m (→{{header|Ada}}: added code highlighting) |
(Added section Logo) |
||
Line 152: | Line 152: | ||
a XOR b: 3 |
a XOR b: 3 |
||
NOT a: -5 |
NOT a: -5 |
||
=={{header|Logo}}== |
|||
to bitwise :a :b |
|||
(print [a and b:] BitAnd :a :b) |
|||
(print [a or b:] BitOr :a :b) |
|||
(print [a xor b:] BitXor :a :b) |
|||
(print [not a:] BitNot :a) |
|||
end |
|||
bitwise 255 170 |
|||
The output of this program is: |
|||
a and b: 170 |
|||
a or b: 255 |
|||
a xor b: 85 |
|||
not a: -256 |
|||
=={{header|LSE64}}== |
=={{header|LSE64}}== |