Bitwise operatorsC provides six bitwise operators. These operators may only allow integer operands, namely char, short, Int, and long, regardless of signed or unsigned.& By-bit and| Bitwise OR^ Bitwise OR> Right shift~ Inverse (unary
Front.
Bitwise operators are very low-level operations and are not commonly used because they are not intuitive. However, its speed is very fast, and reasonable use can achieve very good results. This article will introduce the operator-bitwise
We've explained PHP arithmetic operators, PHP string operators, assignment operators, and today we'll give you a detailed introduction to the PHP operator
"bitwise operator"。
Bit operators are not often used in PHP, but they are still very useful,
Document directory
Bitwise AND operator (&)
Bitwise OR operator (|)
XOR operator (^)
Inverse Operator (~)
Left shift operator (
Shift right operator (>)
Compound assignment operator
Bitwise AND operator (&)
The two data involved in the
in C #, you can perform a bitwise logical operation on an integer operand. The meaning of the bitwise logical operation is that each bit of the operand is taken sequentially, and the logical operation of each bit is the result of each bit of the
Document directory
Bitwise OR operator (|)
XOR operator (^)
Inverse Operator (~)
Left shift operator (
Shift right operator (>)
Compound assignment operator
The two data involved in the operation perform the "and" Operation in binary bits.
Bitwise operations in Java
Java bit operator
Bitwise operators are used to operate binary bits. Java provides bitwise operators as shown below:
Bitwise operator (>>,>>,&, |, ^ ,~ ), In the bitwise operator, ~ The others are binary operators. The
Discussion on bitwise operators and displacement operations, and operator displacement operations
I have never understood how to calculate this, because I have never used it before, but now I want to understand it, so it is a good idea to understand
1. cBitwise operators in languages
Because the C language is designed to replace the assembly language, it must support the computing power of the assembly language, so the C language supports all bitwise operators ). Bit operations are used to test,
C # basic usage of bitwise operators,
Bitwise operators include: | bitwise OR, & bitwise AND, ^ bitwise xor or xor ,~ NOT, Right Shift, and so on. This article describes the application of the bitwise operator in C. It mainly includes:
○
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.