Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
15
Task/Bitwise-operations/Sidef/bitwise-operations.sidef
Normal file
15
Task/Bitwise-operations/Sidef/bitwise-operations.sidef
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
func bitwise(a, b) {
|
||||
|
||||
# Make sure they are integers
|
||||
a.to_int!;
|
||||
b.to_int!;
|
||||
|
||||
say ('a and b : ', a & b);
|
||||
say ('a or b : ', a | b);
|
||||
say ('a xor b : ', a ^ b);
|
||||
say ('not a : ', ~a);
|
||||
say ('a << b : ', a << b); # left shift
|
||||
say ('a >> b : ', a >> b); # arithmetic right shift
|
||||
}
|
||||
|
||||
bitwise(14,3)
|
||||
Loading…
Add table
Add a link
Reference in a new issue