问题描述
为什么不是4位或16位?
Why not 4 bits, or 16 bits?
我假设一些与硬件相关的原因,我想知道8bit 1byte如何成为标准.
I assume some hardware-related reasons and I'd like to know how 8bit 1byte became the standard.
推荐答案
距离我从事计算机组织工作还不到一分钟,但是相关的维基提供了一些上下文.
I'ts been a minute since I took computer organization, but the relevant wiki on 'Byte' gives some context.
该字节最初是可容纳单个字符的最小位数(我假设为标准ASCII).我们仍然使用ASCII标准,因此每个字符8位仍然有意义.例如,这句话是41个字节.对于我们的目的而言,这很容易计算并且实用.
The byte was originally the smallest number of bits that could hold a single character (I assume standard ASCII). We still use ASCII standard, so 8 bits per character is still relevant. This sentence, for instance, is 41 bytes. That's easily countable and practical for our purposes.
如果我们只有4位,那么除非使用2个字节表示单个字符,否则将只有16(2 ^ 4)个可能的字符,这在计算上效率更低.如果字节中有16位,则指令集中将有更多的死空间",我们将允许65,536(2 ^ 16)个可能的字符,这将使计算机在执行字节级指令时运行效率降低,尤其是因为我们的字符集要小得多.
If we had only 4 bits, there would only be 16 (2^4) possible characters, unless we used 2 bytes to represent a single character, which is more inefficient computationally. If we had 16 bits in a byte, we would have a whole lot more 'dead space' in our instruction set, we would allow 65,536 (2^16) possible characters, which would make computers run less efficiently when performing byte-level instructions, especially since our character set is much smaller.
这篇关于为什么1字节等于8位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!