Skip to content

Instantly share code, notes, and snippets.



Created Jan 14, 2020
What would you like to do?
Como computar o bit de paridade?
def parity(x):
result = 0
while x:
result ^= x & 1
x >>= 1
return result
if __name__ == "__main__":
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment