MCPcopy
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
59def rotate_left(x, n):
60 print(bin(-n & 31))
61 return (x << n) | (x >> (-n & 31)) # assumes a 32 bit word size
62
63
64def add(a, b):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected