In what situations is octal base used?

后端 未结 9 1004
情话喂你
情话喂你 2020-12-01 17:35

I\'ve seen binary and hex used quite often but never octal. Yet octal has it\'s own convention for being used in some languages (ie, a leading 0 indicating octal base). When

9条回答
  •  -上瘾入骨i
    2020-12-01 18:17

    Octal is used when the number of bits in one word is a multiple of 3. Examples are ancient systems with 18bit word sizes, systems with 9bit bytes, or unix file permissions with 9bits or 12bits.

    If the number of bits in your word is a multiple of 4, however, please do use hex, by all means.

提交回复
热议问题