1.1 essence of computer storage Information ------- binary form
A computer consists of two parts: a software system and a hardware system. Software is the soul of a computer, and hardware is the body of a computer. Software is the information stored on hardware.
Computer Hardware includes input and output devices, central processors, and storage devices. The storage device is used to store information. However, no matter what the device is, it is a combination of circuit boards, chips and other electronic components. How do these computers use these electronic components to store and transmit information? There are only two states that an electronic component can represent: high or low voltage. This signal is usually called a level pulse. A computer expresses various information through a combination of Level Pulse states (a group of signals with high, low, and low level pulses. The storage of computer information is essentially a different combination of high voltage or low voltage. We can use the binary in mathematics to represent these storage states in computer electronic components. Because binary has only two numbers 0 and 1, which correspond to the level pulse state. If 1 represents a high voltage, 0 represents a low voltage. For example, if a group of comment pulse signals is "low, high, low, low", a group of binary values 0101000 can be used for representation. If we convert the binary number into a decimal number, it is a value we are familiar.
1.2 digit System
In mathematics, the base system is also called the number system. The number system only uses the r basic symbols. In this case, it is called the r Base System and the R is called the "base" of the number system ". Commonly used computer hexadecimal systems include binary, octal, decimal, and hexadecimal. The binary is composed of two symbols: 0 and 1. The base number is 2. The octal value is composed of eight symbols: 0, 1, 2, 3, 4, 5, 6, and 7. The base number is 8; decimal is composed of ten symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Therefore, the base number is 10. hexadecimal is composed: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, a Represents 10, B represents 11, and so on. The base number is 16.
In the number system, the unit value corresponding to each fixed position is called "permission ". For example, if the decimal number is "(123) 10", the base R is 10, and the rightmost bits are called 0th bits (that is, one bits), the right-to-left bits increase sequentially, the right of each digit is equal to the power of the number of digits in the base. Therefore, the 0th-bit permission is 100. The first permission is 101. The value of each digit is equal to the number of the digit multiplied by the bit right. Therefore, the value of the decimal number "(123) 10" 1st bits (that is, 10 bits) is equal to the number of this bits 2 multiplied by the right of this bits 101 is equal to 20. Another example is the hexadecimal number "(4fda) 16". The 0th-bit permission is 160. The value of this digit is equal to the number A of this digit multiplied by the weight 160 of this digit is equal to. And so on. The value of 1st bits is equal to D * 161. The value of 2nd bits is equal to f * 162.
1.3 hexadecimal Calculation
Binary, octal, and hexadecimal are the same as decimal, and can be used for addition, subtraction, multiplication, division. The base-based principle is adopted for different hexadecimal systems. For example, binary number (1010) 2 + (0111) 2 = (10001) 2, (1010) 2-(0111) 2 = (0011) 2. (1010) 2 * (0111) 2 = (1000110) 2 the calculation process is as follows:
1010 1010 1010
+ 0111-0111*0111
------------------------------
10001 0011 1010
1010
Addition and subtraction + 1010
-----------------
1000110
Multiplication
For example, 8-digit number (1234) 8 + (7234) 8 = (10470) 8.
1234
+ 7234
---------
10470
1.4 hexadecimal conversion