Is a byte always 8 bits?

后端 未结 3 725
终归单人心
终归单人心 2020-12-03 03:18

I\'m working through The Elements of Computing Systems when I read the following excerpt:

The Hack computer includes a black-and-white screen organize

相关标签:
3条回答
  • 2020-12-03 03:37

    In modern terms there are always 8 bits to a byte. This has been since 1993 IIRC. ISO/IEC 2382-1:1993.

    There have however also been systems with other bit counts to a byte 6 bits/7bits have been common. There are however other more obscure ones.

    At the end of the day I think it would be rare to find a machine today that was not based on 8 bits to a byte.

    0 讨论(0)
  • 2020-12-03 03:39

    Except perhaps for a brief period after its coinage, a byte has always been eight bits.

    The phrase 'one kilobyte' got popularized as 'one kilo by eight', in the sense that you would have a kilo-word (1024 addressable pieces) of memory that was eight bits 'wide', in that each addressable piece was eight bits.

    The word was not always eight bits, but when it was not, it was never referred to as 'by eight', it was 'by four' or 'by sixteen', or in the egregious example of some Burroughs bookkeeping machines 'by one-hundred-twenty-eight'. At the other extreme, Honeywell machines originally were organized so that every individual bit in storage had a unique address, so they would have so-many 'kilo by one' memory packages.

    In the case of the machine you are talking about it would have "8 kilo by 16" memory, thus an 8K memory map, specifically 8Kx16, where there are only 8192 addresses, and each is 16 bits wide.

    It was cheapest, given ASCII and EBCDIC, to have eight-bit address boundaries, for efficient text processing, even when your machine's registers were wider. Machines with narrower registers simply went extinct.

    So, yes a byte IS always eight bits, and almost always has been.

    0 讨论(0)
  • 2020-12-03 03:46

    Yes, a byte is always 8 bits in modern computing.

    The book uses Words, not bytes

    In the book, the word and the size of the word is explicitly mentioned, while there is not a word (haha) about bytes. Look at the phrase ..is represented in RAM by 32 consecutive 16-bit words.. The whole size is expressed in (16 bit) words rather than bytes.

    Therefore, 8K refers to 8 Kilowords. 8 kilobytes would formally be written as 8KB, if that notation is used at all in this book.

    Words are quite important when it comes to processor architecture. Words in programming languages are usually 2 bytes (or 16 bits), but in processor architecture they can be 8 or 32 bits as well, and they refer to the natural size of the data units with which a processor works, so it makes sense that the book uses words rather than bytes, since the text seems very hardware oriented.

    To see how bytes and words are related, please read this answer.

    Different byte sizes

    Wikipedia describes how a byte was originally (1960s) based on the size of information it needed to hold, so a 6 bit byte could be used for (English) characters, while bytes of other sizes would be used for different number formats. It started out as 6 bits for English characters, grew to 7 bits to support ASCII, and eventually the popularity of the 8 bit IBM System/360 caused the global acceptance of 8 bit bytes.

    A byte is a software unit representing an amount of data, while a word is more tied to the processor/memory architecture and represents work units (registers) in the processor and the addressable units in memory. Nowadays though, a byte is always considered to be 8 bits, and words are a multiple of that. There are still processors around that have a different word size, but those are special purpose processors. Normal hardware, from PCs to phones and game consoles follows the standard.

    0 讨论(0)
提交回复
热议问题