113k views
5 votes
Identify a logical operation (along

with a corresponding mask) that, when
applied to an input string of 8 bits,
produces an output string of all 0s if and
only if the input string is 10000001.​

1 Answer

1 vote

Answer: Provided in the explanation section

Step-by-step explanation:

The Question says;

Identify a logical operation (along

with a corresponding mask) that, when

applied to an input string of 8 bits,

produces an output string of all 0s if and

only if the input string is 10000001.​

The Answer (Explanation):

XOR, exclusive OR only gives 1 when both the bits are different.

So, if we want to have all 0s, and the for input only 10000001, then we have only one operation which satisfies this condition - XOR 10000001. AND

with 00000000 would also give 0,

but it would give 0 with all the inputs, not just 10000001.

Cheers i hope this helped !!

User Miniwark
by
5.5k points