Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,8 @@
|
|||
# bitwise operators - floating point numbers will be cast to integer
|
||||
a = 0b00010001
|
||||
b = 0b11110000
|
||||
print a
|
||||
print int(a * 2) # shift left (multiply by 2)
|
||||
print a \ 2 # shift right (integer divide by 2)
|
||||
print a | b # bitwise or on two integer values
|
||||
print a & b # bitwise or on two integer values
|
||||
Loading…
Add table
Add a link
Reference in a new issue