1.
Operation of binary numbers
Electronic computers generally use binary numbers. Binary numbers only have two basic numbers, 0 and 1, which are easy to realize in electrical components.
Operation formula of binary number:
0+0=0
0×0=0
0+ 1= 1
0× 1=0
1+0= 1
1×0=0
1+ 1= 10
1× 1= 1
2. Conversion between decimal and binary
( 1)
Decimal numbers are converted into binary numbers.
When converting a decimal integer into a binary integer, you only need to divide it by 2 once, and the remainder is the number represented by binary.
2)
Convert a binary number into a decimal number
Convert an integer of a binary number into a decimal number, just expand it by weight.
For example:1101=1* 24 (power of 2)+1 * 23 (power of 2)+0 * 22 (power of 2)+/kloc.
3.
Conversion of different binary numbers
Interchange between binary numbers and octal numbers: When converting binary numbers into octal numbers, you only need to start from the decimal point, divide every three digits into groups (if it is less than three digits, you can add 0), and then write the octal numbers corresponding to each group of binary numbers.
Example: Convert a binary number (1011001.1) to an octal number:
0 10
1 10
00 1.
1 1 1
2
six
1
seven
That is, the conversion from binary number (101001.1) to octal number is (26 1.7). Conversely, if each octal number is represented by three binary numbers, the conversion between octal number and binary number can be completed.
Interchange between binary numbers and hexadecimal numbers: When converting binary numbers into hexadecimal numbers, you only need to start from the decimal point, divide every four digits into groups (if there are less than four digits, you can add 0), and then write the hexadecimal numbers corresponding to each group of binary numbers.
Example: convert binary number (11010011165438) into hexadecimal number:
0 1 10
1 1 10
0 1 10.
1 10 1
six
E
six
D
That is, binary number (110111165438) is converted into hexadecimal number (6E6. d)。 Conversely, if each hexadecimal number is represented by three binary numbers, the conversion between hexadecimal number and binary number can be completed.
Conversion of octal number, hexadecimal number and decimal number: when converting these three numbers, you can use binary number as the medium and then convert binary number into binary number.