# 实现过程

h = "荒"
y = "原"
z = "之"
m = "梦"
h_utf8 = h.encode("UTF-8")
y_utf8 = y.encode("UTF-8")
z_utf8 = z.encode("UTF-8")
m_utf8 = m.encode("UTF-8")

print("荒：",h_utf8)
print("原：",y_utf8)
print("之：",z_utf8)
print("梦：",m_utf8)

荒： b'\xe8\x8d\x92'

荒： e8 8d 92

• 0x: 16进制
• 0o: 8进制
• 0b: 2进制
• 没有前缀：10进制

• bin(): 转换成2进制
• int(): 转换成10进制
• oct(): 转换成8进制
• hex(): 转换成16进制

h = [0xe8, 0x8d, 0x92]
y = [0xe5, 0x8e, 0x9f]
z = [0xe4, 0xb9, 0x8b]
m = [0xe6, 0xa2, 0xa6]

print("荒：2进制")
for i in h:
print(bin(i))
print("--------------")

print("原：2进制")
for i in y:
print(bin(i))
print("--------------")

print("之：2进制")
for i in z:
print(bin(i))
print("--------------")

print("梦：2进制")
for i in m:
print(bin(i))
print("--------------")

荒：2进制
0b11101000
0b10001101
0b10010010
--------------

0b11100101
0b10001110
0b10011111
--------------

0b11100100
0b10111001
0b10001011
--------------

0b11100110
0b10100010
0b10100110
--------------

荒：2进制
11101000
10001101
10010010
--------------

11100101
10001110
10011111
--------------

11100100
10111001
10001011
--------------

11100110
10100010
10100110
--------------

h = bin(0b11101000+0b10001101+0b10010010)
y = bin(0b11100101+0b10001110+0b10011111)
z = bin(0b11100100+0b10111001+0b10001011)
m = bin(0b11100110+0b10100010+0b10100110)

print("荒：",h)
print("原：",y)
print("之：",z)
print("梦：",m)

荒： 0b1000000111

荒： 1000000111