B
This commit is contained in:
parent
e5e8880e41
commit
518da4a923
1019 changed files with 15877 additions and 0 deletions
7
Task/Bitwise-operations/Python/bitwise-operations-1.py
Normal file
7
Task/Bitwise-operations/Python/bitwise-operations-1.py
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
def bitwise(a, b):
|
||||
print 'a and b:', a & b
|
||||
print 'a or b:', a | b
|
||||
print 'a xor b:', a ^ b
|
||||
print 'not a:', ~a
|
||||
print 'a << b:', a << b # left shift
|
||||
print 'a >> b:', a >> b # arithmetic right shift
|
||||
Loading…
Add table
Add a link
Reference in a new issue