Solutions to issues left over from the previous week Q: Is the source code, reverse code, and complement Code only for the number of signed characters? Are there three encoding methods for the unsigned number? The answer is: For the unsigned number, the original code, the reverse code, and the supplementary code are the same further. Because the signed number is stored in the computer in the form of a supplementary code, the three types of codes are the same, so we can say that,
The integer number exists in the computer as a complement. . Reference: https://www.jianshu.com/p/ffc97c4d2306
Floating Point Number For floating point numbers, I read LIU Da's article "after reading this article, you must understand what a floating point number is." Then I know two points.
1. How do floating point numbers be stored?
2. Why are floating point numbers inaccurate? The following is a summary of the inaccuracy of floating point numbers: 1. When the decimal part is converted to the binary decimal part, not all decimal places can be accurately converted to 2 ^ (-1) = 0.5, 2 ^ (-2) = 0.25, 2 ^ (-3) = 0.125, 2 ^ (-4) = 0.0625 ...... However, only the preceding numbers can be accurately expressed (precise representation: for a certain number of X, these numbers are called A1, A2, A3, A4, etc ......, Can be written as X = N * A1 + M * A2 + z * A3 ...... And the number of items is limited, where n, m, z is an integer), can be precisely expressed by floating point numbers. 2. the binary digits that indicate decimal places are limited (according to IEEE 754 standard, in 32-bit machines, 23 digits are used to represent decimal places) However, where is the floating point? Still unclear. Since it specifies the number of digits of the symbol bit (1 digit), tail number (23 digits), and index (8 digits), isn't the floating point number still a fixed point number?
In-depth understanding of the expression and processing of information in chapter 2 of the Computer System