Chap 3. Chap 3. Combinational Logic Design. Chap.3 2 3.1 Combinational Circuits l logic circuits for digital systems: combinational vs sequential l Combinational.

Slides:



Advertisements
Similar presentations
Logical Design.
Advertisements

Combinational Circuits
Functions and Functional Blocks
COE 202: Digital Logic Design Combinational Circuits Part 1
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 9 Programmable Configurations Read Only Memory (ROM) – –a fixed array of AND gates.
التصميم المنطقي Second Course
Overview Part 2 – Combinational Logic
DPSD This PPT Credits to : Ms. Elakya - AP / ECE.
The Map Method Boolean expressions may be simplified by algebraic means as discussed in Previous lecture However, this procedure of minimization is awkward.
08/07/041 CSE-221 Digital Logic Design (DLD) Lecture-8:
Combinational Logic Chapter 4. Digital Circuits Introduction Logic circuits for digital systems may be combinational or sequential. A combinational.
Design of Arithmetic Circuits – Adders, Subtractors, BCD adders
Combinational Logic Chapter 4.
Combinational Logic1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
EE2174: Digital Logic and Lab
Chapter 3 Combinational Logic Design
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 3 – Combinational Logic Design Part 1 –
Overview Part 1 – Design Procedure 3-1 Design Procedure
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
Logic Gates Combinational Circuits
CS 105 Digital Logic Design
Digital Logic Lecture 08 By Amr Al-Awamry. Combinational Logic 1 A combinational circuit consists of an interconnection of logic gates. Combinational.
Combinational Logic Design
Outline Analysis of Combinational Circuits Signed Number Arithmetic
Combinational Logic Chapter 4. Digital Circuits Combinational Circuits Logic circuits for digital system Combinational circuits the outputs are.
Logical Circuit Design Week 8: Arithmetic Circuits Mentor Hamiti, MSc Office ,
Dr. Ahmed El-Bialy, Dr. Sahar Fawzy Combinational Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
Combinational Logic. Outline 4.1 Introduction 4.2 Combinational Circuits 4.3 Analysis Procedure 4.4 Design Procedure 4.5 Binary Adder- Subtractor 4.6.
Combinational Logic Design BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
Chapter 4 – Arithmetic Functions and HDLs Logic and Computer Design Fundamentals.
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
Combinational Logic. Digital Circuits Introduction Logic circuits for digital systems may be combinational or sequential. A combinational circuit.
Digital System Ch4-1 Chapter 4 Combinational Logic Ping-Liang Lai ( 賴秉樑 ) Digital System 數位系統.
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
1 Combinational Logic Design Digital Computer Logic Kashif Bashir
CHAPTER 4 Combinational Logic
Unit 2 Combinational Circuits. Introduction Logic circuits for digital systems may be either combinational or sequential. A combinational circuit consists.
Logic Gates Logic gates are electronic digital circuit perform logic functions. Commonly expected logic functions are already having the corresponding.
CS 105 DIGITAL LOGIC DESIGN Chapter 4 Combinational Logic 1.
Chap 2. Combinational Logic Circuits
Fuw-Yi Yang1 數位系統 Digital Systems Department of Computer Science and Information Engineering, Chaoyang University of Technology 朝陽科技大學資工系 Speaker: Fuw-Yi.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 7 Dr. Shi Dept. of Electrical and Computer Engineering.
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
Magnitude Comparator Dr. Ahmed Telba.
1 CS 151: Digital Design Chapter 3: Combinational Logic Design 3-1Design Procedure CS 151: Digital Design.
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Combinational Circuits
CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits
1 Fundamentals of Computer Science Combinational Circuits.
Combinational Circuit Design. Digital Circuits Combinational CircuitsSequential Circuits Output is determined by current values of inputs only. Output.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
Logic Design (CE1111 ) Lecture 4 (Chapter 4) Combinational Logic Prepared by Dr. Lamiaa Elshenawy 1.
Fuw-Yi Yang1 數位系統 Digital Systems Department of Computer Science and Information Engineering, Chaoyang University of Technology 朝陽科技大學資工系 Speaker: Fuw-Yi.
Chapter 4 Combinational Logic. 4.1 Introduction   Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists.
Lecture 1 Gunjeet kaur Dronacharya group of institutions.
Chap 3. Combinational Logic Design
Combinational Logic Design&Analysis.
Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables, logic gates,
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
Chapter 4 Combinational Logic
FIGURE 4.1 Block diagram of combinational circuit
Programmable Configurations
Ch 4. Combinational logic
Chapter 3 – Combinational Logic Design
Digital System Design Combinational Logic
Overview Part 1 – Design Procedure Part 2 – Combinational Logic
Chapter-4 Combinational Logic
Digital System Design Combinational Logic
Overview of Digital Electronics
Arithmetic Circuits.
Presentation transcript:

Chap 3. Chap 3. Combinational Logic Design

Chap Combinational Circuits l logic circuits for digital systems: combinational vs sequential l Combinational Circuit (Chap 3) o outputs are determined by the present applied inputs o performs an operation, which can be specified logically by a set of Boolean expressions l Sequential Circuit (Chap 4) o logic gates + storage elements (called flip-flops) o outputs are a function of the inputs & bit values in the storage elements (state of storage elements is a function of previous inputs) o output depends on the present values of inputs & past inputs

Chap Combinational Circuits l Combinational Circuit (Fig 3.1) o consist of input/output variables, logic gates, & interconnections o n inputs: 2 n possible combinations o m outputs: circuit can be described by m Boolean expressions o logic gate transforms binary information from input to outputs Combinational Circuit

Chap Design Topics l Design Hierarchy o a circuit may be specified by a symbol showing inputs, outputs, & a description defining exactly how it operates o a circuit is composed of logic gates that are interconnected (in terms of implementation) o a single VLSI processor contains several million gates  approach divide & conquer  the circuit is broken up into pieces (blocks)

Chap Design Topics l Hierarchical Design 1. reduces the complexity required to represent the schematic diagram of a circuit 2. ends at a set of "leaves" (consisting of AND gates) 3. reuse of blocks

Chap Design Topics l Functional Blocks o predefined, reusable blocks that typically lie in the lower levels of logic design hierarchies o provide functions that are broadly useful in digital design o available for decades in MSI circuits l Computer-Aided Design o logic simulator o HDL (hardware description language) l Top-Down Design (cf) bottom up

Chap Analysis Procedure l Determining the function that the circuit implements 1) make sure that the circuit is combinational, not sequential m no feedback or storage elements 2) obtain the output Boolean functions or the truth table & interpret the operation of the circuit l Derivation of Boolean Functions o to obtain the output Boolean functions from a logic diagram 1) label all gate outputs & determine the Boolean functions for each gate 2) label the gates & find Boolean functions for each gate 3) repeat (2) until the outputs of the circuits are obtained

Chap Analysis Procedure 4 inputs, A, B, C, D; 2 outputs, F 1, F 2 T 1 = B' C; T 2 = A' B T 3 = A + T 1 = A + B' C T 4 = T 2  D = (A' B)  D = A'BD' +AD +B'D T 5 = T 2 + D = A'B + D So, F 2 = T 5 = T 2 + D = A'B + D F 1 = T 3 + T 4 = A + B'C + A'BD' +AD + B'D = A + B'C + BD' + B'D (by algebra) Ex)

Chap Analysis Procedure l Derivation of the Truth Table o a straightforward process 1) Determine no of input variables in the circuit For n inputs, list 2 n binary numbers 2) Label the outputs of selected gates 3) Obtain the truth table for the outputs of those gates 4) Proceed to obtain the truth table for the outputs of gates

Chap Analysis Procedure 3 inputs, X, Y, Z; 2 outputs C, S (00 ~ 11) C is 1 if XY, XZ, or YZ = 11; C is 0 otherwise Ex) binary adder

Chap Analysis Procedure l Logic Simulation - ViewDraw & ViewTrace

Chap Design Procedure l Procedure to design combinational circuits 1) Determine required number of inputs & outputs & assign a letter symbol to each 2) Derive the truth table 3) Obtain simplified Boolean functions for each output 4) Draw the logic diagram 5) Verify the correctness of the design l Truth Table o n input variables: 2 n binary numbers o output functions give the exact definition of comb circuit simplified by method, such as algebraic manipulation, map method, computer programs

Chap Design Procedure Ex 3.1) Design a combinational circuit with 3 inputs 1 output

Chap Design Procedure l Code Converter o a circuit that translates info from one binary code to another Ex 3.2) BCD to Excess-3 Code Converter Excess-3 code: decimal digit + 3 desirable to implementing decimal subtraction (Don't care conditions !!)

Chap Design Procedure

Chap Design Procedure o two-level AND-OR logic diagram W = A + BC + BD = A + B(C + D) X = B'C + B'D + BC'D' = B'(C + D) + BC'D' Y = CD + C'D' = (C D)' Z = D' Logic Diagram

Chap Design Procedure Ex3.3) BCD to Seven-Segment Decoder m LED (light emitting diodes), or LCD (liquid crystal display) m accept a decimal digit in BCD & generate the appropriate outputs o outputs (a, b, c, d, e, f, g) o 7 four-variable maps

Chap Decoders l Decoders o a binary code of n bits represents 2 n distinct elements o convert binary info of n coded inputs to 2 n (max) unique outputs l n-to-m-line decoders (m < 2 n ) o generate 2 n (or fewer) minterms of n input variables o 3-to-8-line decoder (3 inputs & 8 outputs)

Chap Decoders

Chap Decoders Ex) binary-to-octal conversion 2-to-4-line decoder with enable input constructed with NAND instead of AND gates operates with comp outputs and comp enable E

Chap Decoders l Decoder Expansion o combine two or more small decoder w/ enable inputs o form a larger decoder o 3-to-8-line decoder with two 2-to-4-line decoders if A 2 =0, upper is enabled; if A 2 =1, lower is enabled.

Chap Decoders l Combinational Circuit Implementation o a decoder provide 2 n minterms of n input variables o implementing a comb circuit with a decoder and OR gates requires Boolean functions are expressed as a sum of minterms Ex 3.4) a binary adder S(X,Y,Z) =  m(1,2,4,7); C(X,Y,Z) =  m(3,5,6,7)

Chap Encoders o perform the inverse operation of a decoder o 2 n (or less) input lines and n output lines o Octal-to-binary encoder A 0 = D 1 + D 3 + D 5 + D 7 ; A 1 = D 2 + D 3 + D 6 + D 7 ; A 2 = D 4 + D 5 + D 6 + D 7 ;

Chap Encoders o implemented with 3 OR gates o only one input can be active at any given time o more than 2 inputs are active  undefined !  priority for inputs l Priority Encoder o 2 or more inputs are equal to 1 at the same time, an input with the highest priority will take precedence

Chap Encoders A 1 = D 2 + D 3 A 0 = D 3 + D 1 D 2 ' V = D 0 + D 1 + D 2 + D 3

Chap Multiplexers o selects binary information from one of many input lines, and directs it to a single output line o Normally, 2 n input lines and n selection variables o 4-to-1-line multiplexer o called data selector or MUX o 2 n -to-1-line multiplexer is constructed from n-to-2 n decoder by adding 2 n input lines

Chap Multiplexers l Quadruple 2-to-1- Line Multiplexer o common selection & enable lines

Chap Multiplexers l Combinational Circuit Implementation o a decoder can be used to implement Boolean Functions by employing external OR gates o the minterms of a function are generated in a multiplexer by the circuit associated with the selection inputs o n variables with a multiplexer with n-1 selection inputs first (n-1) variables --> selection inputs remaining 1 variable --> data inputs

Chap Multiplexers Ex) F(X,Y,Z) = m(1,2,6,7) -- implemented with a 4-to-1-line multiplexer - any Boolean function of n variables can be implemented with a multiplexer with n-1 selection inputs and 2 n -1 data inputs

Chap Multiplexers Ex) F(A,B,C,D) =  m(1,3,4,11,12,13,14,15)

Chap Multiplexers l Demultiplexer o perform the inverse operation of a multiplexer o receives information from a single line and transmits it to one of 2 n possible output lines o 1-to-4-line demultiplexer m the input E has a path to all 4 outputs, selected by two selection lines S1 and S0 o a decoder with enable input is referred to as decoder /demultiplexer o identical to a 2-to-4 line decoder with enable input

Chap Binary Adders l Arithmetic Circuit o a combinational circuit for arithmetic operations such as addition, subtraction, multiplication, and division with binary numbers or decimal numbers in a binary code l Addition of 2 binary inputs, 'Half Adder‘ o 0+0=0, 0+1=1, 1+0=1, 1+1 = 10 S = X'Y + XY' = X  Y; C = XY

Chap Binary Adders l Addition of 3 binary inputs, 'Full Adder' Logic Diagram of Full Adder

Chap Binary Adders Binary Ripple Carry Adder o sum of two n-bit binary numbers in parallel o 4-bit parallel adder A = 1011, B = 0011

Chap Binary Adders l Carry Lookahead Adder o The ripple carry adder has a long circuit delay m the longest delay: 2 n + 2 gate delay  Carry Lookahead Adder m reduced delay at the price of complex hardware o a new logic hierarchy P i : propagate function G i : generate function

Chap Binary Adders Development of Carry Lookahead Adder

Chap.3 37

Chap Binary Subtraction o Subtraction o a borrow occurs into the most significant position M - N ==> M - N + 2 n ==> 2 n - (M - N + 2 n ) = N - M o 1) Subtract the subtrahend N from the minuend M 2) If no end borrow occurs, then M > N 3) If an end borrow occurs, then N-M is subtracted from 2 n & minus sign is appended to the result o Subtraction of a binary number from 2 n  "2's complement form"

Chap Binary Subtraction Ex 3.5)

Chap Binary Subtraction l Complements o 2 types: m radix complement: r's complement m diminished radix complement: (r-1)'s complement l 2's & 1's for binary numbers l 10's & 9's for decimal numbers o 1's complement of N (binary number): (2 n - 1) - N m 1's comp of ==> m 1's comp of ==>

Chap Binary Subtraction o 2's complement of N: 2 n - N for N != 0, 0 for N = 0 m add 1 to the 1's complement m 2's comp of ==> ==> m leaving all least significant 0's and the first unchanged then replacing 1's with 0's, 0's with 1's m 2's comp of ==> m 2's complement of N is 2 n – N & the complement of the complement is 2 n - (2 n -N) = N

Chap Binary Subtraction l Subtraction with Complements o (M - N) 1) add 2's comp of the subtrahend N to the minuend M M + (2 n -N) = M - N + 2 n 2) if M > N, the end cary is discarded 3) if M < N, the result is 2 n - (N - M) take the 2's complement of the sum & place a minus sign o avoid overflow problem to accomodate the sum

Chap Binary Adder-Subtractors o A - B = A + (-B) in 2's complement form  with exclusive-OR gate (B  0=B; B  1=B') adder if S = 0; subtractor if S = 1

Chap Binary Adder-Subtractors Signed Binary Numbers o sign bit: 0 for positive numbers 1 for negative numbers o -9 (=-1001) using 8 bits signed-magnitude representation: signed 1's complement representation: signed 2's complement representation: o positive numbers are identical signed-magnitude -7 ~ -1, -0, 0, 1 ~ 7 (2 zeros) signed 1's comp -7 ~ -1, -0, 0, 1 ~ 7 (2 zeros) signed 2's comp -8 ~ -1, 0, 1 ~ 7 o signed 1's comp : useful as a logical operation signed 2's comp : popular in use

Chap Binary Adder-Subtractors Signed Binary Number

Chap Binary Adder-Subtractors o Signed Binary Addition and Subtraction

Chap Binary Adder-Subtractors l Overflow

Chap Binary Multipliers o a 2-Bit by 2-Bit Binary Multiplier

Chap Binary Multipliers o a 4-Bit by 3-Bit Binary Multiplier

Chap Decimal Arithmetic l BCD Adder o binary numbers 1010 ~ 1111 need to correct o 1010, 1011, 1100, 1101, 1110, 1111 o if C = K + Z 1 Z 3 + Z 2 Z 3, add 0110 to the binary sum o to add two n decimal digits needs n BCD adders

Chap Decimal Arithmetic l Use of Complements in Decimal o 9's complement if is = o 10's complement if is = o 10's complement if is