Presentation is loading. Please wait.

Presentation is loading. Please wait.

ELL100: INTRODUCTION TO ELECTRICAL ENGG.

Similar presentations


Presentation on theme: "ELL100: INTRODUCTION TO ELECTRICAL ENGG."— Presentation transcript:

1 ELL100: INTRODUCTION TO ELECTRICAL ENGG.
Course Instructors: J.-B. Seo, S. Srirangarajan, S.-D. Roy, and S. Janardhanan Department of Electrical Engineering, IITD

2 Number systems Decimal, Octal, Hex, binary systems
Decimal number system Octal (0,1,…,7): Base 8 = 448 = 40 = 4

3 Number systems Decimal, Octal, Hex, binary systems
Hex (0,1,…9,A, B, C,…,F): Base 16 Binary = 256 = 224

4 Most significant & least significant bit
For any number system (non-fractional part) Right most: Least significant digit/bit (LSB) Left most: Most significant digit/bit (MSB) Decimal: Binary: Hex: AE143

5 Conversion from Decimal to Base N
Divide the decimal number by N. Reminder is LSB If the quotient is not divisible, the conversion is done. Else, repeat step 1 using the quotient as a new decimal number. New reminder is the next LSB 30 1 27 13 6 3 1 16 492 16 30 2 55 2 27 2 13 2 6 2 3 480 16 54 26 12 6 2 12 ···· C 14 ···· E 1 1 1 1

6 Ones’ complement (1’s complement)
Suppose a 8-bit (binary) integer How can we express – 127? To obtain the 1’s complement of a binary number: flip all the bits : the MSB denotes the negative sign

7 One’s complement value
Bits Unsigned value One’s complement value 1 2 126 127 128 –127 129 –126 253 –2 254 –1 255 –0

8 Ones’ complement Adding two values: Align the values on the LSB Add, propagating any carry to the bit one position left. If the carry extends past the end of the word, it is said to have "wrapped around", a condition called an “end-around carry” When this occurs, the bit must be added back in at the right-most bit. 22 22 + 3 + – 0 25 1 1 22

9 Ones’ complement 6 – 19 = 19 + 3 = 19 – (-3) = 0000 0110 6 0001 0011
Subtraction uses “end-around borrow” if necessary. Subtract it from the LSB 6 – 19 = = 19 – (-3) = 6 19 19 – 3 1 25 1 1 1 –13 22

10 Two’s complement (2’s complement)
Two’s complement of an N-bit number: Its complement with respect to 2N  The two’s complement of three-bit number 010 1000 = 1000 010 110  Find one’s complement and add `1’ to the LSB = 110 – 2  No negative zero: 000 111 + 001 = 000

11 Two’s complement Decimal value Binary (2’s compl.) Two’s complement 1 2 126 127 –128 –127 –126 –2 –1

12 Two’s complement (2’s complement)
Adding two’s complement numbers requires no special processing 15 – 5 = (-5) 15 – (-5) = borrow 15 15 + – 5 – 5 10 20 Carry bit is ignored

13 Two’s complement (2’s complement)
Overflow = (-103) + (-69) = -172 104 – 103 + 45 – 69 149 If the sum of two positive numbers yields a negative result, the sum has overflowed. If the sum of two negative numbers yields a positive result, the sum has overflowed. Otherwise, the sum has not overflowed.

14 Gates Truth table Truth table
Simplest Logic Gate – also known as the complement or the invertor Truth table Simplest Logic Gate – also known as the complement or the invertor Truth table

15 Gates AND gate OR gate Truth table Truth table

16 Gates NAND gate NOR gate Truth table Truth table

17 Gates XOR Gate XNOR Truth table Truth table

18 Boolean Algebra – 1

19 Boolean Algebra – 2

20 Boolean Algebra – 2

21 Boolean Algebra – 2

22 DeMorgan’s theorem Example =

23 Logic circuit analysis

24 Karnaugh map (K-map) The sum of products (minterm)
Three-variable Karnaugh map

25 Karnaugh map (K-map) The sum of products (minterm)
Three-variable Karnaugh map

26 Karnaugh map (K-map) The sum of products (minterm)
Three-variable Karnaugh map

27 Karnaugh map (K-map) The sum of products (minterm)
Three-variable Karnaugh map

28 Karnaugh map (K-map)

29 Karnaugh map (K-map)

30 Karnaugh map (K-map)

31 Karnaugh map (K-map)

32 Karnaugh map (K-map) K-map with four variables

33 Example – 1 Design a circuit to take a 4-bit number ABCD and produce a single output Y that is true only if the input represents a prime number

34 Example – 1 Design a circuit to take a 4-bit number ABCD and produce a single output Y that is true only if the input represents a prime number or 0, and 1.

35 Example – 1 Design a circuit to take a 4-bit number ABCD and produce a single output Y that is true only if the input represents a prime number

36 Example – 1 Design a circuit to take a 4-bit number ABCD and produce a single output Y that is true only if the input represents a prime number

37 Example – 2 LED seven-segment display is used to indicate decimal digits, 0,1,…9. a f b g e c 8 9 d 6 7 4 5 2 3 1

38 Example – 2 LED seven-segment display is used to indicate decimal digits, 0,1,…9. a f b g e c 8 9 d 6 7 4 5 2 3 1

39 Example – 2 LED seven-segment display is used to indicate decimal digits, 0,1,…9. a f b g e c 8 9 d 6 7 4 5 2 3 1

40 Example – 2 1 1 1 1 1 1 x x x x x x 1 1 Don’t care condition

41 Example – 2 1 1 1 1 1 1 x x x x x x 1 1

42 Example – 2

43 Karnaugh map (K-map) The sum of products (minterm)
The product of sums (maxterm) (_ _ _) + (_ _) + (_ _ _ ) (_ + _ + _)(_ + _)(_ + _ + _ ) Minterm Maxterm

44 Karnaugh map (K-map)

45 Karnaugh map (K-map) To convert a Boolean function F from SoP to PoS
Find in SoP form Find in PoS form

46 Karnaugh map (K-map)

47 Karnaugh map (K-map)

48 Karnaugh map (K-map)

49 Karnaugh map (K-map)

50 Karnaugh map (K-map)

51 Karnaugh map (K-map)

52 Karnaugh map (K-map)

53 Karnaugh map (K-map)

54 Karnaugh map (K-map)

55 Karnaugh map (K-map)

56 Half-Adder

57 Full-Adder

58 Full-Adder

59 Full-Adder  Sum  Carry-out

60 Full-Adder

61 4-bit Binary Adder How can you build ? A3A2A1A0 + B3B2B1B0
S3S2S1S0 Cout, Cin How can you build ? Four 1-bit FA Or Eight 1-bit HA

62 4-bit Binary Adder How can you build ? A3A2A1A0 + B3B2B1B0
S3S2S1S0 Cout, Cin How can you build ? Four 1-bit FA Or Eight 1-bit HA

63 4-bit Binary Adder How can you build ? A3A2A1A0 + B3B2B1B0
S3S2S1S0 Cout, Cin How can you build ? Four 1-bit FA Or Eight 1-bit HA

64 4-bit Binary Adder How can you build ? A3A2A1A0 + B3B2B1B0
S3S2S1S0 Cout, Cin How can you build ? Four 1-bit FA Or Eight 1-bit HA

65 4-bit Binary Adder How can you build ? A3A2A1A0 + B3B2B1B0
S3S2S1S0 Cout, Cin How can you build ? Four 1-bit FA Or Eight 1-bit HA

66 4-bit Binary Adder How can you build ? A3A2A1A0 + B3B2B1B0
S3S2S1S0 Cout, Cin How can you build ? Four 1-bit FA Or Eight 1-bit HA

67 4-bit Binary Adder Four 1-bit FA Or Eight 1-bit HA How can you build ?
A3A2A1A0 + B3B2B1B0 S3S2S1S0 Cout, Cin How can you build ? Four 1-bit FA Or Eight 1-bit HA

68 Design a 4-bit adder that can also subtract the two numbers ?
A3A2A1A0 -/+ B3B2B1B0 Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum

69 Design a 4-bit adder that can also subtract the two numbers ?
A3A2A1A0 -/+ B3B2B1B0 Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum

70 Design a 4-bit adder that can also subtract the two numbers ?
A3A2A1A0 -/+ B3B2B1B0 Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum

71 Design a 4-bit adder that can also subtract the two numbers ?
A3A2A1A0 -/+ B3B2B1B0 Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum

72 Design a 4-bit adder that can also subtract the two numbers ?
A3A2A1A0 -/+ B3B2B1B0 Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum

73 Design a 4-bit adder that can also subtract the two numbers ?
A3A2A1A0 -/+ B3B2B1B0 Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum

74 Design a 4-bit adder that can also subtract the two numbers ?
A3A2A1A0 -/+ B3B2B1B0 Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum Select bit (M)

75 Design a 4-bit adder that can also subtract the two numbers ?
A3A2A1A0 -/+ B3B2B1B0 Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum Select bit (M) = 1  ?

76 Design a 4-bit adder that can also subtract the two numbers ?
A3A2A1A0 -/+ B3B2B1B0 Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum Select bit (M) = 1  output flips B

77 Design a 4-bit adder that can also subtract the two numbers ?
A3A2A1A0 -/+ B3B2B1B0 Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum Select bit (M) = 1  output flips B Select bit (M) = 0  output = B

78 Design a 4-bit adder that can also subtract the two numbers ?
A3A2A1A0 -/+ B3B2B1B0 Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum Select bit (M) = 1  Enable Subtract Select bit (M) = 0  Enable Add

79 Design a 4-bit adder that can also subtract the two numbers ?
A3A2A1A0 -/+ B3B2B1B0 Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum Select bit (M) = 1  Enable Subtract Select bit (M) = 0  Enable Add

80 Design a 4-bit adder that can also subtract the two numbers ?
A3A2A1A0 -/+ B3B2B1B0 Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum Select bit (M) = 1  Enable Subtract Select bit (M) = 0  Enable Add


Download ppt "ELL100: INTRODUCTION TO ELECTRICAL ENGG."

Similar presentations


Ads by Google