Need Help about range of numbers?

Thread Starter

JahanzaibNiazi

Joined Jan 5, 2013
1
Give range of following numbers that could be stored in 9-bit space?
(a). Unsigned Numbers.
(b).Positive numbers.
(c).Negative Numbers.

Kindly give me the reply i will be thankful to you.......
 

djsfantasi

Joined Apr 11, 2010
9,163
Think first about part a. Lets try a thought experiment. How many numbers can you represent with 1 bit? How about 2 bits? Or 3 bits? From here, you can probably figure out how many unsigned numbers can be represented with 9 bits, or even generalize YOUR solution to 'n' bits. Once this exercise is completed, and knowing how signed numbers are represented in binary, you can try parts b and c.
 

MrChips

Joined Oct 2, 2009
30,806
Try to work through the answers for (a), (b) and (c) on your own. What are the answers for 2 bits, 3 bits and 4 bits?

From there it will be easy to work out the answers for any number of bits, as djsfantasi says.

The general rule on this forum is not to give you the answer immediately but to encourage you to do the thinking for yourself.

Show us your answers and how you arrived at your answers. Then we will provide assistance.
 

WBahn

Joined Mar 31, 2012
30,058
This seems like a question that probably should be in the Homework Help forum.

The answer to part (a) is very straight forward, but the answers to parts (b) and (c) are a bit ambiguous because it depends on how you have chosen to represent positive and negative values and also whether you choose to include 0 in the count of either positive or negative values.
 
Top