Addition: 0+0 = 0; 0+ 1= 1; 1+0= 1; 1+ 1= 10; The decimal number of 0 is 1. Subtraction: 0-0 = 0, 1-0 = 1,1= 0,0-1.
When a binary number is converted into a quaternary number, the decimal point is taken as the starting point, and it is segmented in the left and right directions respectively, and every two digits are segmented, and those less than two digits are filled with zeros on the left or right respectively.
Binary numbers are converted into octal numbers: starting from the decimal point, the integer part is left, the decimal part is right, and every three digits are represented by an octal number. If it is less than three digits, the three digits should be supplemented with "0" to get an octal number.
Convert a binary number into a hexadecimal number: When converting a binary number into a hexadecimal number, you only need to divide a group of four-digit binary numbers from the decimal point to the left or right (if there are less than four digits, you can add 0), and then write the hexadecimal number corresponding to each group of binary numbers.
First, the reason why computers use binary.
1, the technical implementation is simple, the computer consists of a logic circuit, and the logic circuit usually has only two states, that is, the switch is on and off, and these two states can be represented by "1" and "0".
2. Simplify the operation rules: there are three combinations of sum and product operations of two binary numbers, and the operation rules are simple, which is beneficial to simplify the internal structure of the computer and improve the operation speed.
3. Suitable for logical operation: logical algebra is the theoretical basis of logical operation, and the binary has only two digits, which coincides with the "truth" and "false" in logical algebra.
4, easy to convert, binary and decimal numbers are easy to convert each other.
5. The binary representation of data has the advantages of strong anti-interference ability and high reliability. Because each data has only two states of high and low, it can still be reliably distinguished whether it is high or low when it is disturbed to a certain extent.
Second, expand information.
In binary, mathematical and digital circuits, the numeration system based on 2 is the binary representing the system based on 2. In this system, it is usually represented by two different symbols 0 (for zero) and 1 (for one).
The discoverer was Leibniz. In digital electronic circuits, binary is directly applied to the realization of logic gates, and binary is used in modern computers and computer-dependent devices. Each number is called a bit (abbreviation of binary number).