Just flip out whatswrong here .?


#1



Replace this line with your code. 
a = 0b11101110
mask = 0b00010001
desired = a^mask
print bin(desired)
|


#2

it throws an error that be sure your answer is a binary string !!!!!!!!!.....?????

what should i do ....????


#3

It runs alright for me, could you elaborate? Maybe share the instructions or the console output :confused:

try adding parentheses at the print line:
print (bin(desired))
But that's just silly. Also there's this | character below your "print" line here.


#4

no that character is not the problem i have had a look at it !!!
below are the instructions !!

In the editor is the 8 bit variable a. Use a bitmask and the value a in order to achieve a result where all of the bits in a are flipped. Be sure to print your answer as a bin() string!


#5

Hi,

You just have to create a mask with the same length as 'a' and with all the bits turned on.


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.