

InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
1. |
What is the two’s complement of -44?(a) 1011011(b) 11010100(c) 11101011(d) 10110011The question was posed to me in exam.This is a very interesting question from Bitwise in chapter Precedence and Associativity, Bitwise & Boolean of Python |
Answer» Correct OPTION is (B) 11010100 |
|
2. |
Which of the following expressions can be used to multiply a given number ‘a’ by 4?(a) a4This question was addressed to me in final exam.I need to ask this question from Bitwise in section Precedence and Associativity, Bitwise & Boolean of Python |
Answer» The CORRECT OPTION is (a) a<<2 |
|
3. |
Any odd number on being AND-ed with ________ always gives 1. Hint: Any even number on being AND-ed with this value always gives 0.(a) 10(b) 2(c) 1(d) 0I have been asked this question in examination.I'd like to ask this question from Bitwise topic in portion Precedence and Associativity, Bitwise & Boolean of Python |
Answer» Right option is (C) 1 |
|
4. |
Bitwise _________ gives 1 if either of the bits is 1 and 0 when both of the bits are 1.(a) OR(b) AND(c) XOR(d) NOTThis question was addressed to me by my college director while I was bunking the class.The query is from Bitwise in portion Precedence and Associativity, Bitwise & Boolean of Python |
Answer» The CORRECT option is (C) XOR |
|
5. |
The one’s complement of 110010101 is:(a) 001101010(b) 110010101(c) 001101011(d) 110010100I got this question in final exam.I need to ask this question from Bitwise topic in portion Precedence and Associativity, Bitwise & Boolean of Python |
Answer» CORRECT ANSWER is (a) 001101010 Explanation: The one’s complement of a value is obtained by SIMPLY changing all the 1’s to 0’s and all the 0’s to 1’s. Hence the one’s complement of 110010101 is 001101010. |
|
6. |
The one’s complement of 110010101 is:(a) 001101010(b) 110010101(c) 001101011(d) 110010100I have been asked this question in an interview for job.Question is taken from Bitwise topic in division Precedence and Associativity, Bitwise & Boolean of Python |
Answer» | |
7. |
It is not possible for the two’s complement value to be equal to the original value in any case.(a) True(b) FalseI got this question by my college director while I was bunking the class.My question is based upon Bitwise in portion Precedence and Associativity, Bitwise & Boolean of Python |
Answer» RIGHT option is (b) False The explanation is: In most cases the value of two’s complement is different from the ORIGINAL value. However, there are cases in which the two’s complement value may be EQUAL to the original value. For example, the two’s complement of 10000000 is also equal to 10000000. Hence the statement is false. |
|
8. |
Which of the following represents the bitwise XOR operator?(a) &(b) ^(c) |(d) !I have been asked this question by my school principal while I was bunking the class.Asked question is from Bitwise topic in portion Precedence and Associativity, Bitwise & Boolean of Python |
Answer» The correct OPTION is (B) ^ |
|
9. |
Which of the following expressions results in an error?(a) int(1011)(b) int(‘1011’,23)(c) int(1011,2)(d) int(‘1011’)This question was addressed to me by my school principal while I was bunking the class.This interesting question is from Bitwise topic in division Precedence and Associativity, Bitwise & Boolean of Python |
Answer» Correct option is (c) int(1011,2) |
|
10. |
To find the decimal value of 1111, that is 15, we can use the function:(a) int(1111,10)(b) int(‘1111’,10)(c) int(1111,2)(d) int(‘1111’,2)I have been asked this question in an interview.Origin of the question is Bitwise in chapter Precedence and Associativity, Bitwise & Boolean of Python |
Answer» The CORRECT choice is (d) int(‘1111’,2) |
|
11. |
The expression 2**2**3 is evaluates as: (2**2)**3.(a) True(b) FalseI have been asked this question during a job interview.This question is from Precedence and Associativity topic in division Precedence and Associativity, Bitwise & Boolean of Python |
Answer» Correct answer is (b) False |
|
12. |
Which of the following expressions results in an error?(a) float(‘10’)(b) int(‘10’)(c) float(’10.8’)(d) int(’10.8’)I had been asked this question during an interview.This intriguing question comes from Precedence and Associativity in chapter Precedence and Associativity, Bitwise & Boolean of Python |
Answer» The correct ANSWER is (d) INT(’10.8’) |
|
13. |
Which of the following expressions is an example of type conversion?(a) 4.0 + float(3)(b) 5.3 + 6.3(c) 5.0 + 3(d) 3 + 7I have been asked this question in homework.The query is from Precedence and Associativity topic in chapter Precedence and Associativity, Bitwise & Boolean of Python |
Answer» CORRECT answer is (a) 4.0 + float(3) For EXPLANATION: Type conversion is nothing but explicit conversion of OPERANDS to a SPECIFIC type. Options 5.3 + 6.3 and 5.0 + 3 are examples of implicit conversion whereas OPTION 4.0 + float(3) is an example of explicit conversion or type conversion. |
|
14. |
Which of the following expressions involves coercion when evaluated in Python?(a) 4.7 – 1.5(b) 7.9 * 6.3(c) 1.7 % 2(d) 3.4 + 4.6I have been asked this question at a job interview.This intriguing question comes from Precedence and Associativity in portion Precedence and Associativity, Bitwise & Boolean of Python |
Answer» The correct choice is (c) 1.7 % 2 |
|
15. |
Which of the following is the truncation division operator?(a) /(b) %(c) //(d) |I got this question in an online interview.The above asked question is from Precedence and Associativity topic in portion Precedence and Associativity, Bitwise & Boolean of Python |
Answer» Right option is (c) // |
|
16. |
Which of the following operators has its associativity from right to left?(a) +(b) //(c) %(d) **This question was posed to me during an interview.The question is from Precedence and Associativity topic in chapter Precedence and Associativity, Bitwise & Boolean of Python |
Answer» Correct answer is (d) ** |
|
17. |
The value of the expressions 4/(3*(2-1)) and 4/3*(2-1) is the same.(a) True(b) FalseThe question was asked by my school teacher while I was bunking the class.My question is based upon Precedence and Associativity in portion Precedence and Associativity, Bitwise & Boolean of Python |
Answer» Correct option is (a) True |
|