Theme images by Storman. Powered by Blogger.

Blog Archive

Recent in Sports

Home Ads



Random Posts

Friday, 26 October 2018

Octal Number System and Conversion

Octal Number System: 

In the octal number system, the base or radix is 8 and we have digits from 0 to 7 as its basic elements. For example, 127 is a valid octal number. But 128 is an invalid number in the octal system.

Conversion of a Decimal Number into Its Equivalent Octal Number

Example 7: Convert decimal number 83 into its equivalent octal number.

Solution: We prepare the decimal-octal conversion table as illustrated in Table 1.6, based on the discussions in Section 1.4.2.
From Table 1.6, we get
                                                                     (83)10 = (123)8
Conversion of Octal Number into Equivalent Binary Number

To convert an octal number into binary, we first convert it into its equivalent decimal number, which is then converted into its equivalent binary number. This procedure is illustrated using Example 8.

Example 8: Consider the octal number (123)8. Its decimal equivalent number was obtained in Example 6 as (83)10. We can convert (83)10 into binary as described in Section 1.4.2. However, we can perform the conversion using yet another simpler method. In this process, we divide 83 as the sum of the set of decimal numbers, which are powers of 2. For example, we have seen that 20 = 1, 21 = 2, 23 = 8, and so on. Using this principle, we now decimate 83 into powers of 2 as follows:                                                                        

                                 83 = 64 + 16 + 2 + 1

Now, it is very easy to convert this decimated numbers into equivalent binary. Thus

           (83)10 = 1 ´ 26 + 1 ´ 24 + 1´21 +1´20 = (1010011)2

The above procedure is lengthy and time consuming. There is an easy and faster method to convert octal numbers into binary numbers. For this, first we prepare the octal-binary conversion table, Table 1.7 as shown below. The octal number is then entered in the topmost cells of table. Then its 3-bit binary equivalents are written into the cells in the second row of the table. Finally, we remove the barriers in the table cells and write the combined bits in the third row of Table 1.7, as shown, which gives the desired answer. Commas are used in the last row to identify binary groups.

Given octal number

Binary equivalents


(001 010 011)2

From Table 1.7, we get the desired answer as

   (123)8 = (001010011)2 = (1010011)2

From Example 8, we find that it is very easy to convert octal number to binary.  Similarly, the reverse process also is very fast. For this, we divide the binary numbers into groups of 3 bits each, starting from the right-most bit and then write the corresponding decimal number below these groups.  The final answer will be the octal equivalent of the binary.

Example 9: Find the octal equivalent of (11110100010)2.

Solution: Proceeding as described above, we first prepare the binary-to-octal conversion table, designated as Table 1.8. To draw the columns of this table, we first count the number of bits in the given binary number and then divide it by 3. In the given problem, we have 11 bits. This means that there are three groups of 3 bits each. The remaining two bits form the fourth group. It may be noticed that the grouping process starts from the rightmost three bits, and continue in the left direction. We may separate the groups by using commas as given below:

                                                            11, 110, 100,010

After having decided the groups and its member bits, we draw Table 1.8 and make entries in it as shown. We first enter the given binary number in the first row of Table 1.8. In the second row, we make entries of the groups in their respective cells. It may be noticed that the first cell in this row contains only two bits. To make it into a 3-bit group, we add a 0 (shown in bold font) as its starting bit, so that the given binary number now reads as  011, 110, 100,010. It is clear that this 0 has no significance; it is only added as a padding bit to form a 3-bit group.

After completing the entries in second row of Table 1.8, we proceed to make entries in the cells of the third row. In the cells of this row, we write the decimal equivalent number below each 3-bit group of row two. Thus, below the rightmost group of 010, we enter in row three its decimal equivalent number 2. Continuing this operation, we enter 4 below the group of 100, 6 below 110, and 3 below 011, as shown. In the fourth row of Table 1.2, we combine the digits of row 3 to yield the octal number 3642 as the equivalent of the binary number 11110100010.

It may be noted that the explanation given above is quite lengthy; however, its implementation can be seen to be very fast because there is no need for any lengthy explanations in drawing Table 1.8. Once the principles are clear, drawing Table 1.8 is easy.

                                                        Table 1.8 Binary-Octal conversion
Given binary number separated into 3-bit groups
Bits in groups
Corresponding octal numbers
Octal equivalent of the given binary number

From Table 1.8, we get the desired answer as

(11110100010)2 = (3642)8

Example 10: Find the binary equivalent of the octal number (4321)8.

Solution: Table 1.2 shows the desired octal-binary conversion table. From table 1.2, we get the desired answer as:

(4321)8 = (100011010001)2

Table 1.2 Octal-Binary conversion table

Octal number
Cell binary
Binary equivalent of given octal number
100 011 010 001

0 on: "Octal Number System and Conversion"