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

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

Post just about everything that isn't directly related to Spring here!

Moderator: Moderators

Post Reply
User avatar
Relative
Posts: 1371
Joined: 15 Oct 2006, 13:17

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

Post by Relative »

Why aren't units of information base 10?

eg: 10 bit = 1 byte instead of 8 bit = 1 byte
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

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

Post 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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

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

Post 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?
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

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

Post 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.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

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

Post by Peet »

(and the 'correct' representation is KiB, pronounced 'kibibite', referring to 2^10 rather than the 10^3 of the metric K)
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

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

Post by REVENGE »

Fuck switches.

(I kid, I kid.)
User avatar
Teutooni
Posts: 717
Joined: 01 Dec 2007, 17:21

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

Post by Teutooni »

...or rather, why aren't numbers normally base 8 or 16 instead of 10. :-)
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

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

Post by Pressure Line »

fingers and thumbs on a pair of human hands ;)
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

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

Post 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"
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

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

Post by smoth »

tonight...base 2
User avatar
Panda
Posts: 2042
Joined: 22 Jun 2006, 00:20

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

Post 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.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

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

Post 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.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

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

Post 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:
Post Reply

Return to “Off Topic Discussion”