Basic knowledge:
1. And (&) Operations (bitwise AND)The and operation is usually used for bitwise operations. For example, the result of a number and 1 is the last bit of the binary. This can be used to judge the parity of an integer. the last bit
first know the characteristics of these two binary data: 1=0000 0000 0000 0000 0000 0000 0000 0001-1=1000 0000 0000 0000 0000 0000 0000 00011. The highest position (first) is positive or negative (0 is positive, 1 is negative)2. Lowest bit (bottom)
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
Language bitwise operators: With, OR, XOR, reverse, move left, and rightA bitwise operation is a binary-based operation. In system software, it is often necessary to deal with bits problems. The C language provides 6 bit manipulation operators.
Bitwise operations are operations that are performed in binary order. In system software, it is often necessary to deal with bits problems. The C language provides 6 bit operator operators. These operators can only be used for integer operands, that
Javascript bitwise left shift operator (
This article mainly introduces the Javascript bitwise left shift operator (
Bitwise left shift operator (
Left shift expression bit.
Result = expression1
Parameters
Result
Any variable.
Expression1
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
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
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
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,
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.