October 14, 2023
October 14, 2023
October 14, 2023
###### Propositional-Logic
October 14, 2023
 Question 494
If X is a binary number which is power of 2, then the value of X & (X – 1) is :
 A 11….11 B 00…..00 C 100…..0 D 000……1
Question 494 Explanation:
Given data,
→ X is binary number which is power of 2. It means, we have to take powers of 2 numbers only.
Ex: 1,2,4,8,16,32,..,
Let X=4
X=4 equivalent binary number is 100
X-1=3 equivalent binary number is 011
100
011
—–
000 (AND operation)
—–
Ex-2:
X=8 and X-1=7
8 binary value is
1000
7 binary number is 0111
——–
0000(AND operation)
——–
So, Option B is correct answer.
Question 494 Explanation:
Given data,
→ X is binary number which is power of 2. It means, we have to take powers of 2 numbers only.
Ex: 1,2,4,8,16,32,..,
Let X=4
X=4 equivalent binary number is 100
X-1=3 equivalent binary number is 011
100
011
—–
000 (AND operation)
—–
Ex-2:
X=8 and X-1=7
8 binary value is
1000
7 binary number is 0111
——–
0000(AND operation)
——–
So, Option B is correct answer.