Octal

Octal

Octal, also known as “base-8,” is a number system that uses eight digits (0 – 7) to represent any integer. Octal values are sometimes used to represent data in computer science since bytes contain eight bits. For example, the octal value “10” can represent 8 bits or 1 byte. “20” represents 2 bytes, 30 represents 3, etc. Octal values are also easily translatable from binary, which uses two digits, and hexadecimal, which uses 16 digits.
To convert an octal value to a standard decimal or “denary” value, multiply each digit by 8n, where n is the place of the digit, starting with 0, from right to left. Then add the results together. So 123 in octal can be converted to a decimal value as follows:
80 x 3 + 81 x 2 + 82 x 1 = 3 + 16 + 64 = 83
The table below shows several equal values in octal, decimal, hexadecimal, and binary:

OctalDecimalHexadecimalBinary
1111
10881000
504028101000
10064401000000
123466829C1010011100

Binary to Octal Conversion
To convert a binary value to an octal value, separate the digits into groups of three, starting from right to left. Then mulitply each 1 or 0 by 2n, where n is the place of each digit, from right to left, starting with 0. For example, to convert the binary value 1010011100 from the table above, first separate the digits as: 1 010 011 100. Then multiply the values as follows:

0x1 + 0x2 + 1×4 = 4
1×1 + 1×2 + 0x4 = 3
0x0 + 1×2 + 0x4 = 2
1×1 + 0x2 + 0x4 = 1

The resulting value is: oct 1234. Octal values may also be displayed with a subscript “8,” such as 12348. The bottom row of the table above can be written in subscript notation as:
10100111002 = 12348 = 66810 = 29C16

Updated March 12, 2021 by Per C.

APA
MLA
Chicago
HTML
Link

https://techterms.com/definition/octal

Copy