在什么情况下使用八进制基数? [英] In what situations is octal base used?

查看:180
本文介绍了在什么情况下使用八进制基数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到二进制和十六进制经常使用,但从未使用过八进制.但是八进制在某些语言中有其自己的约定(即,以0开头的数字表示八进制基数).什么时候使用八进制?当人们使用八进制或八进制更容易推理时,有哪些典型情况?还是仅仅是口味问题?

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 is octal used? What are some typical situations when one would use octal or octal would be easier to reason about? Or is it merely a matter of taste?

推荐答案

Octal用作表示UNIX系统上文件权限的简写.例如,文件模式rwxr-xr-x将为0755.

Octal is used as a shorthand for representing file permissions on UNIX systems. For example, file mode rwxr-xr-x would be 0755.

这篇关于在什么情况下使用八进制基数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆