-
01-09 Conversion of four decimal numbers.
-
The base number conversion is as follows:
Decimal to binary:
Decimal number divided by 2 to take the remainder, that is, the decimal number is divided by 2, the remainder is the number on the weight, and the obtained quotient continues to divide by 2, and this step is reduced until the quotient is 0.
Binary to decimal:
Weight the binary numbers and add them to get the decimal number of the ten-mode bucket pants.
The base system, also known as the carry counting system, is an artificially defined counting method with carry digits. For any kind of decimal --- base, it means that the number in each position is calculated every x digit.
Every 10 into 1, 16 pins are 16 into 1, binary is every 2 into 1, and so on, X is every X round.
Carry system Position notation is a way of noting, so it is also known as carry notation Place-value notation can represent all numerical values with a limited number of symbols.
-
The decimal number x is y in base
Each digit in X is represented as B0, B1, B2, B3 ,.. in base Binteger part), b(-1), b(-2), b(-3),.,
The base number 10 has a value of p in base
The formula is. y=b0*p^0+b1*p^1+b2*p^2+b3*p^3+..b(-1)*p^(-1)+b(-2)*p^(-2)+b(-3)*p^(-3)+.
A cautious method of converting binary, octal, and hexadecimal to and from each other.
Since 8,16 is exponentially related to 2, the conversion method is simpler.
With the decimal point as the boundary, every group of 3 numbers in binary represents an octal number, and every group of 4 numbers in binary represents a hexadecimal number. This simplifies the acre comma: first the groups are converted according to the formula, and then the resulting numbers are arranged together.
Such as: b) 1011 1001 b).
xvi) xvi).
0111 1010 1110 (ii).
011 110 101 011 100 (ii) VIII).
Decimal and binary, octal, and hexadecimal systems can be used.
Except for 2 8 16 remainder method (not otherwise specified).
Formulas are also available. Example.
10000000 (two).
1000000 (two).
100 (ii).
10 (b) 11000110 (b).
-
01-09 The base numbers of the four congregations are mutually excitable and excipient.
-
Conversion between bases:
1. Decimal to binary.
The method is: decimal number divided by 2 remainder method, that is, the decimal number is divided by 2, the remainder is the number on the weight, the obtained quotient continues to divide by 2, and this step continues to operate down until the quotient is 0.
2. Binary to decimal.
The method is: add the binary numbers according to the weight to get the decimal number.
3. Binary to octal.
The method is as follows: 3-digit binary numbers are added to obtain 1-digit octal numbers by adding weights. (Note that the conversion of 3-digit binary to octal is from right to left, and 0 is added when it is insufficient).
4. Octadecimal to binary.
The method is: the octal number is divided by 2 to obtain the binary number, and each octal is 3 binaries, and the leftmost zero is added when it is insufficient.
5. Binary to hexadecimal.
The method is similar to the binary to octal method, the octal is to take three in one, and the hexadecimal is to take four in one. (Note that the conversion of 4-bit binary to hexadecimal is from right to left, and 0 is added when it is insufficient).
6. Hexadecimal to binary.
The method is as follows: the hexadecimal number is divided by 2 to obtain the binary number, and each hexadecimal is 4 binaries, and the leftmost zero is added when it is insufficient.
The essence of base conversion
The "number system" is simply a system of symbols to indicate the amount of "quantity" to be referred to. We use the symbol "1" to represent the concept of this "quantity". The "quantity" in nature is infinite, and it is impossible for me to create a symbol for each "quantity", and no one can remember such a system.
Therefore, it is necessary to use finite symbols to arrange and combine according to a set of laws to represent this infinite "quantity".
Symbols are finite, and the number of combinations of these symbols according to certain rules is infinite. Decimal is a permutation of 10 symbols, and binary is a permutation of 2 symbols. There is a basic principle when it comes to base conversion:
The amount of "quantity" expressed after conversion cannot be changed. There are as many 111 apples in binary as there are 7 apples in decimal.
-
The method of base conversion is:
Binary numbers, hexadecimal numbers can be converted into decimal numbers by the weight method, and the decimal system to r base system is divided into two parts, in which the integer part is divided by r and the remainder is taken until the quotient is 0, and the decimal part is multiplied by r and the remainder is obtained until the whole number is obtained.
1. Binary to decimal.
The value of any binary number is expressed by its bitwise weight.
For example: Convert a binary number ( to a decimal number.
2. Convert decimal system to binary.
Convert decimal integers to binary integers using the "divide by 2 and take the remainder method".
Divide a decimal integer by 2 to get a quotient and a remainder; Divide the quotient by 2 to get another quotient and a remainder.
And so on until the quotient is equal to zero.
The inverted order of the remainder obtained each time is the digit number corresponding to the binary number.
The result is an inverted arrangement of the remainders, i.e., (37)10 (a5a4a3a2a1a0)2 (100101)2.
3. Convert decimal decimal places to binary decimals.
Decimal decimal to binary decimal is converted by "multiplying by 2 to integer". That is, use 2 to multiply the decimal decimal number one by one, and arrange the integer parts of the product obtained each time in the order in which they appear, and the corresponding binary decimal is obtained. To convert decimal decimal to binary decimal decimals, the process is as follows:
Final Result: (.
The base system is also the base system, for people who have been in contact with the computer should be no stranger, we commonly use the base system includes: binary, octal, decimal and hexadecimal, the difference between them is that the number is calculated every few decimal digits.
There are only two digits 0 and 1 in binary numbers, and one digit can be represented by components with two different steady states. For example, the presence or absence of current in a certain path in the circuit, the voltage of a certain node, the conduction and cut-off of transistors, etc. Binary numbers are simple to operate, which greatly simplifies the structure of the arithmetic components in the calculation.
Carry system Position notation is a way of noting, so it is also known as carry notation Place-value notation can represent all numerical values with a limited number of symbols. The number of numeric symbols that can be used is called the base number or base number, and if the base number is n, it can be called the n-base system, referred to as the n-base system. The most commonly used system now is the decimal system, which usually uses 10 Arabic numerals 0-9 for notation.
For any number, we can use different carry systems to represent it. For example, the decimal number 57 (10) can be expressed in binary as 111001 (2), or in pentatical as 212 (5), or in octal as 71 (8), or in hexadecimal as 39 (16), and they all represent the same value.
-
The base conversion method is as follows:1. The octal system is converted into binary, and the method of shouting skin is the octal number by dividing 2 to take the remainder method, and the binary number is blocked by the infiltration, and each octal is 3 binaries, and the leftmost zero is added when it is insufficient.
2. Binary is converted to hexadecimal, and the method is to add 4-digit binary numbers to obtain 1-digit octal numbers by adding weights.
3. The octal system is converted into the decimal system, and the simple method is to give the decimal number by weighting and adding the octal number.
4. Convert decimal to hexadecimal, the method is to convert decimal to octal according to the division of 8 and take the remainder until the quotient is 0.
Convert decimal integers to binary numbers.
The divide by 2 reverse remainder method is adopted: >>>More
Decimal to binary Convert the number to be converted, divide by 2 to get the quotient and remainder, and continue to divide the quotient by 2 until the quotient is 0. Finally, all the remainders are arranged in reverse order, and the number obtained is the conversion result Binary to decimal For example: 0110 0100=0 * 2 0 + 0 * 2 1 + 1 * 2 2 + 1 * 2 3 + 0 * 2 4 + 1 * 2 5 + 1 * 2 6 + 0 * 2 7 = 100 decimal conversion octal divide the quotient by 8 >>>More
The decimal number is divisible by other bases, and the resulting remainder is reversed, and the decimal part is multiplied by the other bases until it is an integer. For example, convert the decimal to binary integer part: 24 2=12....0 >>>More
Handwriting conversion.
Divide the decimal number by 16 and keep the remainder. Once you have the remainder, don't divide it further down to get the decimals. >>>More
In C, you can use the formatting controller of the printf() function to convert decimal numbers to hexadecimal. Specifically, you can use the %x format controller. For example: >>>More