1,885 views
0 votes
0 votes
The number of possible m, such that m&0x3F equals 0x23?

2 Answers

2 votes
2 votes
Only one possible value for m i.e. 0x23

0x simply means that the following number is in Hexadecimal. (in binary 0x3F=111111 and 0x23=100011)
For the bitwise AND operator.
    m : __ __ __ __ __ __ 
0x3F:  1   1   1   1   1   1


0x23:  1   0   0   0   1   1

since if, Y AND 1 = X, then Y=X
Similar is the above condition
So m=100011=0x23

0 votes
0 votes

In Binary OX3F=0011 1111 and OX23=0010 0011

Bitwise AND Operation:  OX3F= 0011 1111

                                        m      =xx10 0011


                                    OX23   =0010 0011

 

Here we can put 0 or 1 in place of x. i.e for 1 x there are 2 possibilities.

So total number of possibilities are 2*2=4

Therefore total number of possible m=4

Related questions

0 votes
0 votes
1 answer
1
0 votes
0 votes
1 answer
2