各种进制的转换(计算机基础呀)(国外英文资料)
各种进制的转换(计算机基础呀)
All kinds of hexadecimal conversion (computer basis).Txt no pain in the wound, only the blood flowing smile, sometimes the simplest advice to others is the most difficult to do. Binary, octal, decimal, sixteen decimal conversion
I. conversion between decimal and binary
(1) decimal conversion into binary, divided into integral part and decimal part
Integer part
Methods: in 2 to take over, namely each integer part divided by 2, the remainder is the right number, and the operators continue to divide by 2, the remainder is a bit on the right number, this step continues until the quotient is 0, when the last reading, from the last remainder read, until a remainder in the front. Here's an example:
Example: converts decimal 168 to binary
The result is that the decimal 168 is converted to binary, 2
Analysis: first, divide 168 by 2, quotient 84, and the remainder 0.
The second step is to divide quotient 84 by 2 and quotient 42 to the remainder 0.
The third step is to divide quotient 42 by 2 and quotient 21 to the remainder 0.
The fourth step is to divide quotient 21 by 2 and quotient 10 to the remainder 1.
The fifth step is to divide quotient 10 by 2 and quotient 5 to the remainder 0.
The sixth step is to divide quotient 5 by 2 and quotient 2 to the remainder 1.
The seventh step is to divide quotient 2 by 2 and quotient 1 to the remainder 0.
The eighth step is to divide quotient 1 by 2 and quotient 0 to the remainder 1.
The ninth step is to read, because the last one is obtained by dividing it by 2 several times, so it is the highest point. Read the numbers and read from the last remainder, that is,(2) decimal part
Method: take 2 integer method, the fractional part is multiplied by 2, then take the rest of the decimal integer part, continue to multiply by 2, then the integer part, the remaining fraction and multiplied by 2, has been taken to the fractional part
Zero. If can never be zero, with the decimal number four to five homes, accor