answer.
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]
2 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]2 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
A church spire casts a shadow on the level ground. At the tip of the shadow, the tip of the spire lies 25° upward. Walking 100 m
malfutka [58]

Answer:

The height of the spire must be 69.24 m

Step-by-step explanation:

The information given are;

The initial angle of elevation of the tip of the spire from the tip of the shadow = 25°

The  angle of elevation of the tip of the spire from the tip of the shadow after moving 100 m closer = 55°

The change distance moved closer to the church spire = 100 m

Let the base angles of the triangle formed by the two rays of the tip of the spire to the tip of the shadow be 25° and ∠x°

We have;

∠x° and the 55° angle of the ray from the tip of the spire to the tip of the shadow are supplementary angles (angle on a straight line)

Therefore;

∠x° = 180° - 55° = 125°

The calculated angle 125° above, the given 25° and the angle in between the two rays from the tip of the spire to the tip of the shadows are the interior angles of the triangle formed by the two rays of the tip of the spire to the tip of the shadow

Let the angle in between the two rays from the tip of the spire to the tip of the shadows = y

Therefore;

125° + y° + 25° = 180 (Angle sum theorem)

y° = 180° - (125° + 25°) = 30°

By sin rule, we have;

100/(sin (30°)) = (The length of the initial ray from the tip of the spire to the tip of the shadow before the shift)/(sin(125°))

Let the length of the initial ray from the tip of the spire to the tip of the shadow before the shift = l

100/(sin (30°)) = l/(sin(125°))

l = (sin(125°))×100/(sin (30°)) = 163.83 m

The height of the spire, by trigonometric ratio = sin(25°) × 163.83 m = 69.24 m

The height of the spire = 69.24 m.

4 0
2 years ago
a product online for $299 and was charged an additional $10 for shipping and handling. The customer received a rebate of $99 and
sammy [17]
The customer payed $192.4 for the product.
8 0
2 years ago
Read 2 more answers
A sociologist wishes to see if it is true that for a certain group of professional women, the average age at which they have the
Vadim26 [7]

Answer:

Z = 2.1\ is\ higher\ than\ 1.96, we\ reject\ H_o

Step-by-step explanation:

The explanation of given question is described below:

Here, the test of hypothesis states that

H_o : Mean = 28.6

H_a : Mean\ which\ is\ not\ equals\ 28.6

The test statistic is

Z = \frac{(\bar X - Mean)}{\frac{Population\ standard\ deviation}{vn} }

Z = \frac{(30.06 - 28.6)}{\frac{4.18}{6} }

= 2.1

According to the given data α = 0.05,

So, the major value is

IZ(0.025)I = 1.96

(refer to the standard normal table) .

Finally

Z = 2.1\ is\ higher\ than\ 1.96, we\ reject\ H_o

3 0
2 years ago
A certain shampoo is available in two sizes. A 13.5 ounces bottle cost $2.98. A 29.2 ounce bottle cost $6.12. Find the Unit pric
Sladkaya [172]

Answer:

9.2 ounce bottle cost $6.12 is better buy with unit price of $0.22

Step-by-step explanation:

Unit price of any product is given by

unit price = weight of product/ price of product

Given sizes

A

13.5 ounces bottle cost $2.98

cost of 1 ounce of shampoo for this size = cost price/weight of shampoo

 cost of 1 ounce of shampoo for this size =2.98/13.5 = $0.22

Unit price for this size is $.022

B

9.2 ounce bottle cost $6.12

cost of 1 ounce of shampoo for this size = cost price/weight of shampoo

 cost of 1 ounce of shampoo for this size =6.12/9.2 = 0.66

Unit price for this size is $0.66

As $0.22 is less than $0.66 thus,

9.2 ounce bottle cost $6.12 is better buy.

6 0
2 years ago
The figure below shows a line graph and two shaded triangles that are similar:Which statement about the slope of the line is tru
zzz [600]
Here is something to keep in mind. 
when there is a downward slope, the slope will ALWAYS have a negative slope. even if it is above the x-axis. negative slopes will tend to go from positive y-axis to negative y-axis 
so personally would have to go with -4
because the x-axis is by 4 each time. and this slope is going downward. 

your answer will be D

6 0
2 years ago
Read 2 more answers
Other questions:
  • An arrow is shot at an angle of θ=45∘ above the horizontal. The arrow hits a tree a horizontal distance D=220m away, at the same
    14·2 answers
  • David can proofread15 reports in an hour while Armando can proofread 37reports in an hour. If they have 400 reports to proofread
    15·2 answers
  • If the average (arithmetic mean) of 2,7, and x is 12, what is the value of x
    14·1 answer
  • HELP PLEASE HELP!!!!! 20 POINTS!!!
    12·2 answers
  • A freight train is carrying goods across the country. The distance it has traveled varies directly with the number of gallons of
    5·1 answer
  • Estimate the volume of the solid that lies below the surface z = xy and above the following rectangle. R = (x, y) | 2 ≤ x ≤ 8, 6
    15·1 answer
  • Two airplanes are are 1600 miles apart and heading toward each other at different altitudes. The first plane is traveling north
    14·1 answer
  • Three applications for admission to a local university are checked to determine whether each applicant is male or female. The nu
    15·1 answer
  • Check all the statements that are true:
    14·1 answer
  • Anand needs to hire a plumber. He's considering a plumber that charges an initial fee of \$65$65dollar sign, 65 along with an ho
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!