MCQ Answer

What is the effect of performing AND operation of R with 0xFE ?

What is the effect of performing AND operation of R with 0xFE ?

0xFE के साथ आर का प्रदर्शन और संचालन का क्या प्रभाव पड़ता है ?
Topic : Security and Future of IoT Ecosystem

A. Setting a selected bit of R R का एक सिलेक्टेड बिट सेट करना

B. Clearing a selected bit of R R के सिलेक्टेड बिट को क्लियर करना

C. Complement selected bit of R R के सिलेक्टेड बिट को कॉम्प्लीमेंट करना

D. None of these इनमे से कोई नहीं




Correct Answer is :

B. Clearing a selected bit of R



Explanation

Performing a bitwise AND operation between a binary number and 0xFE (which is 11111110 in binary) will result in preserving all bits of the original number except for the least significant bit (LSB). The AND operation with 0xFE will set the LSB to 0 and leave the other bits unchanged.


Here's a step-by-step explanation:


Let's assume "R" is an 8-bit binary number, and you want to perform the AND operation with 0xFE:

R:    a7 a6 a5 a4 a3 a2 a1 a0  (8 bits)

0xFE: 1  1  1  1  1  1  1  0   (8 bits)

---------------------------

Result: a7 a6 a5 a4 a3 a2 a1 0  (8 bits)

As you can see, each bit in the result is the result of the AND operation between the corresponding bits of "R" and 0xFE. The least significant bit (a0) is always set to 0 because 0xFE has a 0 in its LSB.


So, the effect of performing the AND operation of "R" with 0xFE is to clear the least significant bit of "R" while leaving the other bits unchanged.

Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad