Showing posts with label Conversion between Octal numbers and decimal numbers. Show all posts
Showing posts with label Conversion between Octal numbers and decimal numbers. Show all posts

Octal Numbers to Decimal Numbers Solved Examples

Octal Numbers to Decimal Numbers Conversion and Decimal Numbers to Octal Numbers Conversion
Before beginning to this topic if you want to learn some basic information about number system you can read it from number system detailed explanation. Again I tried to make this topic easy to understand.

Key Questions:
  • Convert from octal number system to decimal number system
  • Convert from decimal number system to octal number system
  • How to convert decimal fraction into octal fraction
  • How to convert octal fraction into decimal fraction

Decimal to Octal Conversion:
The method of converting decimal number to octal number is same as decimal to binary numbers conversion. The difference is that when converting from decimal to binary we use repeated division by 2. But when converting from decimal to octal we use repeated division by 8. For mantissa calculation we use repeated multiplication by 2 when converting a decimal fraction into binary fraction. The method is explained in decimal to binary conversion. Similarly when working with octal numbers we use repeated multiplication by 8 for mantissa calculation.

Example#01:1899)10=?)8
Repeated division by 8
1899/8 = 237       remainder 3
237/8  = 29          remainder 5
29/8 = 3              remainder 5
Answer 1899)10= 3553)8


Example#02:9876.87)10=?)8
First solve integer part by Repeated division by 8
9876/8 = 1234     remainder 4
1234/8  = 154      remainder 2
154/8 = 19           remainder 2
19/2 = 2               remainder 3
9876)10=23224)8

For mantissa calculation use repeated multiplication by 8 method

0.87*8=6.96 (Most significant digit)
0.96*8=7.68
0.68*8=5.44
0.44*8=3.52 (least significant digit)
Answer  9876.87)10= 23224.6752)8


Example#03: 9248.356)10 = ?)8
Repeated division by 8
9248/8 = 1156    remainder 0
1156/8  = 144      remainder 4
144/8 = 18           remainder 0
18/2 = 2               remainder 2

9248)10=22040)8

For mantissa calculation use repeated multiplication by 8.

0.356*8=2.848 (most significant digit)
0.848*8=6.784
0.784*8=6.272 (least significant digit)
0.356)10=0.266)8
Answer: 9248.356)10 = 22040.266)8

Octal to Decimal Conversation:
When we are converting a number from octal number system to decimal number system we use sum of weights method. The method is same as binary to decimal conversion but the difference is base. For binary numbers system we multiply each digit by power of base 2. That is 2n. You can learn binary to decimal conversion here. Similarly when working on octal number system we use power of base 8. That is 8n. At this point I would like to add a table for calculated values of sum of weights. So it's easy to add a table for quick reference.

84
83
82
81
80
8-1
8-2
8-3
8-4
4096
512
64
8
1
0.125
0.015625
0.001953125
0.000244140625


Example#01:3553)8=?)10
5554)8=(3*83)+(5*82)+(5*81)+(3*80)
          =(5*512)+(5*64)+(5*8)+(3*1)
          =1536+320+40+3
          =1899)10
Answer:  3553)8=1899)10


Example#02: 23224.6752)8=?)10
23224.6752)8=(2*84)+(3*83)+(2*82)+(2*81)+(4*80).(6*8-1)+(7*8-2)+(5*8-3)+(2*8-4)
                      =(2*4096)+(3*512)+(2*64)+(2*8)(4*1).(6*0.125)+(7*0.015625).....Neglect small fractions
                     =8192+1536+128+16+4.0.75+0.109375
                     =9876.86)10
Answer:  23224.6752)8=9876.86)10


Example#03: 22040.266)8 =?)10

22040.266)8=(2*84)+(2*83)+(0*82)+(4*81)+(0*80)+(2*8-1)+(6*8-2)+(6*8-3)
                  =(2*4096)+(2*512)+(0*64)+(4*8)+(0*1).(2*0.125)+(6*0.015625)+(6*0.001953125)
                 =8191+1024+0+32+0.+0.25+0.09375+ 0.012
                =9248.36)10
Answer:  22040.266)8=9248.36)10

Popular Posts