Big Data next day homework

Source: Internet
Author: User

1. What is the representation of negative numbers and why is it so designed?

A: Negative numbers use a positive complement way to express, using the complement to indicate negative numbers after the CPU for the calculation of subtraction can also be solved by adding operations.

How is 2.-128 stored in memory? The calculation process?

For:

125 01111101

-125 10000011

126 01111110

-126 10000010

127 01111111

-127 10000001

128 10000000 (cannot be represented as a positive number because the highest is a sign bit)

-128 10000000

3. If the byte represents no 11111111, what is its true data?

A: 1. Because the highest bit sign bit is 1, first determine that the byte represents a negative number

2. Convert it to a positive number (the last 1 is unchanged and the other bits are reversed) to get the result

00000001 the number of positive expressions is 1

3. Since the number is negative, the decimal value of its positive number is 1 to infer that the decimal of that digit is-1

4. Do positive and negative numbers support the complement approach?

A: Positive numbers do not have the concept of complement, only a negative support complement, can also be understood as a positive complement is its own

5. Is the positive number minus one negation?

Take the number 3 example:

3 00000011

-3 11111101

-4 11111100 (minus 1)

00000011 (Take reverse)

It is proved that the positive number can be obtained by reducing the negative number by one inverse method.


Big Data next day homework

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.