You are on page 1of 5

Just as the decimal system with its ten digits is a base-ten system,

the octal number system with its 8 digits, ‘0’, ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘6’
and ‘7’, is a base-eight system. Table 2-4 shows the weighting for
the octal number system up to 3 decimal places before and 2
decimal places after the octal point (.).

Weights 82 81 80 . 8-1 8-2

Table 2-4 Octal Weights

Just like the other counting conventions discussed previously, the


LSB is begins with zero (0) and is incremented until the maximum
digit value is reached. The adjacent bit positions are then filled
appropriately as the iterative counting process continues. Thus the
counting convention for octal is
0,1,2,3,4,5,7,10,11,12,13,14,15,16,17,20….

Conversion from Octal to Decimal

To express the value of a given octal number as its decimal


equivalent we just need to sum the digits after each has been
multiplied by its associated weight.
Example #1

Convert (237.04) 8 to decimal form.

Weights 82 81 80 8-1 8-2

Weight 64 8 1 0.125 0.015625


Value

Octal 2 3 7 0 4
Number

Decimal 128 24 7 0 0.0625 Total


Value (159.0625)10

Conversion from Decimal Whole


Numbers to Octal

To convert from Decimal whole numbers to Octal we may use the


systematic approach called the Repeated-Division-by-8 method
shown in the example below.

Converting (359) 10 to Octal

a. Divide the quotient by eight and record the


remainder.
b. Repeat step (a) until the quotient is equal to
zero (0).
c. The first remainder produced is the LSB in
the octal number and the last remainder (R) the
MSB. Accordingly, the octal number is then
written (from left to right) with the MSB occurring
first
8 359

8 44 R 7 (LSB)

8 5 R4

8 0 R 5 (MSB)

Therefore, (359) 10 = (547) 8

Converting Decimal Fractions to Octal


The techniques used to convert decimal fractions to octal are similar
to the methods demonstrated previously to convert decimal
fractions to binary numbers. We may either use the sum-of–weights
method or the repeated multiplication–by-8 method. In the
multiplication–by-8 method we repeatedly multiply the fraction by
eight, and record the carry, until the fraction product is zero. The
first carry produced is the MSB, while the last carry is the LSM.
Remember that the octal point precedes the MSB. To illustrate lets
consider the conversion of (0.3125) 10 to octal.

0.3125 * Carry
8

0.5 * 8 2 (MSB)

0.0 4 (LSB)

thus, (0.3125) 10 = (0.24) 8

Converting Octal to Binary


The primary application of octal numbers is representing binary
numbers, as it is easier to read large numbers in octal form that in
binary form. Because each octal digit can be represented by a
three-bit binary number (see Table 2-5), it is very easy to convert
from octal to binary. Simply replace each octal digit with the
appropriate three-bit binary number as indicated in the examples
below.

Octal Binary
Digit Digit

0 000

1 001

2 010

3 011

4 100

5 101

6 110

7 111

Example #1 Table 2-5 Octal and Binary Numbers

13 8 = (001011) 2
(37.12) 8 = (011111. 001010) 2

Converting Binary to Octal


Converting binary to octal is also a simple process. Break the binary
digits into groups of three starting from the binary point and
convert each group into its appropriate octal digit. For whole
numbers, it may be necessary to add a zero as the MSB in order to
complete a grouping of three bits. Note that this does not change
the value of the binary number. Similarly, when representing
fractions, it may be necessary to add a trailing zero in the LSB in
order to form a complete grouping of three.

Examples:

1. Converting (010111) 2 to Octal

111 = 7 (LSB)

010 = 2 (MSB)

thus, (010111) 2 = (27) 8

2. Converting (0.110101) 2 to Octal

110 = 6 (MSB)

111 = 5 (LSB)

thus, (0.110101) 2 = (0.65) 8

You might also like