7 lines
201 B
Nim
7 lines
201 B
Nim
proc bitwise[T: SomeInteger](a, b: T) =
|
|
echo "a and b: " , a and b
|
|
echo "a or b: ", a or b
|
|
echo "a xor b: ", a xor b
|
|
echo "not a: ", not a
|
|
echo "a << b: ", a shl b
|
|
echo "a >> b: ", a shr b
|