Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/jwasham/practice-python
/ rotate_left
Function
rotate_left
bit_manipulation/bits.py:59–61 ·
view source on GitHub ↗
(x, n)
Source
from the content-addressed store, hash-verified
57
58
59
def
rotate_left(x, n):
60
print(bin(-n & 31))
61
return
(x << n) | (x >> (-n & 31))
# assumes a 32 bit word size
62
63
64
def
add(a, b):
Callers
1
main
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected