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
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,
InC ProgrammingIn, the bit of data is the smallest unit of data that can be operated. In theory, you can use the bitwise operation to complete all the operations and operations. AverageBit operationIt is used to control hardware or perform data
Comparison between bitwise operation and multiplication and division operation.
Many bitwise operations exist in Java JDK. The purpose is to make the code run faster. Let's conduct an experiment to see how much computing time can be saved.
In the
[Java Basics] 14. bitwise operations-bitwise AND (&) operations-(fast modulo algorithm) and java Basics 14 Operations
The redis dictionary structure is learned. The hash Value & sizemask operation is used when the hash is used to find the index
I. Six operators in C language:
& Bitwise AND
| By bit or
^ Bitwise OR
~ Invert
> Right shift
1. bitwise AND OPERATION
Bitwise AND operator "&" are binary operators.
Its function is the binary phase corresponding to the two numbers involved in the
Bitwise Operations implement addition, subtraction, multiplication, division, and four arithmetic operations1. Description
How do I use bitwise operations to perform the addition, subtraction, multiplication, and division of integers?
2. SolutionYou
1. bitwise and operation bitwise AND operator "&" are binary operators. Its function is the binary phase corresponding to the two numbers involved in the operation. The result bit is 1 only when the two binary numbers are 1. Otherwise, the result
Bitwise -AND Operator (&)
Participate in the operation of the two data, press bits for "and" operation.
Arithmetic Rules:0&0=0; 0&1=0; 1&0=0; 1&1=1;
That is, the two-bit is "1" at the same time, the result is "1", otherwise 0
For example: 3&5
Bitwise AND Operator (&)
To participate in the operation of the two data, press bits for the "and" operation.
Operation Rules:0&0=0; 0&1=0; 1&0=0; 1&1=1;
That is: two digits at the same time "1", the result is "1", otherwise 0
For example: 3&5
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.