Jump to content

Bitwise operations: Difference between revisions

(→‎{{header|AppleScript}}: Updated output of first Applescript version (rNum of << now masked with 31))
Line 2,500:
x ROR y = 4611686018427387902
</pre>
 
=={{header|Free Pascal}}==
<lang pascal>program Bitwise;
{$mode objfpc}
begin
Writeln('2 and 3 = ', 2 and 3);
Writeln('2 or 3 = ', 2 or 3);
Writeln('2 xor 3 = ', 2 xor 3);
Writeln('not 2 = ', not 2);
Writeln('2 shl 3 = ', 2 >> 3);
Writeln('2 shr 3 = ', 2 << 3);
writeln('2 rol 3 = ', rolbyte(2,3));
writeln('2 ror 3 = ', rorbyte(2,3));
writeln('2 sar 3 = ', sarshortint(2,3));
Readln;
end.</lang>
 
=={{header|FutureBasic}}==
64

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.