Exercise :: Bitwise Operators - True / False Questions
- Bitwise Operators - General Questions
- Bitwise Operators - Find Output of Program
- Bitwise Operators - Point Out Correct Statements
- Bitwise Operators - True / False Questions
- Bitwise Operators - Yes / No Questions
1. | Left shifting a number by 1 is always equivalent to multiplying it by 2. |
|||
Answer: Option A Explanation: 0001 => 1
0010 => 2 0100 => 4 1000 => 8 |
2. | In the statement expression1 >> expression2. if expression1 is a signed integer with its leftmost bit set to 1 then on right shifting it the result of the statement will vary from computer to computer |
|||
|
3. | Bitwise & and | are unary operators |
|||
Answer: Option B Explanation: Bitwise & and | are not unary operators only bitwise ! is unary operator.
|