You are on page 1of 38

OCTAL NUMBER AND

ITS CONVERSION
ODEJAR, CHEENA M.
BSCPE-1A
LEARNING OBJECTIVES

At the end of this video lecture, students are expected to:


• Learn the history of Octal Number System.
• Identify the different number systems.
• Define what is an Octal Number.
• Know the conversions of the Octal Number System.
• Learn where Octal Number System is applied.
LEARNING DISCUSSION

• History of Octal Number System


• Review of Binary and Decimal Numbers
• Definition of Octal Number
• Conversions of Octal Number
• Application of Octal Number System
HISTORY OF OCTAL NUMBER SYSTEM
HISTORY OF OCTAL NUMBER SYSTEM

Emanuel Swedenborg
Can you develop a new
numeral system based on 64?

hmm..
I don’t think that’s a
good idea Sire.

Instead of 64, why not


based on 8, it’s more
easy to understand.
King Charles XII
of Sweden
Emanuel Swedendorg
Year 1716
1718
En ny rekenkonst som om vexlas
wid Thalet 8 i stelle then
wanliga wid Thalet 10

l, s, n, m, t, f, u(v), o

Emanuel Swedendorg

8=lo, 16=so, 24=no, and 64=loo.

Year 1718
REVIEW OF DECIMAL AND BINARY
NUMBERS
DECIMAL NUMBER SYSTEM
• The Base-10 Number System
• Has 10 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) Hence, base=10
• Each position of a digit represents a specific power of the base (10).
• The positions starting from the rightmost digit moving towards left
represent units, tens, hundreds, thousands, and so on, respectively.

EXAMPLE:
The decimal number 1457₁₀ can also be written as,
(1×103) + (4×102) + (5×101) + (7×100)
=(1×1000) + (4×100) + (5×10) + (7×1)
=1000 + 400 + 50 + 7
=1457
BINARY NUMBER SYSTEM
• The Base-2 Number System
• Has only 2 symbols or digits (0 and 1). Hence, base = 2.
• The maximum value of a single digit is 1 (one less than the value of
the base).
• Bit – stands for binary digit.
• It is denoted by a2, where a is a number with 0’s and 1’s.

EXAMPLE:
• 1111102
• 11111112
• 10110012
BINARY NUMBER SYSTEM
EXAMPLE:(Binary  Decimal)

10101₂ = (1 x 2⁴) + (0 x 2³) + (1 x 2²) + (0x2¹ )+ (1 x 2⁰)

= 16 + 0 + 4 + 0 + 1
= 21₁₀
EXAMPLE: (Decimal  Binary)
14₁₀ =

14₁₀ = 1110₂
OCTAL NUMBER SYSTEM
OCTAL NUMBER SYSTEM
• The Base-8 Number System
• Has 8 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7) Hence, its base=8
• To count above 7, begin another column and start over: 10, 11, 12, 13,
14, 15, 16, 17, 20, 21 and so on.
• Each position of a digit represents a specific power of the base (8).
• It is denoted by a8 where a is a number with digits 0 to 7

EXAMPLE:
248, 1098, 558, etc.

1248 = (1 × 82)+ (2 × 81)+ (4 × 80)


= 64 + 16 + 4
= 84₁₀
(octal  decimal)
OCTAL NUMBER SYSTEM
CONVERSIONS
OCTAL-TO-DECIMAL &
DECIMAL-TO-OCTAL
CONVERSIONS
OCTAL TO DECIMAL NUMBER

In octal number system, each digit position has the weight eight
regarding power eight shown in the figure below.
OCTAL TO DECIMAL NUMBER
To convert an octal number to decimal
number we need to multiply each digit of
the given octal with the reducing power
of 8. 

EXAMPLE 1.
Convert the octal number 23748 in decimal number.

Solution. 23748 = (2 x 8³) + (3 x 8²) + (7 x 8¹) + (4 x 8⁰)


= (2 x 512) + (3 x 64) + (7 x 8) + (4 x 1)
= 1276₁₀
OCTAL TO DECIMAL NUMBER
EXAMPLE 2.
Suppose 2158 is an octal number, then it’s decimal form will be,

Solution. 2158 = (2 x 8²) + (1 x 8¹) + (5 x 8⁰)


= (2 x 64) + (1 x 8) + (5 x 1)
= 141₁₀

EXAMPLE 3.
Let 125 an octal number denoted by 1258 , find the decimal number.

Solution. 1258 = (1 x 8²) + (2 x 8¹) + (5 x 8⁰)


= (1 x 64) + (2 x 8) + (5 x 1)
= 85₁₀
OCTAL TO DECIMAL NUMBER
EXAMPLE 4.
Consider the octal number 354.428 into
its equivalent decimal number.

Solution. Step 1: Solve first the integer part.


The integer part 345 converts to octal shown in the figure above.
3548 = (3 x 8²) + (5 x 8¹) + (4 x 8⁰)
= (3 x 64) + (5 x 8) + (4 x 1)
= 236₁₀
Step 2: Then, solve for the fractional part.
The fractional part 0.42 coverts to,
0.428 = (4 x 8⁻¹) + (2 x 8⁻²)
= (4 x 0.125) + (2 x 0.015625)
= 0.53125₁₀
OCTAL TO DECIMAL NUMBER
EXAMPLE 4.
Consider the octal number 354.428 into
its equivalent decimal number.

Solution. Step 3: Get the sum of the integer and fractional part.
354.428 = 236₁₀ + 0.53125₁₀
= 236.53125₁₀

The octal number 354.428 is 236.53125₁₀ in decimal number.


DECIMAL TO OCTAL NUMBER
A method of converting a decimal number to an octal number is the repeated
division-by-8 method.

EXAMPLE 1:
Suppose 560₁₀ is a decimal number. Convert it into an octal number.

Solution:
8 560
8 70 0 x 8 = 0
8 8 .75 x 8 = 6
= 1060 Therefore, 560₁₀ = 10608
9 1 0 x 8 = 0
0 .125 x 8 = 1
Read Up
DECIMAL TO OCTAL NUMBER
EXAMPLE 1:
Suppose 560₁₀ is a decimal number. Convert it into an octal number.

Other solution:
⁵⁶⁰⁄₈ = 70.0 .0 x 8 = 0 (LSD)
⁷⁰⁄₈ = 8.75 .75 x 8 = 6 = 1060
⁸⁄₈ = 1.0 .0 x 8 = 0
⅛ = 0.125 .125 x 8 = 1 (MSD)

NOTE: Each successive division by 8 yields a remainder that becomes a digit in


the equivalent octal number. The first remainder generated is the least
significant digit (LSD). So the octal number starts from MSD to LSD.

. Therefore, 560₁₀ = 10608


DECIMAL TO OCTAL NUMBER
EXAMPLE 2:
952₁₀ = _?_8
Solution:
⁹⁵²⁄₈ = 119.0 .0 x 8 = 0 (LSD)
¹¹⁹⁄₈ = 14.875 .875 x 8 = 7 = 1670
¹⁴⁄₈ = 1.75 .75 x 8 = 6
⅛ = 0.125 .125 x 8 = 1 (MSD)

Therefore, 952₁₀ = 16708


DECIMAL TO OCTAL NUMBER
EXAMPLE 3:
Convert 0.52 into an octal number.

Solution: The fraction part of the decimal number has to be


multiplied by 8.

0.52 x 8 = 0.16 with carry 4


0.16 x 8 = 0.2 with carry 1 Read down
0.28 x 8 = 0.24 with carry 2
0.24 x 8 = 0.92 with carry 1
= 4121

Therefore, 0.52₁₀ = 41218


DECIMAL TO OCTAL NUMBER
EXAMPLE 4:
Convert the decimal number 236.53 into an octal number.
Solution:
Step 1: Solve first the integer part (246).
²³⁶⁄₈ = 29.5 .50 x 8 = 4
²⁹⁄₈ = 3.625 .625 x 8 = 5 (Read Up) = 354
⅜ = 0.375 .375 x 8 = 3

Step 2: Then proceed to the fraction part (.53).


0.53 x 8 = 0.24 with carry 4
0.23 x 8 = 0.92 with carry 1 (Read Down) = . 4172
0.92 x 8 = 0.36 with carry 7
0.36 x 8 = 0.88 with carry 2
DECIMAL TO OCTAL NUMBER
EXAMPLE 4:
Convert the decimal number 236.53 into an octal number.
Solution:
Step 1: Solve first the integer part (246).
²³⁶⁄₈ = 29.5 .50 x 8 = 4
²⁹⁄₈ = 3.625 .625 x 8 = 5 (Read Up) = 354
⅜ = 0.375 .375 x 8 = 3

Step 2: Then proceed to the fraction part (.53).


354.41728
0.53 x 8 = 0.24 with carry 4
0.23 x 8 = 0.92 with carry 1 (Read Down) = . 4172
0.92 x 8 = 0.36 with carry 7
0.36 x 8 = 0.88 with carry 2
OCTAL-TO-BINARY &
BINARY-TO-OCTAL
CONVERSIONS
OCTAL TO BINARY NUMBER
We use only 3 bits to represent Octal Numbers. Each group
will have a distinct value between 000 and 111.

OCTAL DIGITAL VALUE BINARY EQUIVALENT


0 000
1 001  The octal number system is
2 010 converting into binary
number system by grouping
3 011 the binary digit in the
4 100 group of three from the
right of the binary
5 101 number.
6 110
7 111
NOTE: Octal number system supports only digits
from 0 to 7.
OCTAL TO BINARY NUMBER

To convert an octal number to binary, each octal digit is converted its 3-bit
binary equivalent according to this table

Octal Digit 0 1 2 3 4 5 6 7
Binary Equivalent 000 001 010 011 100 101 110 111

Example 1:
Convert the octal number 258 into a binary number.
010 101
Solution.
Refer to the table above. We can say that octal digit 2 and octal digit 5

Therefore, the octal number 258 is 010101₂ in binary number.


OCTAL TO BINARY NUMBER
Octal Digit 0 1 2 3 4 5 6 7
Binary Equivalent 000 001 010 011 100 101 110 111

Example 2:
Convert the octal number 1408 to binary number.
Solution.
We can say that, 1 4 0
Octal digit 1 = 001
Octal digit 4 = 100 001 100 000
Octal digit 0 = 000

Therefore, the octal number 1408 is 001100000₂ in binary number.


OCTAL TO BINARY NUMBER
Octal Digit 0 1 2 3 4 5 6 7
Binary Equivalent 000 001 010 011 100 101 110 111

Example 3:
Convert the octal number 546738 to binary number.
Solution.
We can say that,
Octal digit 5 = 101 5 4 6 7 3
Octal digit 4 = 100
Octal digit 6 = 110
Octal digit 7 = 111 101 100 110 111 011
Octal digit 3 = 011

Therefore, the octal number 546738 is 101100110111011₂ in binary number.


OCTAL TO BINARY NUMBER
Example 4:
Convert the octal number 35718 to binary number.

Solution.
So we can say that,
Octal digit 3 = 011 3 5 7 1
Octal digit 5 = 101
Octal digit 7 = 111 011 101 111 001
Octal digit 1 = 001

Therefore, the octal number 35718 is 011101111001₂ in binary number.


OCTAL TO BINARY NUMBER
Example 5:
Let’s convert the octal number 45.6208 to
its equivalent binary number.

Solution. octal point


So we can say that,
Octal digit 4 = 100
4 5 . 6 2 0
Octal digit 5 = 101
Octal digit 6 = 110 100 101 . 110 010 000
Octal digit 2 = 010
Octal digit 0 = 000 binary point

Therefore, the octal number 45.6208 is 100101.110010000₂ in binary


number.
BINARY TO OCTAL NUMBER
 When converting binary to octal number we group the binary digits in the group
of three from the right of the binary number.

 We can use again this table for reference:


Octal Digit 0 1 2 3 4 5 6 7
Binary Equivalent 000 001 010 011 100 101 110 111

EXAMPLE 1:
Convert 100010₂ to octal number.

Solution. Group the binary digits into 3, starting from the right.
100010₂ = 100 010

With the help of the table, convert the divided bits into octal.
binary number 100 = 4
binary number 010 = 2

Therefore, the binary number 100010₂ is 428 in octal number.


BINARY TO OCTAL NUMBER

Example 2:
Convert the binary number 001010101₂ to octal number.
Solution.
Divide the given into 3-bits.
001010101₂ = 001 010 101

Referring to the table above we can say that,


001 010 101
binary number 001 = 1
binary number 010 = 2
binary number 101 = 5 1 2 5

Therefore, the binary number 001010101₂ is 1258 in octal number.


BINARY TO OCTAL NUMBER

Example 3:
Convert the binary number 010110010101₂ to octal number.
Solution.
Divide the given into 3-bits.
010110010101₂ = 010 110 010 101

Referring to the table above we can say that,

binary number 010 = 2 010 110 010 101


binary number 110 = 6
binary number 010 = 2 2 6 2 5
binary number 101 = 5

Therefore, the binary number 010110010101₂ is 26258 in octal number.


BINARY TO OCTAL NUMBER

Example 4:
Convert the binary number 01101₂ to octal number.
Solution.
Divide the given into 3-bits.
01101₂ = (0)01 101

Referring to the table above we can say that,

binary number 001 = 1 010 110


binary number 101 = 5
1 5

Therefore, the binary number 01101₂ is 158 in octal number.


BINARY TO OCTAL NUMBER

Example 5:
Convert the binary number 010100111.100011₂ to octal number.
Solution.
Divide the given into 3-bits.
010100111.100011₂ = 010 100 111 . 100 011

Referring to the table above we can say that,

binary number 010 = 2 010 100 111 . 100 011


binary number 100 = 4
binary number 111 = 7
binary number 100 = 4
2 4 7 . 4 3
binary number 011 = 3

Therefore, the binary number 010100111.100011₂ is 247.438 in octal number.

You might also like