I missed some basic knowledge from Mr. Mi because I came to improve my class after January 1, October 1. Now I am going to attend the class with the 12th lesson and I will make up my debt!
1. Why do computers use binary instead of decimal, hexadecimal?
We all know that the computer uses binary to process data. Do you know why binary instead of decimal, hexadecimal? The reason is thatSimpleBecause the binary is only 0 and 1, and how to combine it is also 0 and 1, the operation is very simple!
2. Before conversion, we need to know the "weight" of the binary ". 1, 2, 4, 8, 16, 32, 64,128, the conversion is based on the weight. 1. Binary → decimal
Sum by right.For example, convert binary 1001 to decimal binary 1001 = 1x23 + 0x22 + 0x21 + 1x2o = decimal 9 2, decimal → binary
Convert the decimal number into binary number by weight decomposition.For example, convert decimal number 9 to binary 9 = 8 + 0 + 0 + 1 = 1x23 + 0x22 + 0x21 + 1x2o. The binary number is 4 digits in total, it is 1001.
The binary value is expressed as 0, 1, but the hexadecimal value is from 0 ~ 9 and ~ F. A hexadecimal value is represented by a four-digit binary number. So the conversion between binary and hexadecimal is very simple! However, they are also combined or decomposed Based on weights. 3. hexadecimal → binary 1-bit to 4-bit: hexadecimal 8 = 1x23 + 0x22 + 0x21 + 0x2o = binary 1000 4. Binary → hexadecimal 4-bit change to 1: binary number 1000 = 1x23 + 0x22 + 0x21 + 0x2o = hexadecimal number 8 decimal number everyone is familiar with, that is, the number we use in real life. The conversion from decimal to hexadecimal is simpler. It is also based on the combination or decomposition of weights. The hexadecimal weight is 256 ...... 5. hexadecimal → hexadecimal 8d = 8x161 + dx16o = decimal 141 6 or decimal → hexadecimal decimal 141 = 8x16 + 13 = 8x161 + dx16o = hexadecimal 8d
Iii. summary from the above six conversions, we can conclude that any hexadecimal conversion is performed on the basis of the weight, so we only need to know the weight of the hexadecimal conversion, it is so easy to convert, not just a decomposition and combination! I used to have a headache when I was a level-1 question. Now, it seems like that! There is no difficulty!
Basic computer knowledge (I) -- hexadecimal conversion