Last active
September 18, 2021 15:47
-
-
Save TheBlackPlague/a1d8cb483cff3fc303efcf5402f5d97b 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
x = 102385; # Can be any unsigned integer of your liking. | |
bin = '' | |
while x != 0: | |
z = x % 2; | |
x = (x / 2) - (z / 2) | |
bin += str(int(z)) | |
print(bin[::-1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment