Python Binary Type Quiz
There are 20 questions based on Python  Binary  Type Quiz. 
Sign in to Google to save your progress. Learn more
Q1.  Which method converts a decimal number to binary in Python? *
4 points
Q2.  What is the output of bin(10)?   *
4 points
Q3.  What does the prefix 0b indicate in Python?   *
4 points
Q4.  How do you represent the binary number 1011 in Python?   *
4 points
Q5.  Which of the following operations is valid for binary literals in Python? *
4 points
Q6.  What will 0b110 & 0b101 return?   *
4 points
Q7.  How can you left-shift a binary number in Python? *
4 points
Q8.  What is the result of 0b1101 >> 2?   *
4 points
Q9.  Which function is used to convert binary to decimal? *
4 points
Q10.  What does ~0b1010 evaluate to?   *
4 points
Q11.  Which operator is used for bitwise OR in Python? *
4 points
Q12.  What is the binary representation of the integer 15?   *
4 points
Q13.  What does the ^ operator do in binary operations?   *
4 points
Q14.  How do you represent the octal number 17 in Python?   *
4 points
Q15.  What is the output of int('101', 2)?   *
4 points
Q16.  What will bin(0b1010 | 0b0110) return?   *
4 points
Q17.  Which bitwise operation is used to flip all bits in Python? *
4 points
Q18.  How do you right-shift 0b1001 by 1 in Python?   *
4 points
Q19.  What will bin(0b1100 ^ 0b1010) return?   *
4 points
Q20.  What is the result of int('111', 2) + int('1', 2)?   *
4 points
Submit
Clear form
This content is neither created nor endorsed by Google.