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
Sasha borrows $100 at 12% simple interest, to be paid back in one year . How much does she pay back
amid [387]

Answer:

$289 I think

Step-by-step explanation:

$289 I think

sorry if I am wrong

8 0
2 years ago
if workers were able to pave 1/3 of your driveway in 40 minutes if they work at same rate what portion of driveway will they pav
Dafna1 [17]
40min is 1/3
implies 20min is 1/6
60min is 1/3+1/6=3/6=1/2
5 0
3 years ago
Use the counting techniques from the last chapter. A bag contains three red marbles, four green ones, one fluorescent pink one,
sergiy2304 [10]

Answer:

The probability that she gets all the red ones, given that she gets the fluorescent pink one, is P=0.0035 or 0.35%.

Step-by-step explanation:

Susan grabs four marbles at random.

We have to calculate the probabilities that he picks the 3 red ones, given that she already picked the fluorescent pink.

If it is given that the fluorescent pink is already picked, we are left with three red marbles, four green ones, two yellow ones, and four orange ones. A total of 13 marbles.

The probability that the second marble is red is 3 in 13.

The probability that the third marble is also red is 2 (the red marbles that are left) in 12 (the total amount of marbles left), as there is a picking without replacement.

The probability that the fourth marble is 1 in 11.

Then, the probability that the 3 red marbles are picked, is:

P=P_1\cdot P_2\cdot P_3=\dfrac{3}{13}\cdot \dfrac{2}{12}\cdot \dfrac{1}{11}=\dfrac{6}{1716}=0.0035

4 0
3 years ago
Elliaarteaga14
ozzi

Answer:20 gallons

Step-by-step explanation:

6 0
2 years ago
The number of cars sold at a dealership over several weeks is given below.
andrezito [222]

Answer:

A. 6.9

Step-by-step explanation:

Edge 2020

8 0
2 years ago
Other questions:
  • What is the volume of this figure?
    12·1 answer
  • Please help. 100 points to best answer!!!
    15·1 answer
  • Please help!
    7·1 answer
  • 6 days is what % of 30 days?
    7·1 answer
  • Brian head 42 class tickets to so he sold 5/6 of the tickets how many tickets did Brian sell
    5·2 answers
  • Area between two shapes. IXL Geometry help pls ! (will mark the brainiest)
    15·1 answer
  • Which of the expressions below are equal to 3x + 9y + 15? Select all that apply.
    12·1 answer
  • Find the missing side length leave your answers as radicals in simplest form
    6·1 answer
  • In a basketball game Fintan made 16 baskets. Each of the baskets is worth either 2 or 3
    14·1 answer
  • Factorise: (Using Algebraic Identities)<br> 64x^3-(4x-3y)^3
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!