Big Data Jobs 01

Source: Internet
Author: User

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

Negative numbers are expressed in the form of a positive complement, that is, after conversion to binary, you take the counter plus 1.

And the first symbol, 1 is a negative number, 0 is a positive number.

In this way, the absolute value equals the plus or minus two number, the sum can overflow the highest bit, and the result is 0.


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

In bytes of byte type, the range of the numeric expression is -128--127, where 127 of the binary is 01111111, so the binary of 127 is 10000001, so 128 is 10000000.


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

Because the 11,111,111 first bit is 1, that is, it is a negative number, negative numbers are reversed by a positive expression,

So the original code is 00000001. So the real data is-1


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

All support


5. Is the positive number minus one negation?

Yes, for example 11111111, 1, minus one is 11111110, reverse, that is 00000001, the result is 1. Was founded

Big Data Jobs 01

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.