Question

I'm a college programming student with two years of programming experience in Java and Python. We've talked about number systems in classes including Binary, Octal, and Hexidecimal. I understand why Binary and Hexidecimal are important in Computing but I don't see any benefits to using Octal numbers. What would be some examples of Octal number use in programming?

Was it helpful?

Solution

Many early computers had 36 bit architectures (http://en.m.wikipedia.org/wiki/36-bit) and octal makes a lot more sense for them, as 3 divides into 36 very nicely (12 has a lot of factors). Four also divides but its an odd number.

OTHER TIPS

The reason why we use octal is in many ways the same as hexadecimal: we need a human readable format to quickly Identify bit strings. Just like the bit pattern of large binary data can (relatively) easily be described/specified and understood using hexadecimal, where each digit represents the exact binary pattern of for bits, where ever you would want to easily understand the bit string in groups of 3 you would use octal

the best example will be the unix file permissions: the read write and execute permissions for the owner,group, and 'other' users fall logically into 3 groups of 3 bits (rwxrwxrwx) it is most convenient to describe these logical blocks using octal. eg: rw-r--r-- will be 110100100 or 644

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top