0

i have a question on the bitwise AND output of two numbers.

example: print(A and B) = B.

print(2 and 5) = 5
Why is the bitwise AND of A, B = B? This is because this is different from expected result of say 0b110 & 0b111 = 6.

Confused as to why A and B, where A and B are numbers outputs B.

Appreciate the help.
Qasim Wani
  • 111
  • 1
  • 5

0 Answers0