1. Computing
Send to a Friend via Email




Octal refers to a numbering system that has a base of eight. This means it only uses the eight numerals 0,1,2,3,4,5,6,7 for each digit of a number. In a similar way that a language such as French represents the English word "number" as "nombre", octal represents the denary number of 122 as 172. It's just another system to represent the same value.

To show the progression of the octal numbering system, look at the octal values below as they are converted from denary numbers. Note that once it gets to eight the octal system uses two digits:

Denary=Octal;0=0;1=1;2=2;3=3;4=4;5=5;6=6;7=7;8=10;9=11;10=12; and so on.

The octal numbering system was adopted in computer systems because it was a compact way to represent bits. One octal digit can represent three binary digits i.e., one octal digit can represent eight different numbers (0-7), in binary the same is achieved using three bits (111).

Octal numbers are not widely used in computers anymore as they are inefficient at converting values into bytes (8 bits). A byte can represent 256 numbers (0-255). To represent 255 as an octal number, three digits are needed (377). However, this is a waste as three octal digits can represent 512 numbers (0-511); the third digit is not being used to it's full potential. When bytes became the common building block for computer systems the hexadecimal numbering system took over from octal. It can represent a byte perfectly using two hexadecimal digits.


In java, to represent an octal number as a literal use a leading zero.

e.g., The following will return the value of 122 for the octal number 172:

   int octalNumber = 0172;


# A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Related Video
Create Bullet, Number, and Definition Lists in HTML
iDVD New Project

©2014 About.com. All rights reserved.