Created
April 11, 2021 00:32
-
-
Save dhrumilp15/61f34253897928b3cffebc1c8659c105 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def g(i): | |
'''Reverses i in binary and fills the right side with 0s''' | |
b = bin(i).lstrip("0b").rstrip("L").rjust(BLOCK_LEN * 8, "0") | |
return int(b[::-1], 2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment