Principle of computer composition--floating point representation method

Source: Internet
Author: User
In order to represent floating-point numbers, the number is divided into two parts: the integer part and the fractional part. For example, floating-point 14.234 has an integer part of 14 and a fractional part of 0.234. First, the floating-point number is converted to binary, and the steps are as follows: 1 converts the integer part to binary. 2 converts fractional parts to binary. 3 adds a decimal point between the two sections. Floating-point numbers can also be normalized, Floating-point numbers can be represented by single-precision notation and double-precision notation. Normalization stores only the three-part information for this number: symbols, pointers, and mantissa. If +1000111.0101 is normalized to
+ 2^6 * 1.0001110101
Sign index mantissa
Single-precision representations of normalized numbers such as +2^6*1.01000111001 solutions:
Since the sign is positive, it is represented by 0. The exponent is 6, and in excess_127 notation, the exponent plus 127 gets 133. In binary notation, 10000101. The mantissa is 01000111001. When the number of digits is increased to 32 bits, Get 01000111001000000000000. Note that you cannot miss the left 0 because it is a decimal. Missing that 0 is the equivalent of multiplying this number by 2. This number is stored in memory in 32 digits. As shown below
Sign index mantissa
0 10000101 01000111001000000000000

Principle of computer composition--floating point representation method

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.