In-depth understanding of computer system Second Edition exercise solution Csapp 2.6

Source: Internet
Author: User

You can use print bytes to know that the hexadecimal number of decimal 12345 is 0x00003039, and the hexadecimal of decimal floating point 12345.0 is 0x4640e400.

Convert to Binary to

1 /* 2        0   0   0   0   3   0   3   93    0000000000000000001  10000001110014                       *************5                 4   6   4   0   E   4   0   06              010001100100000011100100000000007  8* /

There are 13-bit matches after the move.

The hexadecimal of the known decimal number 3510593 is 0x00359141, and the hexadecimal of decimal floating point 3510593.0 is 0x4a564504.

A. Write a binary representation of the two numbers above.

B. Move the relative positions of the two binary strings so that they match the largest number of digits. How many matches are there?

C. What position in the string does not match.

1/*2  0 0 3 5 9 1 4 13  00000000001 1010110010001010000014  *********************5  4 A 5 6 4 5 0 46  010010100 101011001000101000001 0 0       7 8 */

A.

1 /* 2 0x00359141 3 0000 0000 0011 0101 1001 0001 0100 0001 4 5 0x4a564504 6 0100 1010 0101 0110 0100 0101 0000 0100 7 */

B. 21-bit matching

C. Intuitively: The first 9 digits and the last 2 bits do not match the floating point number.

Does not match the position of the integer number from the high to the 1th bit not 0.

Follow-up understanding of floating point storage is more straightforward.

In-depth understanding of computer system Second Edition exercise solution Csapp 2.6

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.