A decimal turn binary
Decimal integers are converted to binary integers using the "Divide 2, Reverse order" method. The specific method is: divisible by 2 decimal integers, you can get a quotient and the remainder, and then 2 to remove the quotient, and then get a quotient and the remainder, so that until the quotient is 0 o'clock, and then the first obtained remainder as a binary number of the low-effective bit, the remainder as a binary number of the high-level effective bit, and then arranged together
255= (11111111) B
255/2=127===== Yu 1127/2=63====== more than 163/2=31======= 131/2=15======= more 115/2=7======== 17/2=3========= Yu 13/2=1========= Residual 11/2=0========= 1 each bit 1 or 1 of the space unit is bit (bit), which is the smallest representation of the computer in the unit 8bit = 1byte (bytes) The smallest storage unit, 1bytes abbreviation for 1b1kb = 1024B1MB = 1024kbpython2 default use ASCII code python3 default use Utf-8, all python3 to Chinese support a little better
Life is short I learn Python OldBoy21 day entry _day02 data type, character encoding learning