The representation of a negative number is a binary negative number of absolute value plus 1.
Binary is the same as decimal, from decimal to decimal, from binary to 2, enter one digit. 2-bit binary can only be expressed to 4.3 bits, and can be expressed to 8 bits. 4 bits can be expressed as 16.
For example, 0.65 is converted to binary:
0.65 × 2 = 1.3 take 1, leave 0.3 and continue to multiply by two to round off.
0.3 × 2 = 0.6 takes 0, and the remaining 0.6 continues to be multiplied by 2 for rounding.
0.6 × 2 = 1.2 take 1, leave 0.2 and continue to multiply by two to round.
0.2 × 2 = 0.4 takes 0, and the remaining 0.4 continues to be multiplied by 2 for rounding.
0.4 × 2 = 0.8 takes 0, and the remaining 0.8 continues to be multiplied by 2 for rounding.
0.8 × 2 = 1.6 take 1, leave 0.6 and continue to multiply by two to round.
0.6 × 2 = 1.2 take 1, leave 0.2 and continue to multiply by two to round.
Extended data:
There are four cases of binary addition: 0+0=0, 0+ 1= 1 =1,1+1= 1 0 (decimal is 650.
There are four cases of binary multiplication: 0× 0 = 0, 1× 0 = 0, 0× 1 = 0,1×1/.
There are four cases of binary subtraction: 0-0 = 0, 1-0 = 1-1= 0,0-1?
There are two cases of binary division (the divisor can only be 1): 0 ÷ 1 = 0, 1 ÷ 1 = 1
The integer part adopts the method of "dividing by 2 to get the remainder and arranging it in reverse order". The specific method is: divide the decimal integer by 2 to get a quotient and remainder; Divide the quotient by 2 to get a quotient and a remainder, and so on until the quotient is less than 1. Then, the first obtained remainder is used as the low-order significant bit of the binary number, and the last obtained remainder is used as the high-order significant bit of the binary number, which are arranged in turn.
Baidu Encyclopedia-Binary