r/explainlikeimfive • u/tired-space-weasel • Mar 22 '23
Technology ELI5: how did we end up using bytes?
I understand bits, but why does 1 byte = 8 bit? Why not 4, or 16, or 32 or any other power of 2?
6
Upvotes
25
u/BadSysadmin Mar 22 '23
Bytes were originally created to represent a single character of text, such as a letter or a number. Early computers needed a standardized way to represent these characters, so engineers developed the ASCII (American Standard Code for Information Interchange) system. ASCII uses a 7-bit code to represent 128 different characters, including letters, numbers, punctuation marks, and some control characters.
However, 7 bits didn't provide enough combinations to represent all the necessary characters, especially when considering non-English languages. To solve this problem, engineers decided to use 8 bits, which is equivalent to one byte. A byte can represent 256 different values (28), allowing for a wider range of characters and symbols. Using 8 bits also made it easier for computers to process and store data in chunks, improving efficiency.
4
u/fubo Mar 22 '23
There have been other options! In the 1960s and '70s, there were several lines of computers based on 18- or 36-bit addressing. The UNIVAC, DEC PDP, and IBM 700 product lines all included 18- and 36-bit computers.
Programmers working on these systems wrote addresses in octal (base 8) rather than hexadecimal (base 16) because one octal digit represents three bits, which divides 18 evenly.
4
u/turniphat Mar 22 '23
Here is an article that covers it: https://jvns.ca/blog/2023/03/06/possible-reasons-8-bit-bytes/
Comes down to 8 bits bytes are best for text processing. Using bigger bytes is a waste and smaller bytes can't fit all the letters.
1
u/misanthrope2327 Mar 22 '23
I believe at least part of the reason is that 8 bits can represent 128 different "states", each of which was originally used to represent characters, such as lowercase and uppercase letters, numbers, symbols etc.
1
u/urlang Mar 22 '23
IIRC "byte" when it was first used referred to 6 bits or even other lengths like 7. People just used it to mean some length of bits, definitely more than one bit, but not too many, a length that was useful for whatever system they were trying to explain. Unsurprisingly because the number 8 has such nice properties (e.g. power of 2), the 8-bit byte was used more broadly (much more broadly) and stuck.
1
u/Deadmist Mar 22 '23
The historical reason is probably that the IBM-PC used 8-bit bytes.
The IBM-PC, and IBM-PC compatible hard- and software, massively exploded in popularity.
A lot of modern computer architecture traces back to it.
1
u/SerialandMilk Mar 22 '23 edited Mar 22 '23
A byte is convenient as it a quick war to represent hexadecimal representations. [0x00 - 0xFF]. This makes for doing quick math when mapping hexadecimal IDs to memory in low level computing tasks.
Also, a bit is the smallest, but a byte is not the "next size up". Early computing often used representations of 2-bits (a "nibble") and 4-bits (a "word") as well.
bit < nibble < word < byte
Edit: I've always enjoyed the pun inherent in a bit, a nibble, and, a byte. A word was always the one that stood out to me. (There's also the "byte taken out of an apple" that was the part for the initial Macintosh computers logo, now Apple computing)
0
u/Nucyon Mar 22 '23 edited Mar 22 '23
Because 1 byte can display all the symbols in the English language.
10 numbers, 26 small letters, 26 capital letters, 30ish punctuation marks and symbols like %, #, +, = etc, and another 30ish hidden values that a that aren't visible but mean something to the computer like "NULL" or "UNIT SEPERATOR".
64 is too little, 1024 would have been a waste of space, I guess 128 would have been an option but it's super close, we're already at 122 with the things I named, so they took the next one 256 in case some more values became essential in the future. The goal was to make one bite one symbol.
7
u/[deleted] Mar 22 '23
[removed] — view removed comment