0% found this document useful (0 votes)
5 views10 pages

Binary and Octal Conversion Methods

The document provides an overview of the binary number system, including conversion methods between binary, decimal, and octal systems. It explains how to convert binary numbers to decimal and octal, as well as how to convert decimal numbers to binary and octal using division and multiplication methods. Additionally, it covers the conversion of octal numbers to binary and vice versa, with examples for clarity.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views10 pages

Binary and Octal Conversion Methods

The document provides an overview of the binary number system, including conversion methods between binary, decimal, and octal systems. It explains how to convert binary numbers to decimal and octal, as well as how to convert decimal numbers to binary and octal using division and multiplication methods. Additionally, it covers the conversion of octal numbers to binary and vice versa, with examples for clarity.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Binary Number System

• Base 2 system.
• Coefficients: 0 or 1.
• Example: 11010.11₂ = 1x2⁴ + 1x2³ + 0x2² + 1x2¹ + 0x2⁰ +
1x2⁻¹ + 1x2⁻² = 26.75₁₀.
• Bits: Binary digits.
• With 4 digits position we can count from zero to 15. In
general, with n bits we can count up to a number
equal up to
2ⁿ - 1.
• Largest decimal number = 2ⁿ - 1
Lecture(3) 1 09/17/2025
Binary to Decimal
Conversion
Sum the powers of 2 for each bit that is 1.
Example:
110101₂ = 1x25 +1x2⁴ + 0x2³ + 1x2² + 0x2¹ + 1x2⁰
= 32 + 16 + 4 + 1 = 53₁₀.

• Solve: Convert (10101)2 ,(0.11101)2 to decimal.

 Solution (21)10, (0.90625)10

Lecture(3) 2 09/17/2025
Decimal to Binary
Conversion
*Divide the number by 2 and record the remainders.
*Example: 23₁₀ = 10111₂.
Integ
result er fraction LS
1 23 ÷ 2 = 11.5 11 0.5*2=1 1
B
2 11 ÷ 2 = 5.5 5 0.5*2=1 1
3 5÷2= 2.5 2 0.5*2=1 1
4 2÷2= 1 1 0 0
MS
5 1÷2= 0.5 0 0.5*2=1 1
B
6 0÷2= 0 0 0

Lecture(3) 3 09/17/2025
Decimal Fractions to Binary Fractions
• Multiply the fractional part by 2 and record the integer
parts.
• Example: 0.59375₁₀ = 0.10011₂.
Fraction Integer
0.59375 x 2
1 1.1875 0.1875 1 MSB
=
0.1875 x 2
2 0.375 0.375 0
=
3 0.375 x 2 = 0.75 0.75 0

4 0.75 x 2 = 1.5 0.5 1


LS
5 0.5 x 2 = 1 0 1 B
• Convert (0.5635 )10, (46.59375)10 to
binary
 Lecture(3)
Solution (0.100100)2 , (10 1110.10011)
4 2 09/17/2025
Decimal-to-Octal Conversion
A method of converting a decimal number to an octal number is the
repeated division-by-8 method, which is similar to the method used
in the conversion of decimal numbers to binary or to hexadecimal.
Let’s convert the decimal number 359 to octal. 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).

1 359÷ 8= 44.875 44 0.875 x 8 = 7 7 (LSD)


2 44÷ 8= 5.5 5 0.5 x 8 = 4 4
3 5÷8 = 0.625 0 0.625 x 8= 5 5 (MSD)

The number is 547.


Decimal to Octal Conversion
Divide the number by 8 and record the remainders.
Example: 177₁₀ = 261₈. Remainde
Step Division Integer
177 / 8 = 22 remainder is 1 r
22 / 8 = 2 remainder is 6 177 ÷ 0.125*8=
1 22 1
8=22.125 1
2 / 8 = 0 remainder is 2
2 22 ÷ 8=2.75 2 0.75*8=6 6
Answer = (261)8
3 2 ÷ 8=0.250 0 0.25*8=2 2

Note: the answer is read from bottom to top as (261)8, the same as with the binary case

Lecture(3) 6 09/17/2025
To convert 0.4510 (decimal) to octal (8-base), we use the
multiplication-by-8 method. 0.4510​≈0.346318​
step Dec. Fraction Fraction Integer
1 0.45×8=3.60 0.6 3
2 0.60×8=4.80 0.8 4
3 0.80×8=6.40 0.4 6
4 0.40X8=3.2 0.3 3
5 0.2X8=1.6 0.6 1

In some cases, the fraction does not reach zero and does not repeat itself.
In this case, we will specify in the exam the number of decimal places at
which to stop.

Lecture(3) 7 09/17/2025
Octal to Decimal Conversion
*Sum the powers of 8 for each digit.
*Example: 65₈ = 6x8 + 5 = 53₁₀.

Convert (24.5)8 to decimal?


Solution (20.625)10

convert (0.1640625)10 to octal equivalent?

Solution (0.124)8.

Lecture(3) 8 09/17/2025
Octal to Binary Conversion
Because each octal digit can be represented by a 3-bit binary number, it
is very easy to convert from octal to binary..
Octal/Binary Conversion
Octal Digit 0 1 2 3 4 5 6 7
Binary 000 001 010 011 100 101 110 111
Let’s convert the octal numbers 25 and 140.
2 5 1 4 0
010 101 001 100 000

Replace each octal digit with its 3-bit binary equivalent.


Example: 51₈ = 101 001₂.

Lecture(3) 9 09/17/2025
Binary to Octal Conversion
*Group binary digits into sets of 3 and convert each group to
octal.
*Example: 001
1010111100₂ = 1274₈.
010 111 100
1 2 7 4

*Convert binary 11100.01001 to octal


011 100 . 010 010
3 4 . 2 2

* Therefore, 11100.010012 = 34.228

Lecture(3) 10 09/17/2025

You might also like