Page 1 of 1

Why aren't bits, bytes, etc... base 10?

Posted: 21 Dec 2008, 00:20
by Relative
Why aren't units of information base 10?

eg: 10 bit = 1 byte instead of 8 bit = 1 byte

Re: Why aren't bits, bytes, etc... base 10?

Posted: 21 Dec 2008, 00:33
by lurker
(Bytes technically don't have to be 8, but that's irrelevant) The reason is very simple. Lengths that are powers of 2 make things MUCH simpler internally.

Re: Why aren't bits, bytes, etc... base 10?

Posted: 21 Dec 2008, 00:36
by Argh
Because binary switches have only 2 states, on or off. So, everything is a power of two, in computer-land, to keep things rational.

So... why is a byte 8 bits? It's 2^3. A nibble is 2^2. Kilobytes are 2^10. Get it?

Re: Why aren't bits, bytes, etc... base 10?

Posted: 21 Dec 2008, 00:48
by lurker
To more specifically answer the question of 'why 8', it's because it's the smallest that can hold a single character. And I think argh just wants to draw attention to kilo being 2^10 in compuland, but to be clear kilobyte is 2^10 bytes.

Re: Why aren't bits, bytes, etc... base 10?

Posted: 21 Dec 2008, 00:54
by Peet
(and the 'correct' representation is KiB, pronounced 'kibibite', referring to 2^10 rather than the 10^3 of the metric K)

Re: Why aren't bits, bytes, etc... base 10?

Posted: 21 Dec 2008, 01:15
by REVENGE
Fuck switches.

(I kid, I kid.)

Re: Why aren't bits, bytes, etc... base 10?

Posted: 21 Dec 2008, 11:46
by Teutooni
...or rather, why aren't numbers normally base 8 or 16 instead of 10. :-)

Re: Why aren't bits, bytes, etc... base 10?

Posted: 21 Dec 2008, 11:51
by Pressure Line
fingers and thumbs on a pair of human hands ;)

Re: Why aren't bits, bytes, etc... base 10?

Posted: 21 Dec 2008, 18:31
by SinbadEV
Pressure Line wrote:fingers and thumbs on a pair of human hands ;)
Hence the work "Digits" having the duel meaning of "Fingers on a 10 Fingered Hand" and "Numerals in a base ten Number System"

Re: Why aren't bits, bytes, etc... base 10?

Posted: 21 Dec 2008, 21:04
by smoth
tonight...base 2

Re: Why aren't bits, bytes, etc... base 10?

Posted: 21 Dec 2008, 22:17
by Panda
Teutooni wrote:...or rather, why aren't numbers normally base 8 or 16 instead of 10. :-)
Because people only like to use base 16 numerical systems for things like digital computing where hexadecimal is used. :lol: So,

do
{
cout << Base10Numerals;
}
while (cin >> Base10Numerals);


:P Else, you could try to use a vigesimal (more traditional, base 20) numeric system and there's no C base.

Re: Why aren't bits, bytes, etc... base 10?

Posted: 22 Dec 2008, 01:26
by jcnossen
Why aren't units of information base 10?

eg: 10 bit = 1 byte instead of 8 bit = 1 byte
The question is inconsistent. 1 byte being 10 bits, would still make it base 2. The base 2 is a property of bits having 2 states, it has nothing to do with the size of a byte.

Re: Why aren't bits, bytes, etc... base 10?

Posted: 22 Dec 2008, 02:06
by Tobi
Indeed, and the size of a byte is rather arbitrary and depends on context.

For example in old serial lines a byte can be 9 bits, 8 data and 1 parity. Similarly, basic ASCII is only 7-bit.

According to Wikipedia the size of a byte is usually in the range from 5 to 12 bits :-)

Also in more specific context it can be a lot bigger. This says in certain C++ implementation a byte is 64 bits even.

And from same site in particular the PDP-10 seemed to have weird sizes, with 36 bit bytes :shock: