Digital Logic Appendix A

Similar documents
Boolean Algebra. Digital Logic Appendix A. Postulates, Identities in Boolean Algebra How can I manipulate expressions?

Boolean Algebra. Digital Logic Appendix A. Boolean Algebra Other operations. Boolean Algebra. Postulates, Identities in Boolean Algebra

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Sample Test Paper - I

Chapter 7 Logic Circuits

EECS150 - Digital Design Lecture 19 - Combinational Logic Circuits : A Deep Dive

DIGITAL LOGIC CIRCUITS

Reg. No. Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER Second Semester. Computer Science and Engineering

211: Computer Architecture Summer 2016

Fundamentals of Boolean Algebra

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

SIR C.R.REDDY COLLEGE OF ENGINEERING ELURU DIGITAL INTEGRATED CIRCUITS (DIC) LABORATORY MANUAL III / IV B.E. (ECE) : I - SEMESTER

DIGITAL LOGIC CIRCUITS

( c) Give logic symbol, Truth table and circuit diagram for a clocked SR flip-flop. A combinational circuit is defined by the function

UNIVERSITI TENAGA NASIONAL. College of Information Technology

Philadelphia University Student Name: Student Number:

Principles of Computer Architecture. Appendix B: Reduction of Digital Logic. Chapter Contents

COSC 243. Introduction to Logic And Combinatorial Logic. Lecture 4 - Introduction to Logic and Combinatorial Logic. COSC 243 (Computer Architecture)

Lecture 6: Manipulation of Algebraic Functions, Boolean Algebra, Karnaugh Maps


CHAPTER 7. Exercises 17/ / /2 2 0

Philadelphia University Student Name: Student Number:

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

Systems I: Computer Organization and Architecture

LOGIC CIRCUITS. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

EEE130 Digital Electronics I Lecture #4

Shift Register Counters

Review for B33DV2-Digital Design. Digital Design

Vidyalankar S.E. Sem. III [CMPN] Digital Logic Design and Analysis Prelim Question Paper Solution

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

S.Y. Diploma : Sem. III [CO/CM/IF/CD/CW] Digital Techniques

CS/COE1541: Introduction to Computer Architecture. Logic Design Review. Sangyeun Cho. Computer Science Department University of Pittsburgh

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS

This form sometimes used in logic circuit, example:

SAU1A FUNDAMENTALS OF DIGITAL COMPUTERS

Design of Sequential Circuits

Lecture A: Logic Design and Gates

DE58/DC58 LOGIC DESIGN DEC 2014

CS/COE0447: Computer Organization and Assembly Language

Propositional Logic. Logical Expressions. Logic Minimization. CNF and DNF. Algebraic Laws for Logical Expressions CSC 173

Combinational Logic Design Combinational Functions and Circuits

CS/COE0447: Computer Organization

Week-I. Combinational Logic & Circuits

S.Y. Diploma : Sem. III [DE/ED/EI/EJ/EN/ET/EV/EX/IC/IE/IS/IU/MU] Principles of Digital Techniques

KUMARAGURU COLLEGE OF TECHNOLOGY COIMBATORE

CS470: Computer Architecture. AMD Quad Core

II. COMBINATIONAL LOGIC DESIGN. - algebra defined on a set of 2 elements, {0, 1}, with binary operators multiply (AND), add (OR), and invert (NOT):

Combinational Logic. By : Ali Mustafa

Digital Logic (2) Boolean Algebra

Karnaugh Maps (K-Maps)

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING CS6201 DIGITAL PRINCIPLES AND SYSTEM DESIGN

ECE 2300 Digital Logic & Computer Organization

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

CPE100: Digital Logic Design I

Digital Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits.

CS 226: Digital Logic Design

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) State any two Boolean laws. (Any 2 laws 1 mark each)

Save from: cs. Logic design 1 st Class أستاذ المادة: د. عماد

EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits)

Ch 2. Combinational Logic. II - Combinational Logic Contemporary Logic Design 1

CPE/EE 422/522. Chapter 1 - Review of Logic Design Fundamentals. Dr. Rhonda Kay Gaede UAH. 1.1 Combinational Logic

CHAPTER III BOOLEAN ALGEBRA

Chapter 2 Boolean Algebra and Logic Gates

Outline. EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) Combinational Logic (CL) Defined

DIGITAL LOGIC CIRCUITS

Adders, subtractors comparators, multipliers and other ALU elements

CS/COE0447: Computer Organization

ELECTRONICS & COMMUNICATION ENGINEERING PROFESSIONAL ETHICS AND HUMAN VALUES

MC9211 Computer Organization

Logic and Boolean algebra

Adders, subtractors comparators, multipliers and other ALU elements

Number System conversions

Fundamentals of Digital Design

BOOLEAN ALGEBRA. Introduction. 1854: Logical algebra was published by George Boole known today as Boolean Algebra

CHAPTER1: Digital Logic Circuits Combination Circuits

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev

Unit 2 Session - 6 Combinational Logic Circuits

UNIT II COMBINATIONAL CIRCUITS:

Schedule. ECEN 301 Discussion #25 Final Review 1. Date Day Class No. 1 Dec Mon 25 Final Review. Title Chapters HW Due date. Lab Due date.

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

Why digital? Overview. Number Systems. Binary to Decimal conversion

CMPE12 - Notes chapter 1. Digital Logic. (Textbook Chapter 3)

Philadelphia University Faculty of Engineering

CSC9R6 Computer Design. Practical Digital Logic

ELCT201: DIGITAL LOGIC DESIGN

Numbers & Arithmetic. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. See: P&H Chapter , 3.2, C.5 C.

CHAPTER III BOOLEAN ALGEBRA

COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

Logic design? Transistor as a switch. Layered design approach. CS/COE1541: Introduction to Computer Architecture. Logic Design Review.

DIGITAL LOGIC DESIGN

Unit II Chapter 4:- Digital Logic Contents 4.1 Introduction... 4

ENGG 1203 Tutorial - 2 Recall Lab 2 - e.g. 4 input XOR. Parity checking (for interest) Recall : Simplification methods. Recall : Time Delay

Z = F(X) Combinational circuit. A combinational circuit can be specified either by a truth table. Truth Table

Digital Circuits. 1. Inputs & Outputs are quantized at two levels. 2. Binary arithmetic, only digits are 0 & 1. Position indicates power of 2.

Cs302 Quiz for MID TERM Exam Solved

Logic Simplification. Boolean Simplification Example. Applying Boolean Identities F = A B C + A B C + A BC + ABC. Karnaugh Maps 2/10/2009 COMP370 1

2009 Spring CS211 Digital Systems & Lab CHAPTER 2: INTRODUCTION TO LOGIC CIRCUITS

Written exam with solutions IE Digital Design Friday 21/

BER KELEY D AV IS IR VINE LOS AN GELES RIVERS IDE SAN D IEGO S AN FRANCISCO

Transcription:

Digital Logic Appendix A Boolean Algebra Gates Combinatorial Circuits Sequential Circuits 1 Boolean Algebra George Boole ideas 1854 Claude Shannon, apply to circuit design, 1938 Describe digital circuitry function programming language? Optimise given circuitry (piirisuunnittelu) use algebra (Boolean algebra) to manipulate (Boolean) expressions into simpler expressions 2 Appendix A, Digital Logic 1

Variables: A, B, C Boolean Algebra Values: TRUE (1), FALSE (0) Basic logical operations: binary: AND ( ), OR (+) unary: NOT ( ) A Composite operations, equations precedence: NOT, AND, OR parenthesis A B = AB B + C (ja, tai, ei) D = A+ B C = A + (( B) C) 3 Boolean Algebra Other operations NAND NOR Truth tables What is the result of the operation? Table A.1 A NAND B = NOT( A ANDB) = AB A NOR B = NOT( A ORB) = A + B AND 0 1 P 0 0 0 1 0 1 4 Appendix A, Digital Logic 2

Postulates, Identities in Boolean Algebra How can I manipulate expressions? Simple set of rules? Basic identities commutative laws distributive laws identity elements inverse elements associative laws DeMorgan s theorem Table A.2 (vaihdantalait) (osittelulait) (identiteetit) (vasta-alkiot) (liitäntälait) (DeMorganin laki) 5 Gates Fundamental building blocks easy to build implement basic Boolean algebra operations Combine to build more complex circuits memory, adder, multiplier 1-3 inputs, 1 output Gate delay Fig. A.1 AND (portit) (yhteenlaskupiiri, kertolaskupiiri) (viive) change inputs, new output available after gate delay 6 Appendix A, Digital Logic 3

Functionally Complete Set Can build all basic gates (and, or, not) from a smaller set of gates and, or, not (trivial!) and, not OR? A + B = A B or, not nand nor Fig A.2 Fig A.3 OR 7 Combinational Circuits (3) Interconnected set of gates change input, wait for gate delays, new output Output is Boolean function of input signals m (binary, Boolean) inputs n (binary, Boolean) outputs Described in three ways Boolean equations (one for each output) F = ABC + ABC + ABC truth table Table A.3 graphical symbols describe implementation with gates and wires (yhdistelmäpiirit) Fig A.4 8 Appendix A, Digital Logic 4

Simplify Presentation (and Implementation) (3) Boolean equations Sum of products form (SOP) F = ABC + ABC + ABC Product of sums form (POS) F = ( A+ B + C) ( A + B + C) ( A + B + C) ( A + B + ( A + B + Which presentation is better? Fewer gates? Smaller area on chip? Smaller circuit delay? Faster? Fig A.4 Boolean algebra Fig A.5 9 Algebraic Simplification Circuits become too large to handle? Use basic identities to simplify Boolean expressions F = ABC + ABC + ABC = AB + BC = B( A + C) May be difficult to do How to do it automatically? Build a program to do it best? Fig A.5 Fig A.6 10 Appendix A, Digital Logic 5

Karnaugh Map Squares Each square represents complete input value combination (canonical form) adjacent squares differ only in one input value (wrap around) Square for input value combination ABCD = 1001 order!! 00 01 11 10 AB CD: 00 0000 0001 0011 0010 01 0100 0101 0111 0110 11 1100 1101 1111 1110 10 1000 1001 1011 1010 11 Karnaugh Maps Represent Boolean function (I.e., circuit) truth table in another way Fig A.7 each square is one product in sums-ofproducts (SOP) presentation value is one (1) iff corresponding input values give value 1 value is function value for those input values AB CD 00 01 11 10 00 1 01 11 1 10 1 F = ABCD + ABCD + ABCD 12 Appendix A, Digital Logic 6

Karnaugh Map Simplification Starting point: Adjacent squares differ only in one input variable value 1 1 Adjacent squares have value 1 C C Input values differ only in one variable Value of that variable is irrelevant (when all other input variables are fixed to corresponding values for those squares) Can ignore that variable for those expressions 13 Using Karnaugh Maps to Minimize Boolean Functions (6) Original function Canonical form (now already there) Karnaugh Map Find smallest number of circles, each with largest number of 1 s ab f = abcd + abcd + abcd + abcd + abcd + abcd + abcd + abcd 00 cd 00 01 11 10 bd 01 1 1 11 1 1 1 1 Select parameter combinations 10 1 1 corresponding to the circles Get reduced function f = bd + ac + ab ac ab 14 Appendix A, Digital Logic 7

Impossible Input Variable Combinations What if some input combinations can never occur? Mark them don t care or d treat them as 0 or 1, whichever is best more room to optimize ab 00 d cd 00 01 11 10 01 1 1 11 1 1 1 1 10 d d 1 1 Treat as 0 Treat as 1 f = bd + a 15 Example: Circuit to add 1 (mod 10) to 4-bit BCD decimal number (4) 5 = 0101 9 = 1001? 0110 = 6 0000 = 0 ABCD WXYZ A B C D? W X Y Z Truth table? Table A.4 Karnaugh maps for W, X, Y and Z? Fig. A.10 16 Appendix A, Digital Logic 8

uine-mckluskey Method Another method to minimise Boolean expressions Why? Karnaugh maps become complex with 6 input variables uine-mckluskey method tabular method automatically suitable for programming details skipped 17 Basic Combinational Circuits Building blocks for more complex circuits Multiplexer Encoders/decoder Read-Only-Memory Adder 18 Appendix A, Digital Logic 9

Multiplexers (2) Select one of many possible inputs to output black box simple truth table implementation Fig A.12 Fig A.13 Each input line can be many parallel lines select one of three 16 bit values Tbl A.7 C 0..15, IR 0..15, ALU 0..15 simple extension to one line selection Fig A.14 19 Encoders/Decoders Only one of many Encoder input or Decoder output lines can be 1 Encode the line number as output hopefully less pins (wires) needed this way Example: encode 8 input wires with 3 output pins route 3 wires around the board decode 3 wires back to Fig A.15 8 wires at target Encode Decode 20 Appendix A, Digital Logic 10

Read-Only-Memory (ROM) (4) Given input values, get output value Consider input as address, output as contents of memory location Truth tables for a ROM 64 bit ROM 16 words, each 4 bits wide Table A.8 Mem (7) =?4 Mem (11) = 14? Implementation with decoder & or gates 21 Adders (4) 1-bit adder A=1? B=0 Carry=1 1-bit adder with carry A=1? B=0 Carry=0 Sum=1 Carry=1 Sum=0 Implementation Table A.9, Fig A.22 Build 4-bit adder from 4 1-bit adders Fig A.21 22 Appendix A, Digital Logic 11

Sequential Circuit Circuit has (modifiable) internal state Output of circuit depends (also) on internal state not only from current inputs output = f(input, state) new state = f(input, state) Processor control, registers (sarjalliset piirit) 23 Flip-Flop (kiikku) 2 states for (0 or 1, true or false) 2 outputs complement values and both always available on different pins Need to be able to change the state ()? 24 Appendix A, Digital Logic 12

S-R Flip-Flop or S-R Latch (4) (laituri) Usually both 0 R=0 S=0? Write 1 = set S=1 for a short time = set Write 0 = set R=1 for a short time = reset 1 0 nor (0, 0) = 1 nor (0, 1) = 0 nor (1, 0) = 0 nor (1, 1) = 0 R S nor 25 S-R Latch Stable States (3) 1 bit memory (value = value of ) bi-stable, when R=S=0 =0? =1? R: 0 nor(0,1)=0 nor(0,0)=1 =0 =1 nor (0, 0) = 1 nor (0, 1) = 0 nor (1, 0) = 0 nor (1, 1) = 0 S: 0 nor(0,0)=1 nor(1,0)=0 1 0 26 Appendix A, Digital Logic 13

S-R Latch Set (1) and Reset (0) (n) Write 1: S=0 1 0 R=0 R nor(0,0)=1 =0 =1 S=0 S=1 S=0 S 1 0 nor(0,1)=0 nor(1,1)=0 Write 0: R=0 1 0 nor (0, 0) = 1 nor (0, 1) = 0 nor (1, 0) = 0 nor (1, 1) = 0 R=0 R=1 R=0 S=0 S nor(1,0)=0 nor(1,1)=0 nor(0,0)=1 =1 =0 0 1 27 Clocked Flip-Flops State change can happen only when clock is 1 more control on state changes Clocked S-R Flip-Flop D Flip-Flop only one input D D = 1 and CLOCK write 1 D = 0 and CLOCK write 0 J-K Flip-Flop Toggle when J=K=1 Fig. A.27 Fig. A.28 Fig. A.26 Fig. A.29 28 Appendix A, Digital Logic 14

Registers (2) Parallel registers read/write CPU user registers additional internal registers Shift Registers shifts data 1 bit to the right serial to parallel? ALU operation? rotate? Fig. A.30 Fig. A.31 29 Counters (4) Add 1 to stored counter value Counter parallel register plus increment circuits Ripple counter asynchronous increment least significant bit, and handle carry bit as far as needed Synchronous counter modify all counter flip-flops simultaneously faster, more complex, more expensive 30 Appendix A, Digital Logic 15

Summary Boolean Algebra Gates Circuits can implement all with NANDs or NORs simplify circuits: Karnaugh, uine-mckluskey Components for CPU design ROM, adder multiplexer, encoder/decoder flip-flop, register, shift register, counter 31 -- End of Appendix A: Digital Logic -- Simple processor http://www.gamezero.com/team-0/articles/math_magic/micro/stage4.html 32 Appendix A, Digital Logic 16