mortonnex
V2EX  ›  问与答

为什么 1B = 8b?

  •  
  •   mortonnex · Nov 8, 2018 · 4046 views
    This topic created in 2921 days ago, the information mentioned may be changed or developed.
    为什么 byte 和 bit 对倍数关系是 8?
    Supplement 1  ·  Nov 8, 2018
    " Many types of applications use information representable in eight or fewer bits and processor designers optimize for this common usage. The popularity of major commercial computing architectures has aided in the ubiquitous acceptance of the eight-bit size.[8] Modern architectures typically use 32- or 64-bit words, built of four or eight bytes."
    15 replies  •  2018-11-08 14:00:12 +08:00
    alect
    alect
    Nov 8, 2018
    1
    mm163
    mm163
    Nov 8, 2018
    2
    为什么 9999 是四位数?
    013231
    013231
    Nov 8, 2018❤️3
    3
    lululau
    lululau
    Nov 8, 2018
    4
    3L 正解
    szq8014
    szq8014
    Nov 8, 2018
    5
    就像英文有 26 个字母一样吧…………哎?
    你去看看 ASCII 表,8 位是能满足表示 26 个字母的前提下最 2^n 最小的了,还多出来一些可以设定成其他符号。
    还可能跟早期电脑 CPU 就是 8 位 16 位的有关。
    // 嗯。。我不对自己说的话负责。。
    mortonnex
    mortonnex
    OP
    Nov 8, 2018
    6
    @013231
    @lululau
    @szq8014

    " Many types of applications use information representable in eight or fewer bits and processor designers optimize for this common usage. The popularity of major commercial computing architectures has aided in the ubiquitous acceptance of the eight-bit size.[8] Modern architectures typically use 32- or 64-bit words, built of four or eight bytes."

    学习了!
    imn1
    imn1
    Nov 8, 2018
    7
    其实没搞清 LZ 想问什么
    auin
    auin
    Nov 8, 2018
    8
    说到底还是历史原因,1B=8b 是最好的选择,既够用又不浪费。
    GeruzoniAnsasu
    GeruzoniAnsasu
    Nov 8, 2018
    9
    https://blog.trailofbits.com/2017/07/30/an-extra-bit-of-analysis-for-clemency/

    不仅 8bit 只是约定俗成,大小端对齐也是约定俗称,你看 defcon2017 不就出了个 9bit 字节,3byte 中端对齐的题,说明这样的架构也是完全可行的,只是历史没有这样发展而已
    Akiyu
    Akiyu
    Nov 8, 2018
    10
    楼上已经总结的很清楚了, 可以不是 8bit
    现在是 8bit 是因为大家已经约定成俗了, 还有一部分历史原因

    比如最开始的键盘, 包括现在的键盘, 是不适合人体的
    当意识到人体工学键盘更适合人体时, 推广人体工学键盘已经来不及了
    因为大多数人已经习惯了普通的键盘
    feather12315
    feather12315
    Nov 8, 2018 via Android
    11
    字拓展和位拓展了解一下。
    af463419014
    af463419014
    Nov 8, 2018
    12
    可能因为 8 是整数吧
    yksoft1
    yksoft1
    Nov 8, 2018
    13
    MIME、Base64、EUC-JP 之类编码为何会存在,就是因为电子邮件标准里面一个字节就是 7 位。
    yksoft1
    yksoft1
    Nov 8, 2018
    14
    是 ISO-2022-JP..
    liwufan
    liwufan
    Nov 8, 2018
    15
    因为 IBM
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   990 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 63ms · UTC 17:22 · PVG 01:22 · LAX 09:22 · JFK 12:22
    ♥ Do have faith in what you're doing.