Octal to Binary Conversion in dld digital logic design

Download This Tutorial in PDF

Octal to Binary Conversion

C++ program to convert an octal number into binary

  • Each digit of the Octal number is replaced by an equivalent binary string of 3-bits.

Example 1:

Problem:

How to convert this 5265666 number into its Binary equivalent?

Solution:

Step 1: Separate each of the Octal number

  • 5        2          6           5         6          6           6

Step 2: 

Replace  each octal number with a number by its Octal equivalent.

  •   5        2          6           5         6          6           6
  •   101        010           110            101          110           110            110

See the table below to understand that how these octal numbers are converted into binary number.

Note: Binary strings which can not be divided into equal number of 3- bit groups are supposed to have 0’s  in the left of the bits.

Example 2:

 

Problem:

How to convert this 3265646 number into its Binary equivalent?

Solution:

Step 1: Separate each of the Octal number

  • 3        2          6           5         6          4           6

Step 2: 

Replace  each octal number with a number by its Octal equivalent.

  •   3        2          6           5         6          4           6
  •   011        010           110            101          110           100            110

See the table below to understand that how these octal numbers are converted into binary number.

DecimalBinaryOctal
00000
10011
20102
30113
41004
51015
61106
71117

 

Subscribe for Friendship

Latest posts by Prof. Fazal Rehman Shamil (see all)

Buy advertisement space on T4Tutorials

For more details email [email protected]