1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sladkaya [172]
4 years ago
13

How many bits are required to represent the decimal numbers in the range from 0 to 999 in straight binary code?

Mathematics
1 answer:
ad-work [718]4 years ago
8 0
Note that powers of 2 can be written in binary as

2^0=1_2
2^1=10_2
2^2=100_2

and so on. Observe that n+1 digits are required to represent the n-th power of 2 in binary.

Also observe that

\log_2(2^n)=n\log_22=n

so we need only add 1 to the logarithm to find the number of binary digits needed to represent powers of 2. For any other number (non-power-of-2), we would need to round down the logarithm to the nearest integer, since for example,

2_{10}=10_2\iff\log_2(2^1)=\log_22=1
3_{10}=11_2\iff\log_23=1+(\text{some number between 0 and 1})
4_{10}=100_2\iff\log_24=2

That is, both 2 and 3 require only two binary digits, so we don't care about the decimal part of \log_23. We only need the integer part, \lfloor\log_23\rfloor, then we add 1.

Now, 2^9=512, and 999 falls between these consecutive powers of 2. That means

\log_2999=9+\text{(some number between 0 and 1})

which means 999 requires \lfloor\log_2999\rfloor+1=9+1=10 binary digits.

Your question seems to ask how many binary digits in total you need to represent all of the numbers 0-999. That would depend on how you encode numbers that requires less than 10 digits, like 1. Do you simply write 1_2? Or do you pad this number with 0s to get 10 digits, i.e. 0000000001_2? In the latter case, the answer is obvious; 1000\times10=10^4 total binary digits are needed.

In the latter case, there's a bit more work involved, but really it's just a matter of finding how many number lie between successive powers of 2. For instance, 0 and 1 both require one digit, 2 and 3 require two, while 4-7 require three, while 8-15 require four, and so on.
You might be interested in
Solve this question ​
love history [14]

Answer:

\frac{4x - 11}{2}  \leqslant 3x - 3 < 4 \\  \\   =  > \frac{4x - 11}{2}  \leqslant 3x - 3 \: and \: 3x - 3 < 4 \\  \\  <  =  > 4x - 11 \leqslant 6x - 6 \:  \: and \:  \: 3x < 7 \\  \\  <  =  > 2x \geqslant  - 5 \:  \: and \:  \: x <  \frac{7}{3}  \\  \\  <  =  >  \frac{ - 5}{2}  \leqslant x <  \frac{7}{3}

=> the greatest integer is 2

the smallest integer is -2

3 0
3 years ago
Multiply or divide as indicated. x^4 • x^-2
Anettt [7]

The answer is 0 unless I did the math wrong


If so someone correct me. Other than that, hope this helped!

8 0
4 years ago
Read 2 more answers
Quad Enterprises is considering a new three-year expansion project that requires an initial fixed asset investment of $2.38 mill
Angelina_Jolie [31]

Step-by-step explanation:

By using Ms Excel you should do this problem.

Kindly check the attachment for solution and cell reference for the clear understanding.

6 0
3 years ago
Please help me asp thank you
Luda [366]
Not readable for me to be able to answer.
5 0
3 years ago
Help!?!! interval on graphs?!
jeka94
I want to say that shows a decreasing interval, since it is going downwards.
6 0
3 years ago
Read 2 more answers
Other questions:
  • Proportions, assist me please! ​
    9·1 answer
  • 14x^2-8x+3 + -6x^2+7x-11
    14·2 answers
  • Which rules give a repeating pattern that has a 7 as the 15th number? Select all that apply.
    5·1 answer
  • 3.75 ÷ 1.50 is equivalent to 375 ÷ 150.<br> The dividend and divisor were both multiplied by
    12·1 answer
  • Somebody please help me witht the 2nd and 3rd
    9·2 answers
  • Solve and show all steps<br><br><br> PLSSS ASAP I NEED HELP TYSM!!!!
    5·2 answers
  • What kind of lines are shown in the picture below?
    5·2 answers
  • Which number produces a rational number when added to o ? Α. π= pie
    8·1 answer
  • Can someone help me with the areas?
    5·2 answers
  • Please help thank you!!!!
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!