Explain different bitwise operators.
Question :
Explain different bitwise operators.
& (AND) : Sets each bit to 1 if both bits are 1
| (OR) : Sets each bit to 1 if one of two bits is 1
^ (XOR) : Sets each bit to 1 if only one of two bits is 1
~ (NOT) : Inverts all the bits
<< (Left Shift) : Zera fill left shift enables to shift left by pushing zeros in from the right and lets the leftmost bits fall off.
>> (Right Shift) : Signed right shift enable to shift right by pushing copies of the leftmost bit in from the left, and lets the rightmost bits fall off.
Similar Questions
What is Iteration ?
What are jump statements ?
What is the difference between entry controlled loop and exit-controlled loop?
What is the minimum number of iteration that while loop could make ?
What do you mean by selection statements ?
What do you mean by flow-of-control ?
Explain Selection logic.
How many types of control structures are there ? Explain.
What is the use of Control structures ?
What is the function of break statement in a while or for loop ?
Mention the similarity and difference between break and continue statements.
Explain range() function ?
Explain if statement.
What is looping ?
What is conditional branching ?
What is the difference between num = 20 and num == 20?
What is the deference between expression and statement ?
What is the difference between pow() and**?
What is boolean data type ? Explain with an example.
- What is the difference between + and * operators of List ?