Chap.3 3. Chap reduces the complexity required to represent the schematic diagram of a circuit Library

Similar documents
Chapter 4. Combinational Logic

Combinational Circuits

EE 8351 Digital Logic Circuits Ms.J.Jayaudhaya, ASP/EEE

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 3 DLD P VIDYA SAGAR

Combinational Logic. Prof. Wangrok Oh. Dept. of Information Communications Eng. Chungnam National University. Prof. Wangrok Oh(CNU) 1 / 93

Combinational Logic II

Combinational Logic Circuits


COMBINATIONAL LOGIC CIRCUITS

Chapter 3: part 3 Binary Subtraction

B.Tech II Year I Semester (R13) Regular Examinations December 2014 DIGITAL LOGIC DESIGN

LOGIC CIRCUITS. Kirti P_Didital Design 1

SUBJECT CODE: IT T35 DIGITAL SYSTEM DESIGN YEAR / SEM : 2 / 3

Code No: R Set No. 1

Chapter 3 Part 2 Combinational Logic Design

Code No: R Set No. 1

1. Mark the correct statement(s)

R a) Simplify the logic functions from binary to seven segment display code converter (8M) b) Simplify the following using Tabular method

QUESTION BANK FOR TEST

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC6302 DIGITAL ELECTRONICS

Code No: R Set No. 1

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-II COMBINATIONAL CIRCUITS

Injntu.com Injntu.com Injntu.com R16

Computer Sc. & IT. Digital Logic. Computer Sciencee & Information Technology. 20 Rank under AIR 100. Postal Correspondence

CONTENTS CHAPTER 1: NUMBER SYSTEM. Foreword...(vii) Preface... (ix) Acknowledgement... (xi) About the Author...(xxiii)

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE)

Objectives: 1. Design procedure. 2. Fundamental circuits. 1. Design procedure

COPYRIGHTED MATERIAL INDEX

Combinational Circuit Design

Chapter 4 Arithmetic Functions

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment

Digital Systems and Binary Numbers

Digital logic fundamentals. Question Bank. Unit I

Computer Arithmetic andveriloghdl Fundamentals


Chapter 1. Digital Systems and Binary Numbers

R10. II B. Tech I Semester, Supplementary Examinations, May

Binary Addition. Add the binary numbers and and show the equivalent decimal addition.

R07. Code No: V0423. II B. Tech II Semester, Supplementary Examinations, April

Chapter 4. Combinational Logic. Dr. Abu-Arqoub

Principles of Computer Architecture. Chapter 3: Arithmetic

KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT

END-TERM EXAMINATION

Experiment 7 Arithmetic Circuits Design and Implementation

DIGITAL SYSTEM DESIGN

Combinational Logic with MSI and LSI

SIR C.R.REDDY COLLEGE OF ENGINEERING, ELURU DEPARTMENT OF INFORMATION TECHNOLOGY LESSON PLAN

DHANALAKSHMI SRINIVASAN COLLEGE OF ENGINEERING AND TECHNOLOGY

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY CS 2202 DIGITAL PRINCIPLES AND SYSTEM DESIGN

COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING QUESTION BANK SUBJECT CODE & NAME: EC 1312 DIGITAL LOGIC CIRCUITS UNIT I

Department of Electrical and Computer Engineering University of Wisconsin - Madison. ECE/CS 352 Digital System Fundamentals.

Combinational Logic Use the Boolean Algebra and the minimization techniques to design useful circuits No feedback, no memory Just n inputs, m outputs

2008 The McGraw-Hill Companies, Inc. All rights reserved.

Number System. Introduction. Decimal Numbers

10EC33: DIGITAL ELECTRONICS QUESTION BANK

Boolean Algebra and Logic Gates

2.1 Binary Logic and Gates

Chapter 3 Part 2 Combinational Logic Design

3. The high voltage level of a digital signal in positive logic is : a) 1 b) 0 c) either 1 or 0

D I G I T A L C I R C U I T S E E

Fundamentals of Computer Systems

2. (a) Compare the characteristics of a floppy disk and a hard disk. (b) Discuss in detail memory interleaving. [8+7]

Digital Design. Verilo. and. Fundamentals. fit HDL. Joseph Cavanagh. CRC Press Taylor & Francis Group Boca Raton London New York

LOGIC DESIGN. Dr. Mahmoud Abo_elfetouh

Korea University of Technology and Education

VALLIAMMAI ENGINEERING COLLEGE

CS8803: Advanced Digital Design for Embedded Hardware

Chapter 2. Boolean Algebra and Logic Gates

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Computer Logical Organization Tutorial

R07

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

6.1 Combinational Circuits. George Boole ( ) Claude Shannon ( )

DIGITAL ELECTRONICS. P41l 3 HOURS

Hours / 100 Marks Seat No.

(ii) Simplify and implement the following SOP function using NOR gates:

Chapter 4 Arithmetic

Lecture (02) Operations on numbering systems

UNIT I BOOLEAN ALGEBRA AND COMBINATIONAL CIRCUITS PART-A (2 MARKS)

II/IV B.Tech (Regular/Supplementary) DEGREE EXAMINATION. Answer ONE question from each unit.

Department of Electrical Engineering McGill University ECSE 221 Introduction to Computer Engineering Assignment 2 Combinational Logic

VALLIAMMAI ENGINEERING COLLEGE

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING QUESTION BANK NAME OF THE SUBJECT: EE 2255 DIGITAL LOGIC CIRCUITS

SWITCHING THEORY AND LOGIC CIRCUITS

This tutorial gives a complete understanding on Computer Logical Organization starting from basic computer overview till its advanced architecture.

UNIT- V COMBINATIONAL LOGIC DESIGN

Microcomputers. Outline. Number Systems and Digital Logic Review

Principles of Digital Techniques PDT (17320) Assignment No State advantages of digital system over analog system.

Chapter Three. Digital Components

Numerical Representations On The Computer: Negative And Rational Numbers

MGU-BCA-205- Second Sem- Core VI- Fundamentals of Digital Systems- MCQ s. 2. Why the decimal number system is also called as positional number system?

DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS

CS 121 Digital Logic Design. Chapter 1. Teacher Assistant. Hadeel Al-Ateeq

IT T35 Digital system desigm y - ii /s - iii

Boolean Algebra. BME208 Logic Circuits Yalçın İŞLER


Numerical Representations On The Computer: Negative And Rational Numbers

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

MYcsvtu Notes DATA REPRESENTATION. Data Types. Complements. Fixed Point Representations. Floating Point Representations. Other Binary Codes

Binary Adders: Half Adders and Full Adders

Transcription:

3.1 Combinational Circuits 2 Chap 3. logic circuits for digital systems: combinational vs sequential Combinational Logic Design Combinational Circuit (Chap 3) outputs are determined by the present applied inputs performs an operation, which can be specified logically by a set of Boolean expressions Spring 2003 Sequential Circuit (Chap 4) logic gates + storage elements (called flip-flops) outputs are a function of the inputs & bit values in the storage elements (state of storage elements is a function of previous inputs) output depends on the present values of inputs & past inputs 3.1 Combinational Circuits 3 3.2 Design Topics 4 Combinational Circuit (Fig 3.1) Design Hierarchy consist of input/output variables, logic gates, & interconnections n inputs: 2 n possible combinations m outputs: circuit can be described by m Boolean expressions logic gate transforms binary information from input to outputs a circuit may be specified by a symbol showing inputs, outputs, & a description defining exactly how it operates n-inputs m-outputs a circuit is composed of logic gates that are interconnected (in terms of implementation) Combinational Circuit a single VLSI processor contains several million gates approach divide & conquer the circuit is broken up into pieces (blocks) Schematic: logic diagram 5 3.2 Design Topics 6 primitive blocks: NAND gates predefined blocks leaves lower level of design hierarchy reusable blocks Instance Use of blocks Focus reusable blocks Hierarchical Design fundamental blocks predefined collection of interconnected gates 1. reduces the complexity required to represent the schematic diagram of a circuit Library 2. ends at a set of "leaves" (consisting of AND gates) elementary digital components 3. reuse of blocks

3.2 Design Topics 7 8 Functional Blocks predefined, reusable blocks that typically lie in the lower levels of logic design hierarchies provide functions that are broadly useful in digital design available for decades in MSI circuits Top-Down Design functional blocks: Ch 5, Ch 6 (cf) bottom up Computer-Aided Design Schematic Capture, Library HDL (hardware description language) Verification logic simulator Logic Synthesizer Physical area, delay HDL (hardware description languages) Deacribes hardware structure and behavior VHDL (Very High Speed Integrated Circuits Hardware Description Language) Verilog : Cadence Design Systems, Inc. Feature Programming Language Parallel operation contrary to conventional serial operation Structural description Alternative to schematic: low-level description Behavioral description high-level description Logic Synthesis: RTL(Register transfer level) 9 Logic Synthesis 10 Sequence of Process Analysis Elaboration simulation initialization Testbench: describes H/W and S/W that applies input to the DUT(device under test) and analyzes the outputs for correctness. Logic Synthesis Translation Optimization technology mapping FPGA( field programmable gate array ) 3.3 Analysis Procedure for Combinational Circuit Determining the function that the circuit implements 1) make sure that the circuit is combinational, not sequential 11 no feedback or storage elements 2) obtain the output Boolean functions or the truth table & interpret the operation of the circuit Derivation of Boolean Functions to obtain the output Boolean functions from a logic diagram 1) label all gate outputs that are a function only of input variables or their complements & determine the Boolean functions for each gate 2) label the gates that are a function of input variables and previously labeled gates & find Boolean functions for each gate 3) repeat (2) until the outputs of the circuits are obtained Ex) 3.3 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(1+D) + B'C + A BD' + B'D = A+A BD +B C+B D=A+BD +B C+B D 12

3.3 Analysis Procedure 13 3.3 Analysis Procedure 14 Derivation of the Truth Table from the Logic Diagram Ex) binary adder a straightforward process 1) Determine no of input variables in the circuit For n inputs, list 2 n (0-(2 n -1)) 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 3 inputs, X, Y, Z; 2 outputs C, S (00 ~ 11) C is 1 if XY, XZ, or YZ = 11; C is 0 otherwise 3.3 Analysis Procedure 15 3.4 Design Procedure 16 Logic Simulation - ViewDraw & ViewTrace 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 Truth Table n input variables: 2 n binary numbers output functions give the exact definition of comb circuit. Output functions are simplified by method, such as algebraic manipulation, map method, computer programs 3.4 Design Procedure 17 3.4 Design Procedure 18 Ex 3.1) Design a combinational circuit with 3 inputs and 1 output Output is 1 when input is less than 3(011), otherwise 0. Code Converter 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!!)

3.4 Design Procedure 19 3.4 Design Procedure 20 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 3.4 Design Procedure 21 3.5 Decoders 22 Ex3.3) BCD to Seven-Segment Decoder LED (light emitting diodes), or LCD (liquid crystal display) accept a decimal digit in BCD & generate the appropriate outputs Decoders a binary code of n bits represents 2 n distinct elements convert binary info of n coded inputs to 2 n (max) unique outputs outputs (a, b, c, d, e, f, g) 7 four-variable maps n-to-m-line decoders (m < 2 n ) generate 2 n (or fewer) minterms of n input variables 3-to-8-line decoder (3 inputs & 8 outputs) 3.5 Decoders 23 3.5 Decoders 24 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

3.5 Decoders 25 3.5 Decoders 26 Decoder Expansion combine two or more small decoder w/ enable inputs form a larger decoder 3-to-8-line decoder with two 2-to-4-line decoders Combinational Circuit Implementation a decoder provides 2 n minterms of n input variables since Boolean functions are expressed as a sum of minterms, one can use a decoder(minterms) and OR(sum) gates n-inputs, m-outputs combi. logic : nx2 n decoder + m-or gates Ex 3.4) a binary adder S(X,Y,Z) = Σ m(1,2,4,7); C(X,Y,Z) = Σ m(3,5,6,7) if A 2 =0, upper is enabled; if A 2 =1, lower is enabled. 3.6 Encoders 27 3.6 Encoders 28 perform the inverse operation of a decoder 2 n (or less) input lines and n output lines Octal-to-binary encoder implemented with 3 4-input OR gates only one input can be active at any given time more than 2 inputs are active undefined! priority for inputs Priority Encoder 2 or more inputs are equal to 1 at the same time, an input with the highest priority will take precedence valid 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 ; 3.6 Encoders 29 3.7 Multiplexers(MUX) 30 selects binary information from one of many input lines, and directs it to a single output line Normally, 2 n input lines and n selection variables 4-to-1-line multiplexer A 1 = D 2 + D 3 V = D 0 + D 1 + D 2 + D 3 A 0 = D 3 + D 1 D 2 ' selection inputs called data selector or MUX 2 n -to-1-line multiplexer is constructed from n-to-2 n decoder by adding 2 n input lines

31 3.7 Multiplexers 32 Quadruple 2-to-1- Line Multiplexer common selection & enable lines to select multi-bits 3.7 Multiplexers 33 3.7 Multiplexers 34 Combinational Circuit Implementation a decoder can be used to implement Boolean Functions by employing external OR gates the minterms of a function are generated in a multiplexer by the circuit associated with the selection inputs n variables with a multiplexer with n-1 selection inputs Ex) F(X,Y,Z) = m(1,2,6,7) -- implemented with a 4-to-1-line multiplexer first (n-1) variables --> selection inputs remaining 1 variable --> data inputs - any Boolean function of n variables can be implemented with a multiplexer with n-1 selection inputs and 2 n-1 data inputs 3.7 Multiplexers 35 3.7 Multiplexers 36 Ex) F(A,B,C,D) = Σ m(1,3,4,11,12,13,14,15) Demultiplexer perform the inverse operation of a multiplexer receives information from a single line and transmits it to one of 2 n possible output lines 1-to-4-line demultiplexer the input E has a path to all 4 outputs, selected by two selection lines S1 and S0 a decoder with enable input is referred to as decoder /demultiplexer identical to a 2-to-4 line decoder with enable input

3.8 Binary Adders 37 3.8 Binary Adders 38 Arithmetic Circuit Addition of 3 binary inputs, 'Full Adder' a combinational circuit for arithmetic operations such as addition, subtraction, multiplication, and division with binary numbers or decimal numbers in a binary code Addition of 2 binary inputs, 'Half Adder 0+0=0, 0+1=1, 1+0=1, 1+1 = 10 S = X'Y + XY' = X Y; C = XY Logic Diagram of Full Adder Binary Ripple Carry Adder 3.8 Binary Adders sum of two n-bit binary numbers in parallel 39 c s i s i s HA c x i HA y c c i + 1 i 40 4-bit parallel adder A = 1011, B = 0011 (a) Block diagram c i s i x i y i c i + 1 (b) Detailed diagram A decomposed implementation of the full-adder circuit 3.8 Binary Adders 41 x 1 y 1 x 0 y 0 42 Carry Lookahead Adder The ripple carry adder has a long circuit delay the longest delay: (2n + 2) gate delay Carry Lookahead Adder reduced delay at the price of complex hardware c 2 g 1 p 1 c 1 g 0 p 0 c 0 a new logic hierarchy PFA : partial full adder P i : propagate function P i = A i B i G i : generate function Stage 1 Stage 0 G i = A i B i s 1 s 0 A ripple-carry adder with generate/propagate signals

Gate Delay of 4-bits 4 Ripple Carry Adder 43 x 1 y 1 x 0 y 0 44 x 0 y 0 g 1 p 1 g 0 p 0 c 0 c 2 c 1 C1 : 3 gate delay S0 : 2 C2 : 5 S1 : 4 C3 : 7 S2 : 6 C4 : 9 S3 : 8 In general, for n, Cn : 2n+1 Sn-1 : 2n s 1 Figure 5.16 The first two stages of a carry-lookahead adder s 0 3.8 Binary Adders 45 46 Development of Carry Lookahead Adder C 2 =G 1 +P1(G0+P0C0) C 3 =G2+P2(G1+P1(G0+P0C0)) =G2+P2G1+P2P1G0+P2P1P0C0 Group propagation ftn P 0-3 =P3P2P1P0 Group generate ftn G 0-3 =G3+P3G2+P3P2G1+P3P2P1G0 47 48 x 31 24 y 31 24 x 15 8 y 15 8 x 7 0 y 7 0 c 32 Block c 24 c Block 3 16 1 c 8 Block 0 c 0 s 31 24 s 15 8 s 7 0 A hierarchical carry-lookahead adder with ripple-carry between blocks

x 31 24 y 31 24 x 15 8 y 15 8 x 7 0 y 7 0 49 3.9 Binary Subtraction 50 P 3 G 3 Block 3 s 31 24 c 24 P 1 G 1 Block 1 s 15 8 P 0 G 0 Block 0 s 7 0 c 0 Subtraction M-N=10011-11110 M=Minuend N=Subtrahend 1 c 32 c 16 Second-level lookahead A hierarchical carry-lookahead adder c 8 a borrow occurs into the most significant position(end borrow occurs) M - N ==> M - N + 2 n ==> 2 n -(M-N + 2 n ) = N - M 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 Subtraction of a binary number from 2 n "2's complement form" 3.9 Binary Subtraction 51 3.9 Binary Subtraction 52 Ex 3.5) 01100100-10010110 Complements 2 types: radix complement: r's complement diminished radix complement: (r-1)'s complement 2's & 1's for binary numbers 10's & 9's for decimal numbers 1's complement of N (binary number): (2 n -1) -N 1's comp of 1011001 ==> 0100110 1's comp of 0001111 ==> 1110000 3.9 Binary Subtraction 53 3.9 Binary Subtraction 54 2's complement of N: 2 n - N for N!= 0, 0 for N = 0 add 1 to the 1's complement 2's comp of 101100 ==> 010011 + 1 ==> 010100 leaving all least significant 0's and the first unchanged then replacing 1's with 0's, 0's with 1's in all other higher significant bits 2's comp of 1101100 ==> 0010100 2's complement of N is 2 n N & the complement of the complement is 2 n -(2 n -N) = N Subtraction with Complements (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 carry is discarded 3) if M < N, the result is 2 n -(N -M) no end carry take the 2's complement of the sum & place a minus sign, i.e. -( 2 n -(2 n -(N-M))) avoid overflow problem to accomodate the sum

3.10 Binary Adder-Subtractors 55 3.10 Binary Adder-Subtractors 56 Signed Binary Numbers sign bit(=msb, most significant bit) 0 for positive numbers 1 for negative numbers -9 (=-1001) using 8 bits signed-magnitude representation: 10001001 signed 1's complement representation: 1111 0110 signed 2's complement representation: 1111 0111 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 4-bit signed binary number (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 signed 1's comp : useful as a logical operation signed 2's comp : popular in use 3.10 Binary Adder-Subtractors 57 3.10 Binary Adder-Subtractors 58 8-bits Signed Binary Addition using 2 s complement 8-bits Signed Binary subtraction using 2 s complement + Signed Binary Number 3.10 Binary Adder-Subtractors 59 Overflow Detection Logic 60 Overflow

3.11 Binary Multipliers 61 3.11 Binary Multipliers 62 a 2-Bit by 2-Bit Binary Multiplier a 4-Bit by 3-Bit Binary Multiplier B 3 B 2 B 1 B 0 x A 2 A 1 A 0 ------------------ A 0 B 3 A 0 B 2 A 0 B 1 A 0 B 0 A 1 B 3 A 1 B 2 A 1 B 1 A 1 B 0 A 2 B 3 A 2 B 2 A 2 B 1 A 2 B 0 --------------------------------- 3.12 Decimal Arithmetic (BCD Adder) 63 3.12 Decimal Arithmetic 64 0~9 ( 0000 ~ 1001), 1010, 1011, 1100, 1101, 1110, 1111. Ex) 1. 9 4 0100 + 5 + 0101 ----------- ------------- 9 1001 2. 9 9 1001 1011 + 2 + 0010 + 0110 ----------- ------------- ------------- 11 1011 = B 16 error!!!! 1 0001 = 11 BCD ok C Sum BCD Adder binary numbers 1010 ~ 1111 need to correct 1010, 1011, 1100, 1101, 1110, 1111 if C = K + Z 1 Z 3 + Z 2 Z 3, add 0110 to the binary sum to add two n decimal digits needs n BCD adders 3.12 Decimal Arithmetic Use of Complements in Decimal 9's complement if 546700 is 999999-546700 = 453299 10's complement if 546700 is 1000000-546700 = 453300 10's complement if 234500 is 765500 65 Structural Desc of 2-to2 to-4 4 Line Decoder 66 no end carry -(10 s complement of 30718) = -69282

Structural Desc of 4-to4 to-1 1 Line MUX 67 Dataflow Desc of 2-to2 to-4 4 Line Decoder 68 Dataflow Desc of 4-to4 to-1 1 Line MUX 69 Dataflow Desc of 4-to4 to-1 1 MUX 70 Structural/Dataflow Desc of 4-bits 4 Full Adder 71 Structural/Dataflow Desc of 4-bits 4 Full Adder 72

Structural/Dataflow Desc of 4-bits 4 Full Adder 73 Behavioral Desc of 4-bit 4 Full Adder 74