Bitwise operations: Difference between revisions

Content added Content deleted
(add task to aarch64 assembly raspberry pi)
imported>Arakov
Line 3,171: Line 3,171:


=={{header|Elena}}==
=={{header|Elena}}==
ELENA 4.x :
ELENA 6.x :
<syntaxhighlight lang="elena">import extensions;
<syntaxhighlight lang="elena">import extensions;


Line 3,178: Line 3,178:
bitwiseTest(y)
bitwiseTest(y)
{
{
console.printLine(self," and ",y," = ",self.and(y));
console.printLine(self," and ",y," = ",self & y);
console.printLine(self," or ",y," = ",self.or(y));
console.printLine(self," or ",y," = ",self | y);
console.printLine(self," xor ",y," = ",self.xor(y));
console.printLine(self," xor ",y," = ",self ^ y);
console.printLine("not ",self," = ",self.Inverted);
console.printLine("not ",self," = ",self.BInverted);
console.printLine(self," shr ",y," = ",self.shiftRight(y));
console.printLine(self," shr ",y," = ",self.shiftRight(y));
console.printLine(self," shl ",y," = ",self.shiftLeft(y));
console.printLine(self," shl ",y," = ",self.shiftLeft(y));
Line 3,200: Line 3,200:
255 shl 2 = 1020
255 shl 2 = 1020
</pre>
</pre>

=={{header|Elixir}}==
=={{header|Elixir}}==
<syntaxhighlight lang="elixir">defmodule Bitwise_operation do
<syntaxhighlight lang="elixir">defmodule Bitwise_operation do