🔒 Locked
bits in a byte
Advertisement
Original Post
Ok, now I''m curious. I got into an argument with somebody about the number of bits in a byte.
He maintained that there were always 8 bits in a byte, no matter what. I said I thought it depended on the operating system; doesn''t DOS do 8 bits to a byte, and Windows 32? (I don''t know about any of the others).
So help me if I''m wrong and he was right, I''ll do 75 years penance and be a more ''umble person thereafter, but how exactly does that work anyway?
One of the side notes we had was that with 8 bits to the byte, wouldn''t there be more bytes on the HD and therefore more storage space? I had no idea how to go into that one...
Twilight Dragon
Right now there are no replies, but I''m sure when I hit Reply down there I''m going to see 10 different replies. But who cares.
Different OS''s all have the same number of bits (though I hear some really wacko ones that ordinary people never come across that run on totally different platforms than what ordinary poeple will never come across) in a byte: 8. But different OS''s have different number of bytes in an integer, to make it simple. DOS has 2 bytes in an integer (therefore, 16-bit!) and Windows has 4 bytes (32-bit!).
Different OS''s all have the same number of bits (though I hear some really wacko ones that ordinary people never come across that run on totally different platforms than what ordinary poeple will never come across) in a byte: 8. But different OS''s have different number of bytes in an integer, to make it simple. DOS has 2 bytes in an integer (therefore, 16-bit!) and Windows has 4 bytes (32-bit!).
No, you were right, and these guys are wrong.
Some 36 bit machines have 9 bit bytes.
Some really old machines had 4 or 6 bits in a byte.
It does _not_ depend on the operating system, though. It depends on the type of CPU.
Some 36 bit machines have 9 bit bytes.
Some really old machines had 4 or 6 bits in a byte.
It does _not_ depend on the operating system, though. It depends on the type of CPU.
quote:
Original post by TDragon
He maintained that there were always 8 bits in a byte, no matter what.
He''s wrong.
quote:
I said I thought it depended on the operating system
It depends on the hardware. A byte is the smallest addressable unit of machine storage. Since that is commonly 8 bits, many folks are given the illusion that a byte is always 8 bits. It ain''t so. For a historical perspective, read this.
Take for instance the SHARC processor. Its a CPU specifically for DSP tasks. Our embedded platform uses two of them.
Any case, this CPU''s byte == 32 bits ! What a pain!
Any case, this CPU''s byte == 32 bits ! What a pain!
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement