Extension:
1, representation of binary data
Binary data also uses the position counting method, and its bit weight is a power based on 2. For example, binary data110.11,and its weight order is 2 2, 21,2 0, 2-1,2-2. For integers with n digits and decimal digits with m digits, the binary data is expressed by the weighted coefficient expansion, which can be written as:
(a(n- 1)a(n-2)…a(-m))2=a(n- 1)×2^(n- 1)+a(n-2)×2^(n-2)+……+a( 1)×2^ 1+a(0)×2^0+a(- 1)×2^(- 1)+a(-2)×2^(-2)+……+a(-m)×2^(-m)
Generally, binary data can be written as: (a (n-1) a (n-2) ... a (1) a (-1) a (-2) ... a (-m)) 2.
note:
1. where aj represents the coefficient of the j-th position, which is one of 0 and 1.
2. The (n- 1) in A (n-1) is a subscript, so the input method cannot be typed, so it is enclosed in brackets to avoid confusion.
3.2 2 represents the square of 2, and so on.
Example 1 102 Write binary data11.01as a weighting coefficient.
Solution: (11.01) 2 = (1× 2 2)+(1× 21)+(/kloc)
Binary, like hexadecimal and octal, is carried by the power of two.
The basic law of arithmetic operation of binary data is very similar to that of decimal number operation. The most commonly used are addition and multiplication.
1. binary addition
There are four situations: 0+0 = 0.
0+ 1= 1
1+0= 1
1+1=10 is1
Example 1 103 Find the sum of (11) 2+(101) 2.
Solution:
1. south milk Chicken Wings 鈮? Food ingredients 鈮? Chicken wings 12, 20g of garlic, 20g of south milk and red rot milk 1 8g, 2g of refined salt, 2g of monosod