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]
4 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]4 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
-143=-11x how do I do this ???
Liono4ka [1.6K]
The answer is x=13!!!!!!
6 0
4 years ago
Read 2 more answers
Tayler took 560 photographs during summer vacation.She placed 12 photos on each page of her scrapbook.How many photos did Taylor
oksian1 [2.3K]
So 560 photos and 12 per page
to find out you divide
560/12 
that will be 46 pages and there will be 8 photos on the last page

Hope this helps :)

7 0
3 years ago
Read 2 more answers
what are 3 online websites I can take pictures on with, without saving to ur device , it stays on that site and its just for u
Schach [20]

Answer:

Webca-mtoy.com   webca-mera.io       I only know 2

Step-by-step explanation:

5 0
3 years ago
Are these lines parallel y = -2x + 1 and y = -2x - 4
marin [14]

Answer:

The lines are parallel

Step-by-step explanation:

y = -2x+1 and y = -2x+4 are in the form y = mx +b

Both have a slope of -2

If the slopes are the same the lines are parallel

8 0
3 years ago
Read 2 more answers
In AWXY, WY is extended through point Y to point Z, m_YW X = (2x + 12),
Alja [10]

Answer:

Sum of two interior angles=exterior angle

\\ \sf\longmapsto 2x+12+2x+5=7x-1

\\ \sf\longmapsto 4x+17=7x-1

\\ \sf\longmapsto 3x=18

\\ \sf\longmapsto x=6

Done!

4 0
3 years ago
Other questions:
  • A bag contains 45 marbles of various colours. Lena draws 48 times, each time replacing the marble before drawing again. She gets
    15·2 answers
  • Tom bought 7 new baseball trading cards to add to his collection. the next day his dog ate half of his collection. there are now
    5·1 answer
  • ONLY ANSWER THE QUESTION IF YOU KNOW IT! FIRST PEREON TO ANSWER GETS BRAINLIEST!!
    6·1 answer
  • What is the line's slope​
    7·1 answer
  • Which below are types of estimation in statistics?
    6·1 answer
  • Identify the domain of the function.
    10·1 answer
  • In which year was the Animal Welfare Act put into place? A1956 B 1966 C 1946 D 1976 help me plz i give a brain​
    15·1 answer
  • What is 70% of 3.2 meters
    13·1 answer
  • Help me solve this question
    5·1 answer
  • Help me I need this really bad and I need a good grade I’m behind on school
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!