RosettaCodeData/Task/Bitwise-operations/Sidef/bitwise-operations.sidef

11 lines
258 B
Text
Raw Permalink Normal View History

2016-12-05 23:44:36 +01:00
func bitwise(a, b) {
2017-09-23 10:01:46 +02:00
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
2016-12-05 23:44:36 +01:00
}
bitwise(14,3)