nerdexam
GIAC

GPYC · Question #8

What is the output of the following line of code typed into a Python interactive session? >>> print(bin(0b101010 ^ 0b111000))

Sign in or unlock GPYC to reveal the answer and full explanation for question #8. The question stem and answer options stay visible for context.

Python Fundamentals & Command Line Tools

Question

What is the output of the following line of code typed into a Python interactive session?
print(bin(0b101010 ^ 0b111000))

Options

  • A0b10101
  • B18
  • C0b10010
  • D0b101101

Unlock GPYC to see the answer

You've previewed enough free GPYC questions. Unlock GPYC for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#bitwise XOR#binary arithmetic#bit manipulation#operators
Full GPYC Practice