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
Sue bought two pairs of jeans and a belt that costs $6.95 the tax on the items was $5.85 sue pay the cashier $70 how much money
yaroslaw [1]
<span>cost of two pair of jeans- $55
   cost of belt-$ 5.85
   tax- $5.85
       total bill- $67.8
       as sue paid $70 to the cashier for the bill amount so she will get $2.2 change in return.</span>
6 0
4 years ago
Heather's class took a field trip to the science museum. They left school at 7:30 A.M. It took
vodka [1.7K]

Answer:

10:30 A.M

Step-by-step explanation:

5 0
3 years ago
Plz help me Find LM.
Ira Lisetskai [31]

Because LP and NP are the same measure, that means that MP is a bisector. It bisects side LN and it also bisects angle LMN. Where MP meets LN creates right angles. What we have then thus far is that angle LMP is congruent to angle NMP and that angle LPM is congruent to angle NPM and of course MP is congruent to itself by the reflexive property. Therefore, triangle LPM is congruent to triangle NMP and side LM is congruent to side NM by CPCTC. Side LM measures 11.

3 0
3 years ago
Which of the following points is in the solution set of y&gt;-x^2+5?
QveST [7]
The only point which is a solution is C
3 0
3 years ago
a mans age is three years less than four times his age of his oldest daughter. let a represent the daughters age. write an expre
iogann1982 [59]

Let's label the man's age "x" because it's the unknown value that we're trying to find. Remember that the daughter's age is represented y "a."

x = 4a-3 would be an expression to represent the man's age :)

8 0
3 years ago
Other questions:
  • PLEASE HELP god bless Justify each step of the solution by stating the property that was used to get to each step. Given: 4(-6x
    10·1 answer
  • What is 5% added to $194?
    15·1 answer
  • Identify the slope of the line for the equation y = 10x + 3.
    9·1 answer
  • teresa bought n packs of pencils. each pack has 15 pencils. Right in equation to represent the total number of pencils P that Te
    14·1 answer
  • Select the equation in which the graph of the line has a positive slope, and the y-intercept equals -8.
    7·1 answer
  • Question:
    13·2 answers
  • Simplify the expression: 2[(8−4)5÷8]
    13·1 answer
  • A bag contains 3 red marbles, 5 blue marbles, and 4 green marbles if three marbles are drawn out of the bag what is the exact pr
    9·1 answer
  • What is the approximate volume of the
    11·2 answers
  • Please help, thank you :)​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!