Sunteți pe pagina 1din 2

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Copyright © The McGraw-Hill Companies, Inc.

ght © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Building Functions from Logic Gates


We've already seen how to implement truth tables
using AND, OR, and NOT -- an example of
combinational logic.

Complex Combinational Combinational Logic Circuit


• output depends only on the current inputs
Logic Blocks • Stateless
ECE/CS 252, Fall 2010
Prof. Mikko Lipasti Quick review + example
Department of Electrical and Computer Engineering Then examples of some useful combinational circuits
University of Wisconsin – Madison

3-2

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Review: Building AND/OR/NOT Logic Circuit Decoder


Can implement ANY truth table with AND, OR, NOT. n inputs, 2n outputs
A B C D • exactly one output is 1 for each possible input pattern
0 0 0 0
0 0 1 0 1. AND combinations
that yield a "1" in the
0 1 0 1
truth table.
0 1 1 0
1 0 0 0
1 0 1 1 2. OR the results
2-bit
1 1 0 0 of the AND gates. decoder
1 1 1 0

3-3 3-4

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Example:
s1
7-Segment Display Decoder Full Adder
s2
s4
s3 Add two bits and carry-in,
s5 s6
produce one-bit sum and carry-out. A B Cin S Cout
s7

A B C D s1 s2 s3 s4 s5 s6 s7 0 0 0 0 0
0 0 0 0 1 1 1 0 1 1 1 0000 0 0 1 1 0
0 0 0 1 0 0 1 0 0 1 0 A 0001
0010 s5 0 1 0 1 0
der

0 0 1 0 1 0 1 1 1 0 1 B 0011
0100
0 1 1 0 1
4:16 Decod

C 0101
0 0 1 1 1 0 1 1 0 1 1 0110
0 1 0 0 0 1 1 1 0 1 0 D 0111 1 0 0 1 0
1000
1001
0 1 0 1 1 1 0 1 0 1 1 1010 1 0 1 0 1
1011
0 1 1 0 1 1 0 1 1 1 1 1100 1 1 0 0 1
1101
0 1 1 1 1 0 1 0 0 1 0 1110
1111 1 1 1 1 1
1 0 0 0 1 1 1 1 1 1 1
1 0 0 1 1 1 1 1 0 1 1

3-5 3-6

1
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Four-bit Ripple-Carry Adder Multiplexer (MUX)


n-bit selector and 2n inputs, one output
• output equals one of the inputs, depending on selector

4-to-1 MUX

3-7 3-8

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

LC-3 Arithmetic/Logic Unit (ALU) Summary


Building AND/OR/NOT Logic Functions
Left Operand Right Operand
Useful Complex Logic Blocks
Decoder
16-bit Adder 16-bit AND 16-bit NOT Full Adder
Ripple-carry
Ripple carry Adder
Multiplexer

Mux ctrl: LC-3 Arithmetic-Logic Unit (ALU)


00 – Add
01 – AND
10 – NOT
Result 11 – N/A
3-9 3-10

S-ar putea să vă placă și