Commerce

Bitwise And Boolean MCQs

Practice Bitwise And Boolean MCQs for competitive exams.

Bitwise And Boolean MCQs

Practice questions from this topic.

What will be the output of the following Python expression? ~100?

  1. A. 101
  2. B. -101
  3. C. 100
  4. D. -100
Report Error

What will be the output of the following Python code? class Truth: pass x=Truth() bool(x)

  1. A. pass
  2. B. true
  3. C. false
  4. D. error
Report Error

What is the result of `10 & 5 | 5` ?

  1. A. 5
  2. B. 10
  3. C. 0
  4. D. 15
Report Error

What is the result of 12 >> 2 ?

  1. A. 3
  2. B. 6
  3. C. 12
  4. D. 48
Report Error

What is the result of 5 & 6 ^ 6 ?

  1. A. 6
  2. B. 5
  3. C. 0
  4. D. 1
Report Error

Bitwise . . . . . . . . gives 1 if either of the bits is 1 and 0 when both of the bits are 1.

  1. A. OR
  2. B. AND
  3. C. XOR
  4. D. NOT
Report Error

It is not possible for the two's complement value to be equal to the original value in any case.

  1. A. True
  2. B. False
Report Error

What is the result of `12 | 10 & 9` ?

  1. A. 12
  2. B. 10
  3. C. 9
  4. D. 8
Report Error

What is the result of not (10 > 5) ?

  1. A. True
  2. B. False
  3. C. None
  4. D. Error
Report Error

What is the result of 9 ^ (5 & 3) ?

  1. A. 8
  2. B. 7
  3. C. 1
  4. D. 2
Report Error

To find the decimal value of 1111, that is 15, we can use the function:

  1. A. int(1111,10)
  2. B. int('1111',10)
  3. C. int(1111,2)
  4. D. int('1111',2)
Report Error

What will be the output of the following Python expression? bin(29)

  1. A. '0b10111'
  2. B. '0b11101'
  3. C. '0b11111'
  4. D. '0b11011'
Report Error