Text to binary convert :
name = "Name"
binary = ' '.join(format(ord(x), 'b') for x in name)
Binary to Text :
binary = '100001'
binary_values = binary.split()
ascii_string = ""
for binary_value in binary_values:
an_integer = int(binary_value, 2)
ascii_character = chr(an_integer)
ascii_string += ascii_character
print(ascii_string)
Here is my git repo
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…