Government College of Pharmacy, Ratnagiri
Computer Applications
in Pharmacy
Sub In charge : Shital B. Thakur
(BE Computer)
Number Systems
Learning Objectives
In this chapter you will learn about
• Conversion of Binary to Decimal
• Conversion of Binary to Octal
• Conversion of Binary to Hexadecimal
(Continued on next slide)
Converting a Binary Number to its Equivalent
Decimal number
Given binary number is 10100011.
Ex. (10100011)2 =
(1 × 27) + (0 × 26) + (1 × 25) + (0 × 24) + (0 × 23) + (0 × 22) + (1 × 21) + (1 × 20)
= 128 + 0 + 32 + 0 + 0 + 0 + 2 + 1.
= 163.
Ex. 10101 Binary To Decimal Conversion:
The given Binary Number = 101012
step 1: Write summation of multiplication of each bit with increasing
power of 2 from the right to left of the binary number 10101.
1 x 24 + 0 x 23 + 1 x 22 + 0 x 21 + 1 x 20
step 2: Simplify the above expression
16 + 0 + 4 + 0 + 1 = 21
101012 = 2110
Converting a Binary fraction Number to its
Equivalent Decimal number
Ex. 101.1101 =
Ex. (10110.111)2=()10
(1*2)4+(0*2)3+(1*2)2+(1*2)1+(0*2)0
=16+0+4+2+0
=22
For Fractional Part
.111
=1*2-1+1*2-2+1*2-3
1*1 + 1*1 + 1*1
21 22 23
0.5+0.25+0.125=0.875
Final answer: (10110.111)2=(22.875)10
Converting a Binary Number to its Equivalent
Octal Number
Method
Step 1: Divide the digits into groups of three
starting from the right
Step 2: Convert each group of three binary digits to
one octal digit using the method of binary to
decimal conversion
(Continued on next slide)
(Continued from previous slide..)
Shortcut Method for Converting a Binary Number
to its Equivalent Octal Number
Example
11010102 = ?8
Step 1: Divide the binary digits into groups of 3 starting
from right
001 101 010
Step 2: Convert each group into one octal digit
0012 = 0 x 22 + 0 x 21 + 1 x 20 = 1
1012 = 1 x 22 + 0 x 21 + 1 x 20 = 5
0102 = 0 x 22 + 1 x 21 + 0 x 20 = 2
Hence, 11010102 = 1528
R
Shortcut Method for Converting a Binary
Number to its Equivalent Octal Number
Conversion Binary fraction to Octal
Ex. 010111101.101110110
010 111 101 . 101 110 110
=275.566
Shortcut Method for Converting a Binary
Number to its Equivalent Hexadecimal Number
Method
Step 1:
Step 2:
Divide the binary digits into groups of four
starting from the right
Combine each group of four binary digits to
one hexadecimal digit
(Continued on next slide)
Shortcut Method for Converting a Binary
Number to its Equivalent Hexadecimal Number
(Continued from previous slide..)
Example
1111012 = ?16
Step 1: Divide the binary digits into groups of four
starting from the right
0011 1101
Step 2: Convert each group into a hexadecimal digit
00112
11012
= 0 x 23 + 0 x 22 + 1 x 21 + 1 x 20 = 310
= 1 x 23 + 1 x 22 + 0 x 21 + 1 x 20 = 1310
= 316
= D16
Hence, 1111012 = 3D16
Conversion Binary fraction to Hexadecimal
Ex. 11101110.011011
1110 1110 . 0110 1100
14 14 .6 12
=EE.6C
EX. 0110 1110 0110 1110 1011
Stay Safe, Stay Home

computer application in pharmacy number system

  • 1.
    Government College ofPharmacy, Ratnagiri Computer Applications in Pharmacy Sub In charge : Shital B. Thakur (BE Computer)
  • 2.
  • 3.
    Learning Objectives In thischapter you will learn about • Conversion of Binary to Decimal • Conversion of Binary to Octal • Conversion of Binary to Hexadecimal (Continued on next slide)
  • 4.
    Converting a BinaryNumber to its Equivalent Decimal number Given binary number is 10100011. Ex. (10100011)2 = (1 × 27) + (0 × 26) + (1 × 25) + (0 × 24) + (0 × 23) + (0 × 22) + (1 × 21) + (1 × 20) = 128 + 0 + 32 + 0 + 0 + 0 + 2 + 1. = 163. Ex. 10101 Binary To Decimal Conversion: The given Binary Number = 101012 step 1: Write summation of multiplication of each bit with increasing power of 2 from the right to left of the binary number 10101. 1 x 24 + 0 x 23 + 1 x 22 + 0 x 21 + 1 x 20 step 2: Simplify the above expression 16 + 0 + 4 + 0 + 1 = 21 101012 = 2110
  • 5.
    Converting a Binaryfraction Number to its Equivalent Decimal number Ex. 101.1101 = Ex. (10110.111)2=()10 (1*2)4+(0*2)3+(1*2)2+(1*2)1+(0*2)0 =16+0+4+2+0 =22 For Fractional Part .111 =1*2-1+1*2-2+1*2-3 1*1 + 1*1 + 1*1 21 22 23 0.5+0.25+0.125=0.875 Final answer: (10110.111)2=(22.875)10
  • 6.
    Converting a BinaryNumber to its Equivalent Octal Number Method Step 1: Divide the digits into groups of three starting from the right Step 2: Convert each group of three binary digits to one octal digit using the method of binary to decimal conversion (Continued on next slide)
  • 7.
    (Continued from previousslide..) Shortcut Method for Converting a Binary Number to its Equivalent Octal Number Example 11010102 = ?8 Step 1: Divide the binary digits into groups of 3 starting from right 001 101 010 Step 2: Convert each group into one octal digit 0012 = 0 x 22 + 0 x 21 + 1 x 20 = 1 1012 = 1 x 22 + 0 x 21 + 1 x 20 = 5 0102 = 0 x 22 + 1 x 21 + 0 x 20 = 2 Hence, 11010102 = 1528 R
  • 8.
    Shortcut Method forConverting a Binary Number to its Equivalent Octal Number
  • 9.
    Conversion Binary fractionto Octal Ex. 010111101.101110110 010 111 101 . 101 110 110 =275.566
  • 10.
    Shortcut Method forConverting a Binary Number to its Equivalent Hexadecimal Number Method Step 1: Step 2: Divide the binary digits into groups of four starting from the right Combine each group of four binary digits to one hexadecimal digit (Continued on next slide)
  • 11.
    Shortcut Method forConverting a Binary Number to its Equivalent Hexadecimal Number (Continued from previous slide..) Example 1111012 = ?16 Step 1: Divide the binary digits into groups of four starting from the right 0011 1101 Step 2: Convert each group into a hexadecimal digit 00112 11012 = 0 x 23 + 0 x 22 + 1 x 21 + 1 x 20 = 310 = 1 x 23 + 1 x 22 + 0 x 21 + 1 x 20 = 1310 = 316 = D16 Hence, 1111012 = 3D16
  • 12.
    Conversion Binary fractionto Hexadecimal Ex. 11101110.011011 1110 1110 . 0110 1100 14 14 .6 12 =EE.6C EX. 0110 1110 0110 1110 1011
  • 13.