NIC-NIELIT Scientist-B 2020
October 14, 2023Propositional-Logic
October 14, 2023Digital-Logic-Design
Question 494
|
If X is a binary number which is power of 2, then the value of X & (X – 1) is :
11….11
|
|
00…..00
|
|
100…..0
|
|
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.
→ 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.
Correct Answer: B
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.
→ 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.
Subscribe
Login
0 Comments