Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to signals The signals are broadly classified into two categories: 1. Analog Signals. 2. Digital signals.

Similar presentations


Presentation on theme: "Introduction to signals The signals are broadly classified into two categories: 1. Analog Signals. 2. Digital signals."— Presentation transcript:

1 Introduction to signals The signals are broadly classified into two categories: 1. Analog Signals. 2. Digital signals.

2 Analog Signals These signals have infinite number of different magnitudes / values. They varies continuously with respect to time. Ex= Sine wave, triangular wave. Digital Signals These signals have only finite number of predetermined distinct magnitudes. Ex= Binary signal. 1 t -v +v t

3 Introduction to Analog & Digital system Analog System A system which process the analog signals are called as Analog system. Ex = Filter, Amplifier, Signal generator, Motors speed controller. Digital System A system which work on digital signal is called as digital system. Ex = Register, Flip flop, Counters etc.

4 INTRODUCTION TO NUMBER SYSTEM Def:= Number system defines a set of values used to represents quantity. Following are the different number systems. Decimal Number system. Binary Number system. Octal Number system. Hexadecimal Number system.

5 DECIMAL NUMBER SYSTEM Contains 10 unique symbols 0,1,2,3,4,5,6,7,8 & 9. The base / radix is 10. Positional Weighted system & its positional weights are 10 0, 10 1, 10 2, 10 3 etc. Ex. [1234] 10 1) [1234] 10 = 1*10 3 + 2*10 2 +3*10 1 +4*10 0 = 1234 2) [12.34] 10 = 1*10 1 + 2*10 0 +3*10 -1 +4*10 -2 = 12.34 Decimal point

6 BINARY NUMBER SYSTEM Contains only two symbols, 0 & 1. The base / radix is 2. Positional Weighted system & its positional weights are 2 3, 2 2, 2 1, 2 0 etc. Binary digit is called as a BIT. Ex. [1010] 2 1) [1010] 2 = 1*2 3 + 0*2 2 +1*2 1 +0*2 0 2) [10.10] 2 = 1*2 1 + 0*2 0 +1*2 -1 +0*2 -2

7 OCTAL NUMBER SYSTEM Contains eight symbols, 0,1,2,3,4,5,6 & 7. The base / radix is 8. Positional Weighted system & its positional weights are 8 3, 8 2, 8 1, 8 0 etc. Octal numbers is 3 bit numbers. Ex. [23] 8 1) [23] 8 = 2*8 1 +3*8 0 2) [23.16] 8 = 2*8 1 +3*8 0 + 1*8 -1 + 6*8 -2

8 HEXADECIMAL NUMBER SYSTEM Contains 16 symbols, 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E & F. The base / radix is 16. Positional Weighted system & its positional weights are 16 3, 16 2, 16 1, 16 0 etc. Hexadecimal numbers is 4 bit numbers. Ex. [09AB] 16 1) [09AB] 16 = 0*16 3 + 9* 16 2 + A*16 1 + B*16 0 2) [AB.12] 16 = A*16 1 + B* 16 0 + 1*16 -1 + 2*16 -2

9 NUMBER SYSTEM CONVERSION There are 12 types of number system conversion. 1) Binary to Decimal number Conversion 2) Binary to Octal number Conversion 3) Binary to Hexadecimal number Conversion 4) Decimal to Binary number Conversion 5) Decimal to Octal number Conversion 6) Decimal to Hexadecimal number Conversion 7) Octal to Binary number Conversion 8) Octal to Decimal number Conversion 9) Octal to Hexadecimal number Conversion 10) Hexadecimal to Binary number Conversion 11) Hexadecimal to Decimal number Conversion 12) Hexadecimal to octal number Conversion

10 BINARY TO DECIMAL CONVERSION Steps: 1) Write the Binary number. 2) Multiply each binary digit by its positional weight. 3) Add the product terms to obtain the decimal number. Example: 1) [1011] 2 = [ ] 10 [1011] 2 = 1*2 3 + 0*2 2 + 1*2 1 + 1*2 0 = 8 + 0 + 2 + 1 = 11 [1011] 2 = [11] 10 2) [10.10] 2 = [ ] 10 [10.10] 2 = 1*2 1 + 0*2 0 + 1*2 -1 + 0*2 -2 = 2 + 0 + 0.5 + 0 = 2.5 [10.10] 2 = [ 2.5 ] 10

11 DECIMAL TO BINARY CONVERSION The decimal integer is converted to binary integer by Successive Division by 2 & the decimal fraction is converted into binary fraction by Successive Multiplication by 2. This is known as Double-Dabble Method. 1) Successive Division by 2 The number is successively divided by 2 till the quotient is 0. Last Remainder is MSB. Remainders read from bottom to top, gives binary integer. 2) Successive Multiplication by 2 The number is successively multiplied by 2 till the fraction part of the product is 0 or till the desired accuracy. First Integer is MSB. Integers read from top to bottom, gives binary fraction.

12 DECIMAL TO BINARY CONVERSION 1) [10] 10 = [ ] 2 Q R 10/2 5 0 5/2 2 1 [10] 10 = [ 1010 ] 2 2/2 1 0 1/2 0 1 2) [2.5] 10 = [ ] 2 a) For Integer partb) For Fractional part Q R 2/2 1 0 0.5*2 = 1. 0 1 1/2 0 1 [2.5] 10 =[10.1] 2

13 OCTAL TO DECIMAL CONVERSION Steps: 1) Write the Octal number. 2) Multiply each octal digit by its positional weight. 3) Add the product terms to obtain the decimal number. Example: 1) [27] 8 = [ ] 10 [27] 8 = 2×8 1 + 7×8 0 = 16 + 7 = 23 [27] 8 = [ 23 ] 10 2) [23.23] 8 = [ ] 10 = 2×8 1 + 3×8 0 + 2×8 -1 + 3×8 -2 = 19 + 0.29 [23.23] 8 = [19.29] 10

14 DECIMAL TO OCTAL CONVERSION The decimal integer is converted to octal integer by Successive Division by 8 & the decimal fraction is converted into octal fraction by Successive Multiplication by 8. 1) Successive Division by 8 The number is successively divided by 8 till the quotient is 0. Last Remainder is MSB. Remainders read from bottom to top, gives octal integer. 2) Successive Multiplication by 8 The number is successively multiplied by 8 till the fraction part of the product is 0 or till the desired accuracy. First Integer is MSB. Integers read from top to bottom, gives octal fraction.

15 DECIMAL TO OCTAL CONVERSION 1) [19] 10 = [ ] 8 Q R 19/8 2 3 2/8 0 2 [19] 10 =[23] 8 2) [0.296] 10 =[ ] 8 For Fractional part 0.296*8 = 2.368 2 0.368*8 = 2.994 2 0.944*8 = 7.552 7 [0.296] 10 = [ 0.227 ] 8

16 HEXADECIMAL TO DECIMAL CONVERSION Steps: 1) Write the Hexadecimal number. 2) Multiply each hexa digit by its positional weight. 3) Add the product terms to obtain the decimal number. Example: 1) [9.AB] 16 = [ ] 10 [9.AB] 16 = 9×16 0 + A×16 -1 + B×16 -2 = 9×1 + 10×16 -1 + 11×16 -2 = 9 + 0.625 + 0.0429 = [ 9.667 ] 10

17 DECIMAL TO HEXADECIMAL CONVERSION The decimal integer is converted to hexadecimal integer by Successive Division by 16 & decimal fraction is converted into hexa fraction by Successive Multiplication by 16. 1) Successive Division by 16 The number is successively divided by 16 till the quotient is 0. Last Remainder is MSB. Remainders read from bottom to top, gives hexadecimal integer. 2) Successive Multiplication by 16 The number is successively multiplied by 16 till the fraction part of the product is 0 or till the desired accuracy. First Integer is MSB. Integers read from top to bottom, gives hexadecimal fraction.

18 DECIMAL TO HEXADECIMAL CONVERSION 1)[95] 10 =[ ] 16 Q R 95/16 5 15 (F) 5/16 0 5 [95] 10 = [5F] 16 2) [95.95] 10 =[ ] 16 a) For real part b) For Fractional part [95] 10 = [ 5F] 16 0.95*16 = 15.2 15 0.2*16 = 3.2 3 [.95] 10 = [.F33 ] 16 [95.95] 10 = [ 5F.F33 ] 16

19 BINARY TO OCTAL CONVERSION 1) Make a group of 3-bit. 2) Integer part: Start from LSB & moving towards MSB, replace each group of 3-bit by its octal number. 3) Fractional part: Start from MSB & moving towards LSB, replace each group of 3-bit by its octal number. Example: [001010101.101010100] 2 = 001 010 101.101 010 100 = 1 2 5. 5 2 4 = [125.524] 8

20 OCTAL TO BINARY CONVERSION Replace each octal digit by its 3 bit binary equivalent. [23.36] 8 = 2 3. 3 6 = 010 011. 011 110 = [010011.011110] 2

21 BINARY TO HEXADECIMAL CONVERSION 1) Make a group of 4-bit. 2) Integer part: Start from LSB & moving towards MSB, replace each group of 4-bit by its hexadecimal number. 3) Fractional part: Start from MSB & moving towards LSB, replace each group of 4-bit by its hexadecimal number. [000111101010.101010101000] 2 = 0001 1110 1010. 1010 1010 1000 = 1 E A. A A 8 = [1EA.AA8] 16

22 HEXADECIMAL TO BINARY CONVERSION Replace each hexadecimal digit by its 4 bit binary equivalent. [ABC95.CDA] 16 = A B C 9. C D A = 1010 1011 1100 1001. 1100 1101 1010 = [1010101111001001.110011011010] 2

23 Step 1: Convert Hexadecimal number into Binary number. Step 2: Convert binary number into Octal number. Example: 1) [ABCD] 16 = [ ] 8 Step 1) Convert ABCD into binary equivalent. [ABCD] 16 = [1010 1011 1100 1101 ] 2 Step 2) Convert binary number into octal equivalent. [1010 1011 1100 1101 ] 2 = [001 010 101 111 001 101 ] 2 = [ 1 2 5 7 1 5] 8 HEXADECIMAL TO OCTAL CONVERSION

24 Step 1: Convert Octal number into Binary number. Step 2: Convert binary number into Hexadecimal number. Example: 1) [235.12] 8 = [ ] 16 Step 1) Convert 235.12 into binary equivalent. [235.12] 8 = [010 011 101. 001 010] 2 Step 2) Convert binary number into Hexadecimal equivalent. [010 011 101. 001 010] 2 = [1001 1101. 0010 1000] 2 = [ 9 D. 2 8] 16 OCTAL TO HEXADECIMAL CONVERSION

25 BINARY CODED DECIMAL (BCD) To express any decimal number in BCD, each decimal digit should be replaced by the appropriate 4-bit code. It is a weighted code. There are 6 illegal combinations 1010, 1011, 1100, 1101, 1110 and 1111. The rules of binary addition & subtraction do not apply to the entire number but only to the individual 4-bit groups.

26 BINARY CODED DECIMAL (BCD) Decimal No.Binary No.Binary Coded Decimal (BCD) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 0001 0000 0001 0001 0010 0001 0011 0001 0100 0001 0101

27 BINARY CODED DECIMAL (BCD) Ex: Give BCD Code for decimal number 874. Decimal number: 874 BCD Code:1000 0111 0100 Ex: Give BCD Code for decimal no. 96.42 Decimal number: 96.42 BCD Code:1001 0110. 0100 0010

28 EXCESS-3 CODE It is also called as XS-3 Code. It is Non-Weighted Code. It is a Sequential code & can be used for arithmetic operation. Excess-3 code word derived from the BCD code word by adding (0011) 2 or (3) 10 to each word in BCD code. Excess-3 code are obtained: add (3) 10 decimal no. BCD code Excess-3 code It has six invalid states 0000, 0001, 0010, 1101, 1110 & 1111.

29 Eg.  Obtain the Excess-3 code for [428] 10 Given no. 4 2 8 Binary equivalent 0100 0010 1000 Excess-3 code 0111 0101 1011 EXCESS-3 CODE

30 GRAY CODE It is a non-weighted code, not suitable for arithmetic operations. Here only one bit in the code group changes, each time the decimal no. is incremented. As only one bit changes at a time, it is called as unit-distance code.

31 Gray Code Decimal Binary Gray 0 0000 0000 1 0001 0001 2 0010 0011 3 0011 0010 4 0100 0110 5 0101 0111 6 0110 0101 7 0111 0100 8 1000 1100 9 1001 1101 10 1010 1111 11 1011 1110 12 1100 1010 13 1101 1011 14 1110 1001 15 1111 1000

32 ASCII CODE ASCII stands for American Standard Code for Information Interchange, is an alphanumeric code. It is 7-bit code & the number of bit patterns are 2^7 = 128. Used to encode both the uppercase & lowercase characters of the alphabet, some special symbols & 10 decimal digits. Extensively used for printers & terminals.

33 Binary to Gray Conversion The MSB of gray code is same as first bit of binary no. Moving from left to right, remaining bits are obtained by “EX- ORing” the adjacent pairs of binary no. Binary number= B4 B3 B2 B1 B0 Gray number= G4 G3 G2 G1 G0 then, => 0 0 = 0, 0 1 = 1, 1 0 = 1, 1 1 = 0 G4= B4 G3= B4 B3 G2= B3 B2 G1= B2 B1 G0= B1 B0 + + + + G3 B2 B4B3 G4G2G1G0 B1 B0 + + + +

34 Binary to Gray Conversion Ex: Convert [10101101] 2 to its Gray code. Solution: 1010110110101101 1111101111111011 + Binary Gray ++++++

35 Gray to Binary Conversion The MSB of binary code is same as first bit of gray code. Add by EX-OR method, each generated binary digit with gray digit in the next adjacent position. B4 = G4 B3 = B4 G3 B2 = B3 G2 B1 = B2 G1 B0 = B1 G0 G3 B2B4B3 G4 G2G1G0 B1B0 + + + +

36 Gray to Binary Conversion Ex: Convert [10101101] G to its binary number. Solution: 1010110110101101 1100100111001001 +++++++ Binary Gray

37 BINARY ARITHMETIC Binary Addition Binary Subtraction Binary Multiplication Binary division

38 Binary Addition The rules for binary addition are: 0+0=0, 0+1=1, 1+0=1, 1+1=0 w/c 1 Example: 1) 1 0 + 0 1 -------- 1 1 (no carry) 2) 1 1 + 0 1 -------- 1 0 0 ( 1 + 1 = 0 carry 1 to next column, then again 1 + 1 is 0 carry 1 to next column)

39 Binary Subtraction The rules for binary subtraction are: 0-0=0, 0-1=1w/b 1, 1-0=1, 1-1=0 Example: 100 - 001 ------- 011 0 -1 = 1; with borrow of 1 from next column 0 -1(borrow) - 0 = 1, with borrow of 1 1 - 1(borrow) - 0 = 0. Answer = 011.

40 Binary Multiplication The rules for binary multiplication are: 0×0=0, 0×1=0, 1×0=0, 1×1=1 Example: Multiply 100 by 101 1 0 0 × 1 0 1 --------- 1 0 0 + 0 0 0 X + 1 0 0 X X ----------------- 1 0 1 0 0 Therefore, 100 × 101 = 10100

41 Binary Division Long division procedures similar to those in decimals are used. Example : Divide 101101 by 110 1 1 0 ) 1 0 1 1 0 1 ( 1 1 1. 1 1 1 0 --------------------- 1 0 1 0 1 1 0 ----------------------- 1 0 0 1 1 1 0 ----------------------- 1 1 0 ------------------------ 0 0 0 Therefore, 101101 ÷ 110 = 111.1

42 BCD ADDITION Rules for addition of 2 BCD numbers are: 1) Add the 2 numbers using the rules for binary addition. 2) If a four bit number is equal to or less than 9, it is a valid BCD number. 3) If a 4-bit sum is greater than 9, or if a carry-out of the group is generated, it is an invalid result. Then add 6 (0110) 2 to the four bit sum in order to skip the six invalid states. 4) If a carry results, when 6 is added, add the carry to the next 4- bit group.

43 BCD ADDITION Example: 0 0 0 1 1 0 + 0 1 1 0 1 0 0 0 1 0 0 0 ------------------------------------------ 1 0 0 0 0 0 0 0 1 1 1 0 +1 1 0 0 1 1 0 ------------------------------------------ 1 0 0 0 0 1 1 1 0 1 0 0 ------------- (874) 10

44 BCD SUBTRACTION Rules for subtraction of 2 BCD numbers are: 1) Subtract the 2 numbers using the rules for binary subtraction. 2) If a four bit number is equal to or less than 9, it is a valid BCD number. 3) if a borrow is taken from other four bit code, it is an invalid result. Then subtract 6 (0110) 2 to the four bit result in order to skip the six invalid states. 4) If a borrow results, when 6 is subtracted, subtract the borrow to the next 4-bit group.

45 BCD SUBTRACTION Example: 1 0 0 0 0 1 1 0 0 1 0 0 - 0 0 1 0 1 0 0 1 0 0 1 1 ------------------------------------------ 0 1 0 1 1 1 0 1 0 0 0 1 -1 1 0 ------------------------------------------ 0 1 0 1 0 1 1 1 0 0 0 1 ------------- (571) 10


Download ppt "Introduction to signals The signals are broadly classified into two categories: 1. Analog Signals. 2. Digital signals."

Similar presentations


Ads by Google