0b or 0B is a binary number

0o or 0O is an octal number 🐙

0x or 0X is a hexadecimal (16進数, 0~9, a, b, c, d, e)

 

binary number

0, 1, 10, 11, 100....

0, 1, 2,   3,  4 .....

 

octal number

0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12...

0, 1, 2, 3, 4, 5, 6, 7, 8,  9,  10...

 

hexadecimal number

0~9, a,   b,   c,   d,  e,   f,   10, 11, 12...

0~9, 10, 11, 12, 13, 14, 15, 16, 17, 18... 

 

ke = 0b10 2進数を入れると、

print (ke)

output: 2  10進数で出してくれる。

 

ko = 0o10 input octal number

print (ko)

output: 8 output decimal number

 

sa = 0x10 input hexadecimal

print (sa)

output: 16 output decimal number