Computer AwarenessVery hardIBPS SO IT Officer
A program must clear the lowest 4 bits of a byte to 0 while keeping the upper 4 bits unchanged. With which mask, written in hexadecimal, should the byte be ANDed?
- A. 0F
- B. FF
- C. 00
- D. F0
Correct answer: D. F0
AND with 1 keeps a bit and AND with 0 clears it, so the mask is 1111 0000 = F0. ANDing with 0F would keep the low bits and clear the high ones instead.
हिंदी में
एक प्रोग्राम को बाइट के निचले 4 बिट 0 करने हैं और ऊपरी 4 बिट अपरिवर्तित रखने हैं। हेक्साडेसिमल में लिखे किस मास्क से बाइट का AND लेना चाहिए?
- A. 0F
- B. FF
- C. 00
- D. F0
उत्तर: D. 1 से AND बिट को रखता है और 0 से AND उसे मिटाता है, इसलिए मास्क 1111 0000 = F0 है। 0F से AND निचले बिट रखता और ऊपरी मिटा देता।
More Computer Awareness questions
- Which address can be assigned to a host in the subnet 10.0.0.4/30?
- Relation R(A, B, C) has the composite key AB and the dependency B → C. What is the highest normal form R satisfies?
- Each process in memory spends 80% of its time waiting for I/O. With three such independent processes in memory, about what fraction of…
- A DBA adds a new column to a table's conceptual schema, and the existing application programs and user views keep working unchanged. This…
- Arrange in chronological order: 1. Delivery of UNIVAC I 2. Release of the Intel 4004 microprocessor 3. Completion of ENIAC 4. First…
- Asha sends an e-mail from her laptop's mail client; Ravi, on another provider, reads it on his phone and keeps it synced on the server…