PHP original code, reverse code, and supplemental code introduction _ PHP Tutorial

Source: Internet
Author: User
PHP source code, reverse code, and complement introduction. PHP source code, anti-code, complement introduce PHP source code, anti-code, complement introduce the original code: is the original binary code, in fact, we can understand the conversion to binary by decimal to get the PHP source code, anti-code, supplemental Information
PHP source code, reverse code, and complement introduction

Original code:

It is the original binary code, which is actually an escape code we can understand after converting to binary in decimal format. The original code is understandable in numbers. However, in the actual computer operation process, the original code is often not used, so there is a problem of reverse code and complement code.

On this basis, the rule is as follows: the first bit of a binary number is a sign bit, 0 indicates a positive number, and 1 indicates a negative number.

Example: (8 digits are used as an example ):

7: 00000111

-7: 10000111

Anti-code:

The inverse code of positive numbers is itself.

A negative number is used to reverse each of the unsigned parts of the original code ..

Example:

7: 00000111

-7: 11111000

Complement:

The positive complement is its own

The negative number is the inverse code, and the symbol bit remains unchanged. after each of the other digits is reversed, 1 is added as a whole.

Example:

7: 00000111

-7: 11111000 + 1 = 11111001

The original PHP code, reverse code, and complement introduce the original code: it is the original binary code. In fact, it is what we can understand after converting to binary in decimal format...

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.