Complement and inverse code in C (-hex ffffffff of 1)

Source: Internet
Author: User

Let's just give an example.

A 1-byte number 7 is represented by a binary representation of 0000 0111, the highest bit is 0 (0 is positive, and 1 is negative)

The inverse code is the inverse of all the digits of a positive number, including the highest bit

The binary representation of negative numbers is the complement (anti-code plus 1), the inverse code is just the transition phase

-7 we pushed by + 7来

+7 0000 0111 = = "1111 1000 = =" 1111 1001

+7 binary Anti-code-72 twos (complement), highest bit is 1

Example:-What is hex 1?

A: 1 0000 0001 = = "F f f F. F f f f e = =" F f f F. F F f f f

1 binary anti-code 0 of the inverse of f-1 16 binary (complement)

Complement and inverse code in C (-hex ffffffff of 1)

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.