Professional Documents
Culture Documents
Chapter 3 S. Dandamudi
Outline
Introduction Multiplexers and demultiplexers
Implementing logical functions Efficient implementation
Adders
Half-adders Full-adders
Comparators
2003
S. Dandamudi
Chapter 3: Page 2
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
Introduction
Combinational circuits
Output depends only on the current inputs
Multiplexers
Multiplexer
2n data inputs n selection inputs a single output
Selection input determines the input that should be connected to the output
2003 S. Dandamudi Chapter 3: Page 4
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
Multiplexers (contd)
4-data input MUX implementation
2003
S. Dandamudi
Chapter 3: Page 5
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
2003
S. Dandamudi
Chapter 3: Page 6
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
2003
S. Dandamudi
Chapter 3: Page 7
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
2003
S. Dandamudi
Chapter 3: Page 8
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
Multiplexers (contd)
Efficient implementation: Even-parity function
2003
S. Dandamudi
Chapter 3: Page 9
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
Multiplexers (contd)
74153 can used to implement two output functions
2003
S. Dandamudi
Chapter 3: Page 10
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
2003
S. Dandamudi
Chapter 3: Page 11
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
2003
S. Dandamudi
Chapter 3: Page 12
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
Decoders
Decoder selects one-out-of-N inputs
2003
S. Dandamudi
Chapter 3: Page 13
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
2003
S. Dandamudi
Chapter 3: Page 14
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
2003
S. Dandamudi
Chapter 3: Page 15
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
Encoders
Encoders
Take 2B input lines and generate a B-bit binary number on B output lines Cannot handle more than one input with 1
2003
S. Dandamudi
Chapter 3: Page 16
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
2003
S. Dandamudi
Chapter 3: Page 17
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
Comparator
Used to implement comparison operators (= , > , < , , )
2003
S. Dandamudi
Chapter 3: Page 18
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
2003
S. Dandamudi
Chapter 3: Page 19
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
2003
S. Dandamudi
Chapter 3: Page 20
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
10
Adders
Half-adder
Adds two bits
Produces a sum and carry
Full-adder
Adds three 1-bit values
Like half-adder, produces a sum and carry
Adders (contd)
2003
S. Dandamudi
Chapter 3: Page 22
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
11
2003
S. Dandamudi
Chapter 3: Page 23
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
Adders (contd)
Ripple-carry adders can be slow
Delay proportional to number of bits
...
Requires complex circuits Usually, a combination carry lookahead and ripple-carry techniques are used
2003 S. Dandamudi Chapter 3: Page 24
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
12
2003
S. Dandamudi
Chapter 3: Page 25
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
Internally uses
An AND array Each AND gate receives 2N inputs N inputs and their complements An OR array
2003 S. Dandamudi Chapter 3: Page 26
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
13
2003
S. Dandamudi
Chapter 3: Page 27
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
2003
S. Dandamudi
Chapter 3: Page 28
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
14
2003
S. Dandamudi
Chapter 3: Page 29
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
15
2003
S. Dandamudi
Chapter 3: Page 31
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
16
2003
S. Dandamudi
Chapter 3: Page 33
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
2003
S. Dandamudi
Chapter 3: Page 34
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
17
2003
S. Dandamudi
Chapter 3: Page 35
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
2003
S. Dandamudi
Chapter 3: Page 36
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
18
2003
S. Dandamudi
Chapter 3: Page 37
To be used with S. Dandamudi, Fundamentals of Computer Organization and Design, Springer, 2003.
19