1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean)...

51
1 DIGITAL ELECTRONICS

Transcript of 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean)...

Page 1: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

1

DIGITAL ELECTRONICS

Page 2: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

2

OVERVIEW

– electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary numbers.

– referred to as digital electronic circuits or logic circuits

– Digital implies that the circuits are operating on numbers or digits, and "logic" implies that the circuits carry out logical or boolean operations.

Page 3: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

3

OVERVIEW

– information processed by digital electronic circuits is in the form of electrical, binary signals.

– Signals are voltage levels, there are two possible values that they may have.

– Most common systems use voltages of less than 1 volt to represent a 0 (False, Off), and voltages in the range of 3.5 to 5 volts to represent a 1 (True, On).

Page 4: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

4

OVERVIEW

integrated circuits - chips • a number of circuits all on one device

– small-scale integrated circuits (SSI), less than 100 components

– medium-scale (MSI), up to a thousand components

– large-scale (LSI), up to a hundred thousand components

– very-large scale (VLSI), up to a million components

– super-large scale (SLSI), more than a million components

Page 5: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

5

LOGIC GATE OPERATION

– Digital circuits that are used to carry out Boolean logic operations are referred to as gates.

– They perform a set of three basic operations from which all the other circuits can be developed.

– Gates are manufactured as chips with a number of gates of a particular type on a chip.

Page 6: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

6

AND Gate

– The AND gate is a gate whose output is a 1 only if all of it's inputs are 1's. In the case of a 2-input gate as illustrated, the output C is a 1 only if both A and B are 1's.

– This is stated arithmetically as:

C = A · B

Page 7: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

7

Two Input AND Gate

Page 8: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

8

– The truth table for the gate is:

A B C0 0 00 1 01 0 01 1 1

Page 9: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

9

THE OR GATE

– The OR gate is a gate whose output is a one if any of it's inputs are one. In the case of a 2-input gate as illustrated, the output C will be a 1 if either A or B or both A and B are 1's. This is stated arithmetically as:

C = A + B

Page 10: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

10

OR Gate

Page 11: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

11

– The truth table for the OR gate is:

A B C0 0 00 1 11 0 11 1 1

Page 12: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

12

THE INVERTER (NOT GATE)

– The Inverter is a single input gate whose output is the inverse or opposite of it's input. arithmetically this is stated as:

B = A

Page 13: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

13

NOT Gate

Page 14: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

14

– The truth table of the inverter is:

A B

0 1

1 0

Page 15: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

15

THE EXCLUSIVE OR GATE

– The Exclusive OR gate is a gate whose output is a 1 if either of it's inputs is a one, but not if both of them are ones. Arithmetically this is stated as:

C = A B

Page 16: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

16

Page 17: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

17

– The truth table for the Exclusive OR gate:

A B C0 0 00 1 11 0 11 1 0

Page 18: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

18

NEGATIVE OUTPUT GATES

• There are two other major gates that are effectively created by adding an inverter to the outputs of the AND and OR gates.

Page 19: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

19

THE NAND GATE

– The NAND gate is a gate whose output is a 0 only if all of it's inputs are 1's. Arithmetically this is stated as:

C = A · B

Page 20: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

20

The NAND Gate

Page 21: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

21

– The truth table for the NAND gate:

A B C0 0 11 0 10 1 11 1 0

Page 22: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

22

THE NOR GATE

– The NOR gate is a gate whose output is a 0 if any of it's inputs are 1's. Arithmetically this is stated as:

C = A + B

Page 23: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

23

NOR Gate

Page 24: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

24

– The truth table of the NOR gate:

A B C0 0 10 1 01 0 01 1 0

Page 25: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

25

DEMORGAN'S THEOREMS

– Demorgan's theorems are very useful to us as we analyze and describe logic circuits. They simplify expressions in which the product or sum of variables is complemented.

Page 26: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

26

DEMORGAN'S THEOREMS

A . B = A + B

Page 27: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

27

DEMORGAN'S THEOREMS

A + B = A · B

Page 28: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

28

Digital Adders

• Adders are a major function of a computer.– Found in the Central Processor Unit in the Arithmetic Logic area.

Page 29: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

29

Half-Adder

A

B

Carry

Sum

Page 30: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

30

Full Adder

A

B

Carry

SumCarry In

Page 31: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

31

Decoding Circuits

• Have to be able to decode particular combinations of signals.– Used to transfer data from or to memory or peripherals.

– Need to decode the address lines to determine where the data is to go.

– Take a number of input signals and provide enough outputs to indicate what the input was.

Page 32: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

32

Decoding Circuits

• If the input is two binary signals, there would have to be four outputs.

• One output for each input combination.

Page 33: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

33

Two Bit Decoder, 74139

D0

D1

3

2

1

0

D1 D0 0 1 2 3

0 0

0 1

1 0

1 1

Page 34: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

34

Data Selector (Multiplexer)

• Combination of decoder and bus enable logic

• Used when a number of different signals have to be gated to a bus.

Page 35: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

35

Data Selector

Page 36: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

36

Data SelectorI0

I1

I2

I3

S1

S0

OUT

Page 37: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

37

Data Selector

• Above circuit would have to be repeated 32 times for a 32-bit bus.

• 74157 is example of choosing only one of two lines to be transferred with the circuit being duplicated four times on the same chip.

Page 38: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

38

FLIP-FLOPS

• Basic logic circuit used to store binary information.

• Forms basis of circuits used to create timing and counting signals.

• Foundation for memory and a major component in processor registers.

Page 39: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

39

FLIP-FLOPS• F/F remember a binary value.• Said to be “Set” when a 1 has been stored.

• Said to be “Cleared” when a 0 has been stored.

• Most often a signal, usually the computer clock signal, is used to tell F/F to store a value.

• Output from circuit is Q, sometimes its compliment is also present.

Page 40: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

40

Clocked S-R Flip-Flop

Page 41: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

41

D-TYPE FLIP-FLOP

• Simplified input.• Does not allow F/F to be set and cleared at the same time.

• Needs a clock signal to be set or cleared.

Page 42: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

42

D-TYPE FLIP-FLOP

Q

Q

D

CLK

PRE

CLR

Page 43: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

43

D-TYPE FLIP-FLP

• PRE and CLR are used to set and clear the F/F without a clock signal.

• A ‘0’ on PRE would set F/F• A ‘0’ on CLR would clear F/F

Page 44: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

44

D-TYPE FLIP-FLOP

Page 45: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

45

J-K FLIP-FLOP

Page 46: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

46

J-K FLIP-FLOP

• Differs from D and S-R F/F in following ways:– Changes state on falling edge of clock signal.

– Toggles when J and K are high.– J corresponds to S, K corresponds to R.

Page 47: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

47

REGISTERS

• Used to store binary data.• Similar to a memory location but normally in the processor.

• Consists of a number of F/F whose inputs represent the digits of a binary number.

• Data is loaded into all F/F of register simultaneously by a clock input.

Page 48: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

48

REGISTERS

Page 49: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

49

COUNTERS

• Used to count clock pulses at the clock inputs.

• How high the counter counts depends on the number of F/F in counter.

Page 50: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

50

TWO-BIT COUNTER

Page 51: 1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.

51

TWO-BIT COUNTER

1 2 3 4 5 6

F/F 1

F/F 2

01

0

01

1