Presentation is loading. Please wait.

Presentation is loading. Please wait.

Logic Gates. Transistors as Switches ¡V BB voltage controls whether the transistor conducts in a common base configuration. ¡Logic circuits can be built.

Similar presentations


Presentation on theme: "Logic Gates. Transistors as Switches ¡V BB voltage controls whether the transistor conducts in a common base configuration. ¡Logic circuits can be built."— Presentation transcript:

1 Logic Gates

2 Transistors as Switches ¡V BB voltage controls whether the transistor conducts in a common base configuration. ¡Logic circuits can be built

3 AND ¡In order for current to flow, both switches must be closed ¤Logic notation A B = C (Sometimes AB = C) ABC

4 OR ¡Current flows if either switch is closed ¤Logic notation A + B = C ABC

5 Properties of AND and OR ¡Commutation ¤A + B = B + A ¤A B = B A Same as

6 Properties of AND and OR ¡Associative Property ¤A + (B + C) = (A + B) + C ¤A (B C) = (A B) C =

7 Properties of AND and OR ¡Distributive Property ¤A + B C = (A + B) (A + C) ¤A + B C ABCQ

8 Distributive Property ¡(A + B) (A + C) ABCQ

9 Binary Addition ABSC(arry) Notice that the carry results are the same as AND C = A B

10 Inversion (NOT) AQ Logic:

11 Exclusive OR (XOR) Either A or B, but not both This is sometimes called the inequality detector, because the result will be 0 when the inputs are the same and 1 when they are different. The truth table is the same as for S on Binary Addition. S = A B ABS

12 Getting the XOR ABS Two ways of getting S = 1

13 Circuit for XOR Accumulating our results: Binary addition is the result of XOR plus AND

14 Half Adder Called a half adder because we havent allowed for any carry bit on input. In elementary addition of numbers, we always need to allow for a carry from one column to the next (plus a carry)

15 Full Adder INPUTSOUTPUTS ABC IN C OUT S

16 Full Adder Circuit

17 Chaining the Full Adder Possible to use the same scheme for subtraction by noting that A – B = A + (-B)

18 Binary Counting Use 1 for ON Use 0 for OFF = Binary Counter So our example has = = 43

19 Counting in Binary

20 NAND (NOT AND) ABQ

21 NOR (NOT OR) ABQ

22 Exclusive NOR ABQ Equality Detector

23 Summary Summary for all 2-input gates InputsOutput of each gate A B ANDNAND OR NORXORXNOR

24 Number Systems ¡Decimal (base 10) { } ¤Place value gives a logarithmic representation of the number ¤Ex means ۞ 4 X 10 3 = 4000 ۞ 3 X 10 2 = 300 ۞ 7 X 10 1 = 70 ۞ 8 X 10 0 = 8 ¤The place also gives the exponent of the base

25 Example ¡432, Powers of ten: 10 0 = = = = = =

26 Binary (base 2) {0 1} BinaryDecimal

27 Example

28 Decimal Equivalent ¡ X 2 7 = X 2 6 = X 2 5 = X 2 4 = X 2 3 = X 2 2 = X 2 1 = X 2 0 = Notice how powers of two stand out: 2 0 = = = = 1000

29 Decimal to Binary Conversion ¡Ex. 575 ¤Find the largest power of two less than the number ۞ 2 9 = 512 ¤Subtract that power of two from the number ۞ 575 – 512 = 63 ¤Repeat steps 1 and 2 for the new result until you reach zero. ۞ 2 5 = – 32 = 31 ۞ 2 4 = – 16 = 15 ۞ 2 3 = 8 15 – 8 = 7 ۞ 2 2 = 4 7 – 4 = 3 ۞ 2 1 = 2 3 – 2 = 1 ۞ 2 0 = 1 1 – 1 = 0 ¤Construct the number ۞

30 Another Example ¡144 ¤2 7 = – 128 = 16 ¤2 4 = – 16 = 0 ¡Result

31 Hexadecimal (base 16) ¡ { A B C D E F} ¡ Assignments DecHexDecHex A 3311B 4412C 5513D 6614E 7715F

32 Example B 6 E 3 X 16 3 = X 16 2 = X 16 1 = X 16 0 =

33 Hexadecimal is Convenient for Binary Conversion BinaryHexBinaryHex A B C D E F Nibble

34 Binary to Hex Conversion ¡ Group binary number by fours (nibbles) ¤ ¡Convert each nibble into hex equivalent ¤ D 9 6

35 Decimal to Hex Conversion ¡ Ex. 284 ¤16 2 = – 256 = 28 ¤16 1 = = 12 (Hex C) ¤Result 1 1 C

36 Another Example with an Extension ¡ 1054 ¤16 2 = 256 ۞ But we have several multiples of 256 in 1054 –1054/256 = 4.12 take integer part –This eliminates 4*256 = 1024 ۞ 1054 – 1024 = 30 ¤16 1 = – 16 = 14 (Hex E) ¤Result 4 1 E


Download ppt "Logic Gates. Transistors as Switches ¡V BB voltage controls whether the transistor conducts in a common base configuration. ¡Logic circuits can be built."

Similar presentations


Ads by Google