If we wanted to find the value (1 or 0) of the third bit from the right (bitNum = 2) of variable x, we should: O int bit

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

If we wanted to find the value (1 or 0) of the third bit from the right (bitNum = 2) of variable x, we should: O int bit

Post by answerhappygod »

If We Wanted To Find The Value 1 Or 0 Of The Third Bit From The Right Bitnum 2 Of Variable X We Should O Int Bit 1
If We Wanted To Find The Value 1 Or 0 Of The Third Bit From The Right Bitnum 2 Of Variable X We Should O Int Bit 1 (16.6 KiB) Viewed 37 times
If we wanted to find the value (1 or 0) of the third bit from the right (bitNum = 2) of variable x, we should: O int bit = x & 4 int bit = (x >> 3) & 1: int bit = x >> 3: int bit = (x >> 2) & 1:
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply