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]
3 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]3 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
True or false<br> The solution to the inequality 5x+2&lt;175x+2&lt;17 is x&lt;3x&lt;3.
Aloiza [94]

Answer:

I believe it is true. So sorry if it's not.

7 0
3 years ago
Find the solution(s) to the system of equations represented in the graph.
jolli1 [7]

Answer:

(-3,0) and (0,3)

Step-by-step explanation:

The solution to the system of equation is where the two graphs intersect

The intersect at two points

(-3,0) and (0,3)

3 0
3 years ago
If officer brimberry wrote 16 tickets for traffic violations last week but only 10 tickets this week what is the percent decreas
melamori03 [73]
I believe this is right..

10/16= x/100
x=62.5%
100%- 62.5%= 37.5%
5 0
3 years ago
A car travels at an average speed of 68 miles per hour. How long does it take to travel 323 miles?
GaryK [48]
4.75 miles divide 323 by 68
6 0
3 years ago
Read 2 more answers
Solve the system of equation by elimination. <br> 4x-3y=-21<br> 5x+3y=-6
Lena [83]

Answer:x=-3,y=3

or (-3,3)

Step-by-step explanation:

3 0
3 years ago
Other questions:
  • X + 34 = 60 what does "x" equal??
    11·2 answers
  • A store sold 50 copies of a magazine for $150. Each copy of the magazine costs the same. Which equation and set of ordered pairs
    5·1 answer
  • Susan wants to buy a paddleboat for $840 she'll pay 20% down and pay the rest in six monthly installments what will be the amoun
    11·1 answer
  • A carpenter charges $720 for 18 hours of work. She charges the same amount of money for each hour of work. Which table shows the
    9·1 answer
  • What is a qualitative graph?
    10·2 answers
  • Question 1&amp;2 with explanation. Pls fast , no useless and nonsense answers pls
    11·1 answer
  • A model rocket is launched from the ground with an initial velocity of 100 feet per second. How many seconds later does the rock
    10·1 answer
  • You are the head of a building department . Your department is making final inspections of two types of new commercial buildings
    8·1 answer
  • 3. The cost of a taxi ride is the sum of a fixed cost of $2,50 for the first kilometer, plus
    9·1 answer
  • You order a pizza with diameter 14 inches. Your friend orders a pizza with diameter 10 inches. Compare the areas of the two pizz
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!