Computer AwarenessHardSSC CGL · IBPS PO Mains
What is the minimum number of bits needed to store every whole number from 0 to 9999 in pure binary?
- A. 13
- B. 16
- C. 15
- D. 14
Correct answer: D. 14
There are 10,000 values; 2¹³ = 8192 is too few but 2¹⁴ = 16,384 is enough, so 14 bits. Taking ⌊log₂ 9999⌋ = 13 forgets to round up, adding a sign bit gives 15, and 16 is what four BCD digits would need.
हिंदी में
0 से 9999 तक की प्रत्येक पूर्ण संख्या को शुद्ध बाइनरी में संग्रहीत करने के लिए न्यूनतम कितने बिट चाहिए?
- A. 13
- B. 16
- C. 15
- D. 14
उत्तर: D. 10,000 मान हैं; 2¹³ = 8192 कम है पर 2¹⁴ = 16,384 पर्याप्त है, इसलिए 14 बिट। ⌊log₂ 9999⌋ = 13 लेना ऊपर पूर्णांकित करना भूल जाता है, साइन बिट जोड़ने पर 15 आता है, और 16 वह है जो चार BCD अंकों को चाहिए।
More Computer Awareness questions
- The value −6 is 1010 in 4-bit two's complement. When it is sign-extended to 8 bits, the result is:
- The 8-bit two's-complement value 11101000 (−24) is shifted right by two places using an ARITHMETIC shift. What is the result?
- When two n-bit two's-complement numbers are added, overflow has occurred exactly when:
- Rotary shaft encoders and Karnaugh-map labels use Gray code mainly because:
- Which code is self-complementing, so that inverting every bit of a digit's code gives the code of its 9's complement?
- The hexadecimal number 3FA is written in binary without leading zeros. How many bits does it have?