V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
mortonnex
V2EX  ›  问与答

为什么 1B = 8b?

  •  
  •   mortonnex · Nov 8, 2018 · 3633 views
    This topic created in 2739 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
        1
    alect  
       Nov 8, 2018
    mm163
        2
    mm163  
       Nov 8, 2018
    为什么 9999 是四位数?
    013231
        3
    013231  
       Nov 8, 2018   ❤️ 3
    lululau
        4
    lululau  
       Nov 8, 2018
    3L 正解
    szq8014
        5
    szq8014  
       Nov 8, 2018
    就像英文有 26 个字母一样吧…………哎?
    你去看看 ASCII 表,8 位是能满足表示 26 个字母的前提下最 2^n 最小的了,还多出来一些可以设定成其他符号。
    还可能跟早期电脑 CPU 就是 8 位 16 位的有关。
    // 嗯。。我不对自己说的话负责。。
    mortonnex
        6
    mortonnex  
    OP
       Nov 8, 2018
    @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
        7
    imn1  
       Nov 8, 2018
    其实没搞清 LZ 想问什么
    auin
        8
    auin  
       Nov 8, 2018
    说到底还是历史原因,1B=8b 是最好的选择,既够用又不浪费。
    GeruzoniAnsasu
        9
    GeruzoniAnsasu  
       Nov 8, 2018
    https://blog.trailofbits.com/2017/07/30/an-extra-bit-of-analysis-for-clemency/

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

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