bits and bytes

Status
Not open for further replies.

j4ckaL

Daemon Poster
Messages
718
ok, I been reading up a little on this topic on howstuffworks and I have a question. I understand that there are 8 bits in a byte. In the article (which you can see here )it said that "With 8 bits in a byte, you can represent 256 values ranging from 0 to 255."

thats where I get lost....
 
Those 8 bits are broken down like this,

1 2 4 8 16 32 64 128

So you use a 1 to represent that number, like 0 would be 00000000, 16 would be 00001000 and so forth. If you add them all together, the max number is 255.
 
ah I see, that makes alot more sense now.

sorta....

learning a new number system is kind of confusing. I'll get it eventually. Man do I feel stupid. lol
 
Chog is backwards though, it is:

128 64 32 16 8 4 2 1

Binary is based on the number 2, the digit that is furthest to the right is 2 ^ 0, or 1. To the left of that is 2 ^ 1, to the the left of that is 2 ^ 2 and so on.
 
Its easier just to say that, since we start at 0 and not 1, that a number represented by 8 bits can represent numbers up to 2^8th - 1.

In general, any number with N bits can hold numbers as large as 2^N - 1.
 
Status
Not open for further replies.
Back
Top Bottom