f.y.b.sc. paper:-ii, sem :-i, course no:-ele-112 and electronics...decimal to octal conversion •a)...

52
F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 Electronics :- The word electronics is derived from electron mechanics, which means the study of the behavior of externally applied fields. What is Electronics? The branch of engineering which deals with current conduction through vacuum or gas or semiconductor; is known as electronics.

Upload: others

Post on 23-Apr-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

F.Y.B.Sc.Paper:-II, Sem :-I, Course No:-ELE-112 • Electronics :- The word electronics is derived

from electron mechanics, which means the study of the behavior of externally applied fields.

• What is Electronics?

• The branch of engineering which deals with current conduction through vacuum or gas or semiconductor; is known as electronics.

Page 2: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

• Application of electronics :- There are no. of applications,

• 1) Communication & Entertainmentsa) Line communicationsi) Telegraphy, ii) Telephony, iii) Telex, iv)

Teleprinters. b) Wireless Communicationsi) Radio Broadcosting, ii) TV Broadcosting,

iii) Satellite Communication.c) Audio Systemsi) PA System, ii) Stereo Amplifiers,iii)

Record Players,iv) Tape Recorders.

Page 3: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

. 2) Defensea) Radar (Radio detection & ranging ), b) Guided missile, c) Coded communication.3) Industries

a) Automatic control systems, b) Heating & Welding systems, c) Computers (digitals & analogue ).4) Medical Sciencesa) X-ray, b) Electron microscope, c) Electrocardiogram(ECG), d) Electrotherapy.5) Instrumentationa) Precision measuring instruments.( CRO., Frequency counters, etc.)

Page 4: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

• Digital Electronics

• There are two types of electronics circuits,

• 1) Analogue ckts :-This type of ckts. accepts inputs in a continuous form similarly output voltage produced by such ckt. is also continuous in nature.

• 2) Digital ckts :- This type of ckts. accepts inputs which can be either low or high similarly output voltage of such ckt. is discontinuous in nature it can be low or high.

Page 5: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

• Digital circuits is better than analogue ckts. Because of following advantages,

i) Output of the ckt. do not affected due to the temp. change.

ii) Output of the ckt. do not affected due to the change of supply voltage.

iii) No effect of ageing,

iv) It reduces noise,

v) It is very fast in action,

vi) It is more accurate, etc.

Page 6: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

NUMBER SYSTEMS

Number Systems are the heart of Digital ckts.& Computers .Their are variety of Number systems. These Number systems are as follows.

1) Decimal Number systems

2) Binary Number Systems

3) Octal Number Systems

4) Hexadecimal Number Systems

Page 7: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

DECIMAL NUMBER SYSTEM.Radix (Base ) :- Radix or Base of a number system isdefined as total number of basic symbols used in thenumber system.Decimal Number System:-Decimal Number System has base of 10.i.e.it uses10 different symbols to represents Number . These symbols are 0,1,2,3,4,5,6,7,8 &9.It is a weighted no . system because each digit in

decimal no. has different positional weights.To understand this consider the decimal no. 5555It can be written as ,5555 = 5000 + 500 + 50+ 5.

=(5*103) + (5*102) +(5*101) +(5*100)

Page 8: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

• In above decimal no. all digits are 5 but the positional weights of

• each digits are different.

i.e. positional weights of first digit is thousand, that of second digit is hundred, third digit is ten & fourth digit is one.

Now consider the fractional decimal no. 0.426,

0.426 = 0.4 + 0.02 + 0.006

= 4*10-1 + 2*10-2 + 6*10-3

Thus the weights of different positions in a decimal no. system is given,

………. 104 103 102 101 100 . 10-1 10-2 10-3 10-4 ……….

Page 9: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

BINARY NUMBER SYSTEM.Binary number system:-Binary Number System has abase of 2,i.e.it uses 2 different symbols to represents

number. These symbols are 0 & 1. It is a weighted no. system because each digit in the

binary no. has different positional weights.Thus the weights of different positions in a decimal

no. system is given,………. 24 23 22 21 20 . 2-1 2-2 2-3 2-4 …………etc

The table shows some decimal nos. &. their binary equivalent numbers

Page 10: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

Decimal No. Equivalent Binary No.

0 0000

1 0001

2 0010

3 0110

4 0100

5 0101

6 0110

7 0111

8 1000

9 1001

10 1010

11 1011

12 1100

13 1101

14 1110

15 1111

Page 11: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

OCTAL NUMBER SYSTEM.

3) Octal number system :- Octal Number System has a base of 8. i.e. it uses 8 different symbols to represents number. These symbols are 0 , 1 , 2 , 3 , 4 , 5 , 6 & 7 .

It is a weighted no. system because each digit in the octal no. has different positional weights.

Thus the weights of different positions in a octal no. system is given,

……. 84 83 82 81 80 . 8-1 8-2 8-3 8-4 ……etc .

Page 12: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

• Now the question arises how to count octal no. beyond 7 ?

• For this 2-digit combinations are formed taking the second digit followed by the first digit, then the second digit followed by second digit. & so on.

• Hence after 7 next octal no. is second digit followed by first digit. i.e. 10 then 11,12,13 & so on. Following the list of some octal nos.

• 0,1,2,3,4,5,6,7

• 10,11,12,13,14,15,16,17,

• 20,21,22,23,24,25,26,27, & so on.

Page 13: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

The table shows some decimal nos. with their octal equivalent nos.

Decimal No. Octal EquivalentNo.

0 0

1 1

2 2

3 3

4 4

5 5

6 6

7 7

8 10

9 11

10 12

11 13

12 14

Page 14: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

HEXADECIMAL NUMBER SYSTEM.

4)Hexadecimal number system :- Hexadecimal Number System has a base of 16. i.e. it uses 16 different symbols to represents number. These symbols are 0 , 1 , 2 , 3 ,4 ,5, 6, 7 ,8 ,9,A,B,C,D,E & F.

It is a weighted no. system because each digit in the hexadecimal no. has different positional weights.

Thus the weights of different positions in a hexadecimal no. system is given,

……. 164 163 162 161 160 . 16-1 16-2 16-3 16-4 ……etc .

Page 15: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

• Now the question arises how to count hexadecimal no. beyond F ? We form 2-digit combination similar to octal no. system.

• For this 2-digit combinations are formed taking the second digit followed by the first digit, then the second digit followed by second digit. & so on.

• Hence after F next hexadecimal no. is second digit followed by first digit& so on. i.e. 10 then 11,12,13 ,14,15,16,17,18,19,1A,1B,1C,1D, 1E, 1F, & so on.

Page 16: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

The table shows some decimal nos. with their hexadecimal equivalent nos.

Decimal No. Hexadecimal No. Decimal No. Hexadecimal No.

0 0 10 A

1 1 11 B

2 2 12 C

3 3 13 D

4 4 14 E

5 5 15 F

6 6 16 10

7 7 17 11

8 8 18 12

9 9 19 13

Page 17: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

Decimal to Binary conversion

• A) Conversion of integer decimal no. into binary no. :-As integer decimal no. can be converted into binary using double- dabbalmethod, it is also known as divide by two method. In this method; progressively divide the given integer decimal no. by 2 & write down the remainder after each division & taking the remainders from bottom to top; we get the equivalent binary no.

• e.g. 1)Convert decimal no.21 to its binary equivalent ?

Page 18: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

• Ans:- 21/2 =10 with remainder of 1

10/2 =5 with remainder of 0

5/2 = 2 with remainder of 1

2/2 = 1 with remainder of 0

1/2 = 0 with remainder of 1

Therefore (21)10 = (10101)2

• 2) Convert decimal no. 37 to its binary ?

• Ans:-37/2 =18 with remainder of 1

18/2=9 with remainder of 0

9/2 = 4 with remainder of 1

4/2= 2 with remainder of 0

2/2=1 with remainder of 0

Page 19: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

1/2=0 with remainder of 1

Therefore (37)10 = (100111)2

B)Conversion of fractional decimal no. into binary no. :-The fractional decimal no. can be converted into binary using multiply by two rule. i.e. multiply the fraction decimal no. by 2 & record the carry in the integer position, taking the carries from top to bottom, we get the equivalent binary no.

e.g. 1) Convert (0.3125)10 to binary ?

Page 20: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

• Ans:- o.3125*2=0.625 with a carry 0 o.625 *2=1.25 with a carry 1o.25 *2=0.50 with a carry 0o.50 *2=1.00 with a carry 1Therefore (0.3125)10= (0.0101)2

• e.g. 2) Convert (12.15)10 to binary ?Ans :-Now first consider the conversion of integer

part,(12)12/2=6 with remainder of 06/2=3 with remainder of 03/2=1 with remainder of 11/2=0 with remainder of 1Therefore (12)10= (1100)2

Page 21: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

• Now consider the conversion of fractional part,(0.15)

0.15*2=0.30 with a carry 0

0.30*2=0.60 with a carry 0

0.60*2=1.20 with a carry 1

0.20*2=0.40 with a carry o

Therefore (0.15)10= (0010)2

Therefore (12.15)10= (1100.0010)2

Page 22: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

Binary to Decimal conversion• To convert the given binary no. into its

equivalent decimal nos. following procedure should be adopted.

i) write the given binary no.,

ii) write binary weights under each bit,

iii)cancel the weights which are placed below o,

iv)Add the remaining weights & get the decimal equivalent.

e.g. 1) Convert (10111)2 to decimal no.

1 0 1 1 1

24 23 22 21 20

Page 23: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

• Therefore, 16+0+4+2+1 =23

Therefore, (10111)2=(23)10

e.g. 2) Convert (111.0101)2 to decimal no. ?

Ans) 1 1 1 . 0 1 0 1

22 21 20 2-1 2-2 2-3 2-4

=4+2+1+0+0.25+0+0.0625

=7.3125

Therefore,(111.0101)2=(7.3125)10

Page 24: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

Decimal to Octal conversion• A) Conversion of integer decimal no. into

octal no. :-As integer decimal no. can be converted into octal using octal-dabbalmethod,it is also known as divide by eight method.In this method;progressively devidethe given integer decimal no.by 8 & write down the remainders after each division & taking the remainders from bottom to top; we get the equivalent octal no.

• e.g. 1)Convert decimal no.175 to its octal equivalent ?

Page 25: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

• Ans:- 175/8 =21 with remainder of 7

21/8 =2 with remainder of 5

5/8 = 0 with remainder of 2

Therefore (175)10 = (257)8

• 2) Convert decimal no. 359 to its octal no.?

• Ans:-359/8 =44 with remainder of 7

44/8=5 with remainder of 4

5/8 = 0 with remainder of 5

Therefore (359)10 = (547)8

Page 26: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

B)Conversion of fractional decimal no. into octal no. :-The fractional decimal no.can be converted into octal using multiply by 8 rule. i.e. multiply the fraction decimal no. by 8 & record the carry in the integer position, taking the carries from top to bottom, we get the equivalent octal no.

e.g. 1) Convert (0.15)10 to octal no.?

• Ans) 0.15*8=1.20 with a carry 1

0.20 *8=1.60 with a carry 1

0.60 *8=4.80 with a carry 4

Therefore (0.15)10= (0.114)8

Page 27: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

• e.g. 2) Convert (98.20)10 to octal no.?Ans:-Now first consider the conversion of integer

part,(98)98/8=12 with remainder of 212/8=1 with remainder of 41/8=0 with remainder of 1Therefore (98)10= (142)8

• Now consider the conversion of fractional part,(0.20)

0.20*8=1.60 with a carry 10.60*8=4.80 with a carry 40.80*8=6.40 with a carry 6Therefore (0.20)10= (0.146)8

Therefore (98.20)10= (142.146)8

Page 28: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

Octal to Decimal conversion

• Multiply each octal digit by its positional weights & add the resulting products.

e.g. 1) Convert octal no.(205.102) to its decimal equivalent ?

(205.102)8 = 2*82 + 0*81 + 5*80 +1*8-1 +0*8-2

+2*8-3

=(2*64) +0+(5*1)+0.125+0+0.0039

=128+5+0.129

=133.129

Therefore,(205.102)8 = (133.129)10

Page 29: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

2) Convert octal no.(2374) to its decimal equivalent ?

(2374)8 =(2*83 )+(3*82 )+(7*81 )+(4*80)

=(2*512) +(3*64)+(7*8)+(4*1)

=1024+192+56+4

=1276

Therefore,(2374)8 = (1276)10

Octal to Binary conversion

The base of octal no. is third power of base of binary no. i.e. 8=23 , so convert octal no. to binary, change each octal digit to its 3 bit binary equivalent.

Page 30: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

e.g. 1) Convert octal no. (432) into binary no.?

Ans) 4 3 2

100 011 010

Therefore, (432)8 = (100011010)2

e.g. 2) Convert octal no.(576.21) into binary no.?

Ans) 5 7 6 . 2 1

101 111 110 . 010 001

Therefore,(576.21)8 = (101111110.010001)2

Note that digits in octal no. is one third of that in an equivalent binary no.

Page 31: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

Binary to Octal conversions• To convert the given binary no. to octal, make

the group of three bits, starting from the binary point (Zeros are added at each end if necessary) then convert each group to its octal equivalent.

e.g.1) Convert binary no.(101011) into octal no.?

Ans) Make a group of three of given binary no. starting from binary point.

i.e. 1 0 1 0 1 1

22 21 20 22 21 20

= 4+0+1 0+2+1

Page 32: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

Therefore, octal no. is 53,

Hence, (101011)2 = (53)8

e.g.2)Convert binary no.(10010111) into octal no.?

Ans) Make a group of three of given binary no. starting from binary point.

i.e. 1 0 0 1 0 1 1 1 Now add 0,

i.e. 0 1 0 0 1 0 1 1 1

22 21 20 22 21 20 22 21 20

= 0+2+0 0+2+0 4+2+1

= 2 2 7

Therefore, octal no. is 227,

Hence, (10010111)2 = (227)8

Page 33: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

e.g.2)Convert binary no.(100111.011) into octal no.?Ans) Make a group of three of given binary no. starting from binary point.i.e. 1 0 0 1 1 1 . 0 1 1

22 21 20 22 21 20 22 21 20

= 4+0+0 4+2+1 0+2+1= 4 7 3

Therefore, octal no. is 473,Hence, (100111.011)2 = (473)8

Page 34: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

e.g.2)Convert binary no.(10101.01) into octal no.?

Ans) Make a group of three of given binary no. starting from binary point.

i.e. 1 0 1 0 1 0 1 Now add zeros,

i.e. 0 1 0 1 0 1 . 0 1 0

22 21 20 22 21 20 . 22 21 20

= 0+2+0 4+0+1 . 0+2+0

= 2 5 2

Therefore, octal no. is (25.2),

Hence, (10101.01)2 = (473)8

Page 35: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

Decimal to Hexadecimal conversionsTo convert the given integer decimal no. to hexadecimal

no., Hex-dabble method is used. In this method

Divide successively the given decimal no. by 16,

Writing down the remainders & take the remainder

From bottom to top to get equivalent hexadecimal no.

e.g.1)Convert decimal no.(249) into hexadecimal no.?

Ans) Divide successively 249 by 16,

Therefore, 249/16 = 15 with a remainder 9

15/16 =0 with a remainder 15

Now 15= F , Hence, (249)10 = (F9)16

Page 36: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

Conversion of fractional decimal no. into hexadecimal no. :-The fractional decimal no.can be converted into binary using multiply by 16 rule. i.e. multiply the fractional decimal no. by 16 & record the carry in the integer position, taking the carries from top to bottom, we get the equivalent hexadecimal no.

e.g.1)Convert fractional decimal no.(0.172) into hexadecimal no.?

Ans) Multiply the fractional decimal no. by 16,

Therefore, 0.172*16=2.752 with a carry 2

0.752*16=12.032 with a carry 12

Page 37: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

0.032*16=0.512 with a carry 0Now 12=C , Hence, (0.1 72)10=(0.2C0)16

e.g.2) Convert decimal no.(650.205) into hexadecimal no.?

Ans) Divide successively 650 by 16,Therefore, 650/16 = 40 with a remainder 10

40/16 =2 with a remainder 82/16=0 with a remainder 2

Now 10= A , Hence, (650)10 = (28A)16

Multiply the fractional decimal no.(0.205) by 16,Therefore, 0.205*16=3.28 with a carry 3

0.28*16=4.48 with a carry 4

Page 38: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

Hence,(0.205)=(0.34),therefore (650.205)10=(28A.34)16

Hexadecimal to Decimal conversion

To convert hexadecimal no. to a decimal no. multiply each hexadecimal digit by its positional weights & add the resulting products.

e.g.1)Convert hexadecimal no.(A85) into decimal no.?

Ans) (A85)16=(A*162)+(8*161)+(5*160)

=(10*256)+(8*16)+(5*16)

Page 39: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

=2560+128+5

=2693

Therefore, (A85)16=(2693)10

e.g.2)Convert hex-no.(B2F8.84) into decimal no.?

Ans) B2F8.84=11 2 15 8 . 84

=(11*163)+(2*162)+(15*161)+(8*160)+

.(8*16-1)+(4*16-2).

=45096+512+240+8+0.5+0.140625

=45816.640625

Therefore, (B2F8.84)16=(45816.640625)10

Page 40: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

Hexadecimal to Binary conversions

To convert hexadecimal to binary no., convert each hexadecimal digit to its 4-bit binary equivalent, i.e. 16=24 ,

e.g.1)Convert hex-no. (AB2D.7F) into binary no.?

Ans) A B 2 D . 7 F

10 11 2 13 . 7 15

1010 1011 0010 1101 . 0111 1111 Hence , (AB2D.7F)16=(1010101100101101.01111111)

Page 41: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

e.g.2)Convert hex-no. (3A9C) into binary no.?

Ans) 3 A 9 C

3 10 9 12

0011 1010 1001 1100

Therefore , (3A9C)16=(0011101010011100 )2

e.g.3)Convert hex-no. (123.C) into binary no.?

Ans) 1 2 3 . C

1 2 3 . 12

0001 0010 0011 . 1100

Therefore , (3A9C)16=(0001001000111100 )2

Page 42: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

Binary to Hexadecimal conversionsTo convert the given binary no. to a hexadecimal

no., make the group of 4-bit, starting from the binary point (Zeros are added at each end if necessary) then convert each group to its hexadecimal equivalent.

e.g.1) Convert binary no.(10010110.1011) into hexadecimal no.?

Ans) Make a group of 4,

1001 0110 . 1011

9 6 11

Now 11=B ,Hence, (10010110.1011) 2=(96.B)16

Page 43: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

Binary Coded Decimal Code(BCD code)

The code in which basic decimal digits 0 through 9 are represented by their binary equivalents using four bits is called as BCD code. It is also called as 8421 code.Itis also called as 8421 code. BCD code is very convenient and useful code for input and output operations in digital ckts. It is used to represent decimal digits in systems like digital calculators, voltmeters etc.

Page 44: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

The table shows decimal digits & corresponding 8421 BCD code.

Decimal Digits Binary Equivalent 8421 BCD code

0 0000 0000

1 0001 0001

2 0010 0010

3 0011 0011

4 0100 0100

5 0101 0101

6 0110 0110

7 0111 0111

8 1000 1000

9 1111 1111

10 1010 0001 0000

11 1011 0001 0001

12 1100 0001 0010

Page 45: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

Decimal to BCD code conversions

e.g.1)Convert decimal no. (3469) to BCD code?

Ans) 3 4 6 9

0011 0100 0110 1001

Therefore, (3469)10= (0011010001101001)BCD

e.g.2)Convert decimal no. (2578) to BCD code?

Ans) 2 5 7 8

0010 0101 0111 1000

Therefore, (2578)10= (0010010101111000)BCD

Page 46: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

BCD to Decimal conversionsTo convert the given BCD code to a decimal no.,

make the group of 4-bit, starting from the binary point (Zeros are added at each end if necessary) then convert each group to its decimal equivalent.

e.g.1) Convert BCD code(10101111000) into decimal no.?

Ans) Make a group of 4,

0101 0111 1000

5 7 8

Hence, (010101111000) BCD = (578)10

Page 47: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

Gray Code

The gray code is non-weighted code & is cyclic.This means that it is arranged so that every transition from one value to the next value involves only one bit change. It is some times referred as reflected binary, because the first eight values compare with those of the last 8 values, but in reverse order. The gray code is often used in mechanical applications such as shift encoders.

Page 48: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

Binary to Gray code conversions

i) Write down the number in binary code.

ii) MSB of Gray code is the MSB of the binary code.

iii) Goging from left to right, add each adjacent pair of binary digit to get the next Gray code digit, discard the carries.

e.g.1) Convert binary no.(101101) to Gray code.

Ans) 1 0 1 1 0 1

+1 +0 +1 +1 +0

1 1 1 0 1 1 Graycode

Page 49: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

Therefore,(101101)2=(111011)Gray code

e.g.2) Convert binary no.(110010) to Gray code.

Ans) 1 1 0 0 1 0

+1 +1 +0 +0 +1

1 0 1 0 1 1 Graycode

Therefore, (110010)2= (101011)Gray code

Gray code to Binary conversionsTo convert Gray code to binary, following

procedure is adopted.

i) Write the Gray code number,

Page 50: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

ii) The MSB of binary no is same as in Gray code no.

iii) Add the MSB of binary no.(diagonally) into the 2nd MSB of a Gray code no. to get 2nd MSB of binary no. Then add this 2nd MSB of a binary into the 3rd MSB of Gray code no. to get3rd MSB of binary no. In this way this procedure is continued till we get LSB of binary no. Discard the carries.

Page 51: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

e.g.1) Convert Gray code no.(101011) to binary.

Ans) 1 0 1 0 1 1

+1 +1 +0 +0 +1

1 1 0 0 1 0 Binary

Therefore, (101011)Gray = (101011)2

e.g.1) Convert Gray code no.(111011) to binary.

Ans) 1 1 1 0 1 1

+1 +0 +1 +1 +1

1 0 1 1 0 1 Binary

Therefore, (111011)Gray = (101101)2

Page 52: F.Y.B.Sc. Paper:-II, Sem :-I, Course No:-ELE-112 and Electronics...Decimal to Octal conversion •A) Conversion of integer decimal no. into octal no. :-As integer decimal no. can be

THANKYOU