php binary

巴扎黑
Release: 2016-11-22 10:52:24
Original
2006 people have browsed it

Binary 0,1 seam binary 1
1. The highest bit of binary is the sign bit, 0 represents a positive number, 1 represents a negative number
2. The original code of a positive number, its complement and complement are the same
3. The inverse of a negative number Code = the sign bit of its original code remains unchanged, and the other bits are inverted, (0-》1, 1-》0)
4. The complement of a negative number = its complement + 1;
5.0’s complement of the complement is both is 0;
6. There are no unsigned numbers in php. In other words, the numbers in php are all signed.
7. When computers perform operations, they are always performed in the complement method

8.& Bitwise If both bits are 1, the result is 1
9.|Bitwise OR, if 1 is 1, it is 1
10.^XOR, if one is 1, and the other is 0, the result is 1
11,~bitwise To negate, 1——> 0 0->1

Shift left, the sign bit remains unchanged, the low bit is filled with 0,
Shift right, the low bit overflows, the sign bit remains unchanged, and the sign bit is used to fill the overflowed high bit

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template