MCPcopy
hub / github.com/jwasham/practice-python / toggle_bit

Function toggle_bit

bit_manipulation/bits.py:55–56  ·  view source on GitHub ↗
(x, position)

Source from the content-addressed store, hash-verified

53
54
55def toggle_bit(x, position):
56 return x ^ (1 << position)
57
58
59def rotate_left(x, n):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected