This forum is now read-only. Please use our new forums! Go to forums

banner
Close banner
0 points
Submitted by Alexander Prokopyev
almost 10 years

A Bit More Complicated 13/14 Help pls!

a = 0b11101110 mask = 0b1000 result = a^mask print bin(result) My code not worked. I need worked solution pls

Answer 53a30040631fe9316500208a

1 vote
Best answer

Permalink

Worked Solution:

a = 0b11101110 mask = 0b11111111 result = a^mask print bin(result)

points
Submitted by Alexander Prokopyev
almost 10 years

1 comments

C. A. Reis over 9 years

that does not print the right result. Also, the operator should have been “| instead of ^. I don’t understand it because we are supposed to have only the third bit to the right, on. By the way, could someone please tell me what this is used for?

Answer 53ad95207c82cac528000348

4 votes

Permalink

alt text

points
Submitted by Alexander Prokopyev
almost 10 years