answersLogoWhite

0


Best Answer

Why do we use Octal?

Octal comes into a close second. In octal, you can represent, at most, 3 bits with a single octal digit. So it's very easy to say 311 is 11 001 001. The problem with octal, as you can see, is that the 3rd octal digit can only goes as high as 3, so it does not represent a byte as cleanly as hex. Octal is used in Unix for permissions due to its 3-bit nature. If we take the three specific entitlements (read, write, execute) for a file, we find that it coincides very well with octal. That's why you see those really funky "chmod 744" commands, because they are octal representation of permissions, 111 100 100, or R-W-E, Read, Read for owner, group, world respectively (at least that is how it was explained to me). The leftmost bit represents the read flag, the middle one represents the write flag, and the rightmost flag represents execute. So if you wanted the permission for read-write, it would be 110, or 6. Read and execute would be 101 or 5.

Additional Answer:

Since Octal (base-8) and Hexadecimal (base-16) are powers of two, that means they map directly to binary. For instance, each character in a base-16 number corresponds to 4 bits. So if I have a 4-byte (32-bit) number in hex, I could write out the binary sequence without really thinking about it. Also, one digit could change, and it would only change those corresponding 4 bits. In decimal, changing one digit can change many or all of the bits. This is why it is easier for programmers to use Hex, because it is a direct representation of the binary sequence.

I believe we adopted the decimal system because we have 10 fingers. In actuality, hexadecimal would be a much better system for everyone to use. Society as a whole would be more mathematically inclined if they began learning hex when they were children, and we just did away with decimal altogether. Hexadecimal is much more natural than decimal.

Octal and hexadecimal numeration systems would be pointless if not for their ability to be easily converted to and from binary notation. Their primary purpose in being is to serve as a "shorthand" method of denoting a number represented electronically in binary form. Because the bases of octal (eight) and hexadecimal (sixteen) are even multiples of binary's base (two), binary bits can be grouped together and directly converted to or from their respective octal or hexadecimal digits. With octal, the binary bits are grouped in three's (because 23 = 8), and with hexadecimal, the binary bits are grouped in four's (because 24 = 16).

Incidentally, hexadecimal notation is more popular, because binary bit groupings in digital equipment are commonly multiples of eight (8, 16, 32, 64, and 128 bit), which are also multiples of 4. Octal, being based on binary bit groups of 3, doesn't work out evenly with those common bit group sizing's.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the importance of an octal number?
Write your answer...
Submit
Still have questions?
magnify glass
imp