Why is number of bits always(?) a power of two?

后端 未结 18 1664
天涯浪人
天涯浪人 2021-01-30 10:17

We have 8-bit, 16-bit, 32-bit and 64-bit hardware architectures and operating systems. But not, say, 42-bit or 69-bit ones.

Why? Is it something fundamental that makes 2

相关标签:
18条回答
  • 2021-01-30 11:04

    At one time, computer word lengths tended to be a multiple of 6 bits, because computers typically used 6-bit character sets, without support for lower-case letters.

    IBM made a high-performance computer, the STRETCH, for Los Alamos, which had a 64-bit word. It had the unusual feature that individual bits in the computer's memory could be directly addressed, which forced the word length to be a power of two. It also had a more extended character set, which allowed mathematical symbols (in addition to lower case) to be included; they were used in a special higher-level language named COLASL.

    When IBM came out with the very popular System/360 mainframe, even though it did not have bit addressing, it kept the eight-bit byte, primarily to allow efficient storage of packed decimal quantities at four bits to the decimal digit. Because that machine was so popular, it was very influential, and the PDP-11 computer from DEC was designed with a 16-bit word and 8-bit characters. The PDP-11 was also the first true little-endian machine, and it was also very popular and influential.

    But it isn't just because of following fashion. 8-bit characters allow lower-case text, and as computers became cheaper, being able to easily use them for word processing was valued. And just as the STRETCH needed to have a word that had a power of two size in bits to allow bits to be easily addressed, today's computers needed to have a word that was a power-of-two multiple of 8 (which happens to be two to the third power itself) to allow characters to be easily addressed.

    If we still used 6 bit characters, computers would tend to have 24, 48, or 96 bit words.

    0 讨论(0)
  • 2021-01-30 11:06

    Your memory system wants to be a byte multiple, which makes your cache want to be a byte multiple, which makes your whole system want to be a byte multiple.

    Speaking as a HW designer, you generally want to design CPU's to byte boundaries of some kind, ie multiples of 8. Otherwise you either have to add a lot of awkward circuitry to a 49-bit system to make it utilize the mod-8 bits, or you end up ignoring the extra bits, in which case it was a waste, unless you needed the extra bit for instructions, which is never the case on 16 bit or wider systems.

    0 讨论(0)
  • 2021-01-30 11:07

    The ICL 1900 were all 24 bit (words). Bet there's not a lot of people remember these. You do ??

    0 讨论(0)
  • 2021-01-30 11:09

    Another counter example: the PIC16C8X series microcontrollers have a 14 bit wide instruction set.

    0 讨论(0)
  • 2021-01-30 11:12

    The venerable PDP-10 was 36 bits.

    0 讨论(0)
  • 2021-01-30 11:12

    The 80186, 8086, 8088 and "Real Mode" on 80286 and later processors used a 20-bit segmented memory addressing system. The 80286 had 24 native address lines and then the 386 and later had either 32 or 64.

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