answersLogoWhite

0

All bases that are themselves a power of two (2, 4, 8, 16, 32, etc) are useful when notating binary values because the conversion is so trivial. Normally we use base-16 (hexadecimal) because we usually work with 4-bit nybbles (half-bytes). However, sometimes we want to work with 3-bit nybbles, such as when working with 9-bit bytes, or perhaps 21-bit words. For this we use base-8 (octal) notation because any 3-bit grouping can be represented by just one octal digit:

Octal = Binary

0 = 000

1 = 001

2 = 010

3 = 011

4 = 100

5 = 101

6 = 110

7 = 111

Octal notation varies from one programming language to another. Some append the letter 'o' while others might prefix a leading zero. So the 9-bit binary value 111100001 could be notated as 741o or 0741 depending on the language. By contrast, hexadecimal notation for the same value would be 0x1E1 or 1E1h.

You might ask why we don't just use hexadecimal notation for all binary values. We can certainly do that, but when we want to make it clear that we're specifically dealing with 3-bit groupings rather 4-bit groupings, it is best to use octal. In this case the hexadecimal notation implies a 12-bit value which could lead to confusion in our code. Whenever possible, we must strive to express our ideas directly in code.

User Avatar

Wiki User

9y ago

Still curious? Ask our experts.

Chat with our AI personalities

TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga
ProfessorProfessor
I will give you the most educated answer.
Chat with Professor
JudyJudy
Simplicity is my specialty.
Chat with Judy

Add your answer:

Earn +20 pts
Q: What is the Importance of octal number system in computing Environment?
Write your answer...
Submit
Still have questions?
magnify glass
imp