Why does each location in memory contain 8 bits? [closed]
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this questionSomebody has confirmed there are 8 bits in every location/address in memory.
Can I know why? is it related to the memory chip architecture? Or is it because of 32bit CPU. Is this 8 bits true for another OS such as FreeBSD, Mac, Linux? Is there any relation the amount of bits in every location to the count of address line in memory?
Is there any other architecture that has different amount of bits per address?
As is often the case, Wikipedia has an answer:
Architectures that did not have eight-bit bytes include the CDC 6000 series scientific mainframes that divided their 60-bit floating-point words into 10 six-bit bytes. These bytes conveniently held character data from punched Hollerith cards, typically the upper-case alphabet and decimal digits. CDC also often referred to 12-bit quantities as bytes, each holding two 6-bit display code characters, due to the 12-bit I/O architecture of the machine. The PDP-10 used assembly instructions LDB and DPB to load and deposit bytes of any width from 1 to 36-bits—these operations survive today in Common Lisp. Bytes of six, seven, or nine bits were used on some computers, for example within the 36-bit word of the PDP-10. The UNIVAC 1100/2200 series computers (now Unisys) addressed in both 6-bit (Fieldata) and nine-bit (ASCII) modes within its 36-bit word. Telex machines used 5 bits to encode a character.
Factors behind the ubiquity of the eight bit byte include the popularity of the IBM System/360 architecture, introduced in the 1960s, and the 8-bit microprocessors, introduced in the 1970s. The term octet unambiguously specifies an eight-bit byte (such as in protocol definitions, for example).
It's a hardware architecture, not OS, thing. All architectures that you're going to run into, day to day, use eight bits per byte. There may be modern exceptions, particularly in the extremes (mainframe, super, embedded), but I'm not aware of any.
A memory address is the location of a specific byte in memory.
A byte has 8 bits.
In a way it's totally arbitrary - but 8 bits is convenient.
It holds 256 values so it's large enough to store all the upper and lower case letters, numbers and symbols plus it's divisible by 2, and 4 which is handy for a few things.
Some DSP architectures use 16-bit addressable units. On many PIC microcontrollers, code memory is accessed in multiples of the instruction size (12 or 14 bits). I think it's useful to have a data size which is a power of two, and which can efficiently store character data. Using 16 bits to hold characters would historically have been considered wasteful (IMHO, in many cases, it still is), and 4 bits is too small a chunk size to be useful.
精彩评论