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
Help? please and thank you​
11111nata11111 [884]

Answer:

first one

relationship between base and perpendicular is

given by tan angle

tan x=P/h

remember perpendicular is opposite side of taken angle

tan x=13/8

<x=tàn-¹(13/8)=58.39°

for second one

relationship between base and hypotenuse is given by cos angle

cos G=b/h

cos G=24/32

<G=cos-¹(24/32)=41.4 is your answer

8 0
3 years ago
Solving compound inequalities <br><br> 14r+20 &lt;14r+16 or 8-10r&gt;15-9r
vova2212 [387]
14r+20<14r+16 or 8−10r>15−9r

14r+20<14r+16

14r+20−14r<14r+16−14r(Subtract 14r from both sides)

20<16

20−20<16−20(Subtract 20 from both sides)

0<−4



8−10r>15−9r

−10r+8>−9r+15(Simplify both sides of the inequality)

−10r+8+9r>−9r+15+9r(Add 9r to both sides)

−r+8>15

−r+8−8>15−8(Subtract 8 from both sides)

−r>7

−r/−1 > 7/−1(Divide both sides by -1)

r<−7




Ur answer is:

r < - 7  OR   0 < - 4

7 0
3 years ago
If i have 10 apples and eat 5 how many do i have now?
Sliva [168]

you have 5 apples now

3 0
3 years ago
Read 2 more answers
Which of the following offer is better value of money?
elixir [45]

Answer:

200ml of toothpaste for 50p

Step-by-step explanation:

200/50=4

and

400/90=4.4444444444444444 (4.45 rounded up)

So, you would be getting more bang for your buck with 200ml for 50p

Hope this helps!

7 0
3 years ago
HELPPP WITH THIS PLEASEEEEEE
maw [93]

Answer:

Width=8

Length=11

It's an 8m x11m rectangle.

Step-by-step explanation:

2L+2W= 38

2(w+3)+2w=38

2W+6+2w=38

4W=32

W=8

L=W+3=8+3=11

CHECK: 8+8+11+11=38

5 0
3 years ago
Other questions:
  • Simplify ( 1/2 x− 3/8 )÷ 1/3 + 4/7 (5− 1/4 x)
    10·1 answer
  • mitzi has a rectangular swimming pool. she fills it with water to a depth of 5 feet. the water has a volume of 1200 cubic feet.
    8·2 answers
  • 6 people equally share 56 gummy worms. How many gummy worms does each person get? Nine and one sixth gummy worms nine and two si
    6·1 answer
  • The expression represents the cost of Janelle’s cell phone bill, where m represents the number of minutes of use. 0.05m + 12 Wha
    10·2 answers
  • I just need the answer to the question
    7·1 answer
  • WILL GIVE BRAINLIEST
    5·1 answer
  • nicole will rent a car for the weekend. she can choose one of two plans the first plan has an initial fee of $53 and cost an add
    6·1 answer
  • Which table shows a proportional relationship between x and y ?
    15·1 answer
  • Plz help 7(4x - 3) = 4x
    15·2 answers
  • Decide whether the two inequalities are equivalent. Explain.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!