Skip to main content

Bitwise And Boolean — Part 1 MCQs with Explanations

Practice high-yield Programming & Software Development MCQs on Bitwise And Boolean — Part 1 with worked academic solutions for FPSC, PPSC, NTS, NITB, PTS.

Questions
40
Difficulty Level
Exam-Level
Target Exams
FPSC, PPSC, NTS...
Estimated Time
48 mins
Exam-Level FPSC PPSC NTS NITB PTS
Verified for Commission Syllabus • Oct 14, 2026
40

Verified Practice Questions

Interactive test mode with detailed academic worked solutions

Live Progress | 0/40 answered
✓ 0 correct ✗ 0 wrong 0% score
Question 1 of 40
★ FPSC ★ PPSC

What is the result of `6 | 3` ?

Question 2 of 40
★ FPSC ★ PPSC

What is the result of 10 ^ 6 ?

Question 3 of 40
★ FPSC ★ PPSC

What is the result of 7 << 2 ?

Question 4 of 40
★ FPSC ★ PPSC

What is the result of True ^ False ?

Question 5 of 40
★ FPSC ★ PPSC

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

Question 6 of 40
★ FPSC ★ PPSC

What is the result of not (True or False) ?

Question 7 of 40
★ FPSC ★ PPSC

What is the result of (10 >> 1) & 3 ?

Question 8 of 40
★ FPSC ★ PPSC

What is the result of 7 ^ 7 ?

Question 9 of 40
★ FPSC ★ PPSC

What is the result of 12 ^ (7 << 1) ?

Question 10 of 40
★ FPSC ★ PPSC

What is the result of ~5 ?

Question 11 of 40
★ FPSC ★ PPSC

What is the result of 5 ^ 5 ?

Question 12 of 40
★ FPSC ★ PPSC

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

Question 13 of 40
★ FPSC ★ PPSC

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

Question 14 of 40
★ FPSC ★ PPSC

What is the result of 5 & 6 ^ 6 ?

Question 15 of 40
★ FPSC ★ PPSC

What is the result of 12 >> 2 ?

Question 16 of 40
★ FPSC ★ PPSC

What is the result of `(6 | 3) ^ 5` ?

Question 17 of 40
★ FPSC ★ PPSC

What will be the value of x in the following Python expression, if the result of that expression is 2? x>>2

Question 18 of 40
★ FPSC ★ PPSC

Which of the following represents the bitwise XOR operator?

Question 19 of 40
★ FPSC ★ PPSC

The one's complement of 110010101 is:

Question 20 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code snippet? not(10<20) and not(10>30)

Question 21 of 40
★ FPSC ★ PPSC

What is the result of `5 & 9 | 1` ?

Question 22 of 40
★ FPSC ★ PPSC

What is the two's complement of -44?

Question 23 of 40
★ FPSC ★ PPSC

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.

Question 24 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code snippet? not(3>4) not(1&1)

Question 25 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code? l=[1, 0, 2, 0, 'hello', '', []] list(filter(bool, l))

Question 26 of 40
★ FPSC ★ PPSC

Which of the following Boolean expressions is not logically equivalent to the other three?

Question 27 of 40
★ FPSC ★ PPSC

What is the result of `(4 | 2) & 6` ?

Question 28 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code if the system date is 21st June, 2017 (Wednesday)? [] or {} {} or []

Question 29 of 40
★ FPSC ★ PPSC

What is the result of `(8 >> 2) | (1 << 2)` ?

Question 30 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code snippet if x=1? x<<2

Question 31 of 40
★ FPSC ★ PPSC

What is the value of the following Python expression? bin(0x8)

Question 32 of 40
★ FPSC ★ PPSC

What will be the value of the following Python expression? bin(10-2)+bin(12^4)

Question 33 of 40
★ FPSC ★ PPSC

What is the result of `5 << 1 | 2 >> 1` ?

Question 34 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code snippet? ['hello', 'morning'][bool('')]

Question 35 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code? if (9 < 0) and (0 < -9): print("hello") elif (9 > 0) or False: print("good") else: print("bad")

Question 36 of 40
★ FPSC ★ PPSC

What will be the output of the following Python expression? 4^12

Question 37 of 40
★ FPSC ★ PPSC

Which of the following expressions can be used to multiply a given number 'a' by 4?

Question 38 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code snippet? bool(‘False’) bool()

Question 39 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code if a=10 and b =20? a=10 b=20 a=a^b b=a^b a=a^b print(a,b)

Question 40 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code? ['f', 't'][bool('spam')]

✓ Link copied to clipboard
Continue Your Practice

Advance Html — Part 1

Master the next curriculum module with 40 exam-standard MCQs.

Next Practice Set →

💡 Examiner's Advisory for Programming & Software Development

In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.

More Modules in Programming & Software Development

View All →
📚

Study Guides

Topic summaries and syllabus breakdown

Explore Guides →
🎯

Complete Library

Search through 78,000+ verified MCQs

Browse Library →
📱

Mobile App

Offline mock tests and instant bookmarks

Get Mobile App →