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
Please help me please
SVETLANKA909090 [29]

Answer: x is 125

Step-by-step explanation: Angles P and S are also consecutive angles, adding up to 180 degrees. 180-55 = 125, so adding the two angles together is 180 degrees. Thus, x is 125.

5 0
2 years ago
What is th result of converting 20 ounces into pounds?
Harrizon [31]
Hello!

The Correct Answer would be:

"1.25 Pounds"

Why? Well:

1 ounce (oz) is equal to 0.0625 pounds (lb).

1 oz = (1/16) lb = 0.0625 lb

The mass m in pounds (lb) is equal to the mass m in ounces (oz) divided by 16:

m(lb) = m(oz) / 16


So as Result, The Answer is 1.25 Pounds.


Hope this Helps! Have A Wonderful Day! :)

6 0
3 years ago
Read 2 more answers
Which graph shows the function y=(13)3x
Aleks04 [339]
Answer: in da pic

Explanation: Can’t see pic but I used mathwye to graph it

6 0
3 years ago
four friends bought 10 lbs of nuts and shared them equally. How many pounds if nuts did each friend get
Marianna [84]
You need to do 10 divided by 4. Each friend would get 2.5 pounds of a nut.
5 0
3 years ago
Ed & Heath won the grand
mestny [16]

Answer:

224

Step-by-step explanation:

(100+12)*2

6 0
3 years ago
Other questions:
  • Which statement best describes the area of the triangle shown below?
    7·1 answer
  • Write the point-slope form of the equation of the line that passes through the point (1, 3) and has a slope of 2. Include your w
    13·2 answers
  • Evaluate d–7.5 when d = –3.82.<br> a. –11.32<br> b. –3.68<br> c. 3.68<br> d. 11.32
    13·2 answers
  • Solve the proportion 2/19 = x/152
    9·1 answer
  • In circle C major arc ABD is represented by 4x+50. what is the value of x in the diagram
    7·1 answer
  • What happens in a 90° clockwise/270° counterclockwise. rotation?*
    5·2 answers
  • Helppppppppppp plzzz
    7·1 answer
  • Help this is due tomorrow​
    10·1 answer
  • Complete the statement. Trapezoids are parallelograms
    10·2 answers
  • With the spinner shown, the theoretical probability of landing on 2 is 0.25. Which number of
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!