Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,30 @@
$ include "seed7_05.s7i";
include "bin32.s7i";
const proc: bitwise (in integer: a, in integer: b) is func
begin
writeln("a: " <& a radix 2 lpad0 32);
writeln("b: " <& b radix 2 lpad0 32);
writeln("integer operations:");
writeln("a << b: " <& a << b radix 2 lpad0 32); # left shift
writeln("a >> b: " <& a >> b radix 2 lpad0 32); # arithmetic right shift
end func;
const proc: bitwise (in bin32: a, in bin32: b) is func
begin
writeln("bin32 operations:");
writeln("a and b: " <& a & b radix 2 lpad0 32);
writeln("a or b: " <& a | b radix 2 lpad0 32);
writeln("a xor b: " <& a >< b radix 2 lpad0 32);
writeln("not a: " <& ~a radix 2 lpad0 32);
writeln("a << b: " <& a << ord(b) radix 2 lpad0 32); # left shift
writeln("a >> b: " <& a >> ord(b) radix 2 lpad0 32); # logical right shift
writeln("a rotL b: " <& rotLeft(a, ord(b)) radix 2 lpad0 32); # Rotate Left
writeln("a rolR b: " <& rotRight(a, ord(b)) radix 2 lpad0 32); # Rotate Right
end func;
const proc: main is func
begin
bitwise(65076, 6);
bitwise(bin32(65076), bin32(6));
end func;