Binary arithmetic
\quad \quad Binary is a number system widely used in computing technology. Binary data is a number represented by two digits, 0 and 1. Its base is 2, the carry rule is "every two enters one", and the borrow rule is "borrow one to become two", which was discovered by Leibniz, a German mathematician and philosophy master in the 18th century. The current computer system basically uses a binary system, and data is mainly stored in the computer in the form of complement. Binary number operations include arithmetic operations and logical operations.
1. Arithmetic operations
1.1 Rules of addition operation
Rule : Every second enters one
example :
1.2 Rules of subtraction operation
Rules : Borrowing one and two
examples :
1.3 Multiplication rules
Rule : What is multiplied by
example :
1.4 Division operation rules
Rule : The division operation of binary system is similar to that of decimal system, and there is no carry or borrow.
Example :
1.5 Negative numbers
The representation of negative numbers in binary: the inverse of a positive number plus 1
5: 00000000 00000000 00000000 00000101
The inverse of 5: 11111111 11111111 11111111 11111010
-5: 11111111 11111111 11111111 11111011