computer application in pharmacy number system

DeviPriyaMohan1 79 views 13 slides Aug 30, 2024
Slide 1
Slide 1 of 13
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13

About This Presentation

computer application


Slide Content

Government College of Pharmacy, Ratnagiri
Computer Applications
in Pharmacy
Sub In charge : Shital B. Thakur
(BE Computer)

NumberSystems

LearningObjectives
In this chapter you will learnabout
•Conversion of Binary to Decimal
•Conversion of Binary to Octal
•Conversion of Binary to Hexadecimal
(Continued on nextslide)

Converting a Binary Number to its Equivalent
Decimal number
Givenbinary numberis 10100011.
Ex. (10100011)
2=
(1 ×2
7
) + (0 ×2
6
) + (1 ×2
5
) + (0 ×2
4
) + (0 ×2
3
) + (0 ×2
2
) + (1 ×2
1
) + (1 ×2
0
)
= 128 + 0 + 32 + 0 + 0 + 0 + 2 + 1.
= 163.
Ex. 10101 Binary To Decimal Conversion:
The given Binary Number = 10101
2
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 2
4
+ 0 x 2
3
+ 1 x 2
2
+ 0 x 2
1
+ 1 x 2
0
step 2:Simplify the above expression
16 + 0 + 4 + 0 + 1 = 21
10101
2= 21
10

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
2
1
2
2
2
3
0.5+0.25+0.125=0.875
Final answer: (10110.111)
2=(22.875)
10

Converting a Binary Number to its Equivalent
OctalNumber
Method
Step1:Divide the digits into groups of three
starting from theright
Step2:Converteachgroupofthreebinarydigitsto
oneoctaldigitusingthemethodofbinaryto
decimalconversion
(Continued on nextslide)

(Continued from previousslide..)
Shortcut Method for Converting a Binary Number
to its Equivalent OctalNumber
Example
1101010
2 =?
8
Step1:Divide the binary digits into groups of 3 starting
fromright
001 101 010
Step2:Convert each group into one octaldigit
001
2= 0 x 2
2 + 0 x 2
1 + 1 x2
0=1
101
2= 1 x 2
2 + 0 x 2
1 + 1 x2
0=5
010
2= 0 x 2
2 + 1 x 2
1 + 0 x2
0=2
Hence, 1101010
2 =152
8
R

Shortcut Method for Converting a Binary
Number to its Equivalent OctalNumber

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
Step1:
Step2:
Divide the binary digits into groups offour
starting from theright
Combineeachgroupoffourbinarydigitsto
one hexadecimaldigit
(Continued on nextslide)

Shortcut Method for Converting a Binary
Number to its Equivalent Hexadecimal Number
(Continued from previousslide..)
Example
111101
2 =?
16
Step1:Divide the binary digits into groups of four
starting from theright
0011 1101
Step 2:Convert each group into a hexadecimaldigit
0011
2
1101
2
= 0 x 2
3 + 0 x 2
2 + 1 x 2
1 + 1 x 2
0 =3
10
= 1 x 2
3 + 1 x 2
2 + 0 x 2
1 + 1 x 2
0 =13
10
=3
16
=D
16
Hence, 111101
2 =3D
16

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
Tags