PHP original code, anti-code, complement introduction _php tutorial

Source: Internet
Author: User

PHP original code, anti-code, complement introduction


PHP original code, anti-code, complement the introduction of the original code: is "The original binary code", in fact, we can understand the decimal conversion to binary after a character code obtained. The original code is understandable in numbers. But in the actual computer running process, but often do not use the original code, so there are anti-code, complement the problem. On this basis, the rule: the first bit of a binary number is the sign bit, 0 for positive numbers, and 1 for negative numbers. Example: (all take 8 bits for example): 7:00000111-7:10000111 anti-code: Positive inverse code is itself. The inverse of a negative number is the non-symbolic part of the original code, each bit reversed. Example: 7:00000111-7:11111000 Complement: Positive complement is its own negative anti-code, sign bit unchanged, the rest of each after the inverse, the whole plus 1 example: 7:00000111-7:11111000+1 = 11111001

http://www.bkjia.com/PHPjc/1071706.html www.bkjia.com true http://www.bkjia.com/PHPjc/1071706.html techarticle PHP original code, anti-code, complement the introduction of PHP original code, anti-code, complement introduction of the original code: is the original binary code, in fact, we can understand the conversion of decimal into binary system after getting ...

  • 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.