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

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

Digital Logic Appendix A

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

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

Fundamentals of Boolean Algebra

Chapter 7 Logic Circuits

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

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

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

DIGITAL LOGIC CIRCUITS

Review for B33DV2-Digital Design. Digital Design

UNIVERSITI TENAGA NASIONAL. College of Information Technology

Systems I: Computer Organization and Architecture

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

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

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

Philadelphia University Student Name: Student Number:

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

EEE130 Digital Electronics I Lecture #4

Shift Register Counters

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 [DE/ED/EI/EJ/EN/ET/EV/EX/IC/IE/IS/IU/MU] Principles of Digital Techniques

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

Design of Sequential Circuits

This form sometimes used in logic circuit, example:

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

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

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

Adders, subtractors comparators, multipliers and other ALU elements

KUMARAGURU COLLEGE OF TECHNOLOGY COIMBATORE

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

SAU1A FUNDAMENTALS OF DIGITAL COMPUTERS

Adders, subtractors comparators, multipliers and other ALU elements

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

Combinational Logic. By : Ali Mustafa

Chapter 2 Boolean Algebra and Logic Gates

Karnaugh Maps (K-Maps)

Digital Logic (2) Boolean Algebra

Week-I. Combinational Logic & Circuits

ECE 2300 Digital Logic & Computer Organization

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

CPE100: Digital Logic Design I

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

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

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

CS 226: Digital Logic Design

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

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

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

CS61c: Representations of Combinational Logic Circuits

Number System conversions

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

CSC9R6 Computer Design. Practical Digital Logic

CHAPTER III BOOLEAN ALGEBRA

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)

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

Section 3: Combinational Logic Design. Department of Electrical Engineering, University of Waterloo. Combinational Logic

DIGITAL LOGIC CIRCUITS

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

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

CS470: Computer Architecture. AMD Quad Core

CS/COE0447: Computer Organization

ELECTRONICS & COMMUNICATION ENGINEERING PROFESSIONAL ETHICS AND HUMAN VALUES

Synchronous Sequential Logic

DIGITAL LOGIC DESIGN

Written exam with solutions IE Digital Design Friday 21/

MC9211 Computer Organization

Logic and Boolean algebra

Fundamentals of Digital Design

CHAPTER1: Digital Logic Circuits Combination Circuits

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

UNIT II COMBINATIONAL CIRCUITS:

Unit 2 Session - 6 Combinational Logic Circuits

INF2270 Spring Philipp Häfliger. Lecture 8: Superscalar CPUs, Course Summary/Repetition (1/2)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

on candidate s understanding. 7) For programming language papers, credit may be given to any other program based on equivalent concept.

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

Philadelphia University Faculty of Engineering

ELCT201: DIGITAL LOGIC DESIGN

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.

COMBINATIONAL LOGIC FUNCTIONS

Transcription:

Digital Logic Appendix A Gates Combinatorial Circuits Sequential Circuits Other operations NAND A NAND B = NOT ( A ANDB) = AB NOR A NOR B = NOT ( A ORB) = A + B Truth tables What is the result of the operation P P AND AND 1 1 P 1 Table A.1 1 1 1 1 1 1 4 George Boole ideas 1854 Claude Shannon, apply to circuit design, 1938 Describe digital circuitry function programming language Optimise given circuitry use algebra (Boolean algebra) to manipulate (Boolean) expressions into simpler expressions (piirisuunnittelu) 2 Postulates, Identities in 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 Variables: A, B, C Values: TRUE (1), FALSE () Basic logical operations: binary: AND ( ), OR (+) unary: NOT ( ) A Composite operations, equations A B = AB B + C (ja, tai, ei) precedence: NOT, AND, OR parenthesis D = A+ B C = A + (( B) C) 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 Fig. A.1 (portit) http://tech-www.informatik.uni-hamburg.de/ applets/cmos/cmosdemo.html AND Gate delay (viive) change inputs, new output available after gate delay 1 ns 1 ns (yhteenlaskupiiri, kertolaskupiiri) 3 6 Appendix A, Digital Logic 1

Functionally Complete Set Can build all basic gates ( and, or, not ) from a smaller set of gates With and, or, not (trivial!) With and, not or A + B = A B With or, not With nand alone Fig A.2 With nor Fig A.3 OR Algebraic Simplification Circuits become too large to handle Use basic identities to simplify Boolean expressions F = ABC + ABC + ABC = AB + BC = B( A + C) Fig A.5 Fig A.6 May be difficult to do How to do it automatically f = abcd + abcd + abcd + abcd Build a program to do it best + abcd + abcd + abcd + abcd 7 1 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 describe function with Boolean equations (one for each output) F = ABC + ABC + ABC describe function with truth table Table A.3 describe implementation with graphical Fig A.4 symbols for gates and wires (yhdistelmäpiirit) 8 Karnaugh Map Squares Each square represents complete input value combination canonical form: each term has each variable once adjacent squares differ only in one input value (wrap around) Square for input value combination ABCD = 11 order!! 1 11 1 AB CD: 1 11 1 1 1 11 111 11 11 11 111 1111 111 1 1 11 111 11 11 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 Karnaugh Maps Represent Boolean function (I.e., circuit) truth table in another way each square is one product in sums-of-products (SOP) presentation value is one (1) iff corresponding input values give value 1, o/w value is empty value is 1 if function value for those input values is one AB Fig A.7 CD 1 11 1 1 1 11 1 1 1 F = ABCD + ABCD + ABCD 9 12 Appendix A, Digital Logic 2

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 Example: Circuit to add 1 (mod 1) to 4-bit BCD decimal number (4) 5 = 11 11 = 6 9 = 11 = ABCD WXYZ A B C D Truth table Table A.4 W X Y Z Karnaugh maps for W, X, Y and Z Fig. A.1 16 Using Karnaugh Maps to Minimize Boolean Functions (6) Original function f = abcd + abcd + abcd + abcd + abcd + abcd + abcd + abcd Canonical form (now already there) cd Karnaugh Map 1 11 1 Find smallest number of circles, bd each with largest number of 1 s 1 1 1 ab ab 11 1 1 1 1 Select parameter combinations 1 1 1 corresponding to the circles Get reduced function f = bd + ac + ab ac 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 14 17 Impossible Input Variable Combinations What if some input combinations can never occur Mark them don t care or d treat them as or 1, whichever is best ab more room to optimize d cd 1 11 1 1 1 1 11 1 1 1 1 1 d d 1 1 Treat as Basic Combinational Circuits Building blocks for more complex circuits Multiplexer Encoders/decoder Read-Only-Memory Adder Treat as 1 f = bd + a 15 18 Appendix A, Digital Logic 3

Multiplexers (2) Select one of many possible inputs to output black box Fig A.12 simple truth table Tbl A.7 implementation Fig A.13 Each input/output line can be many parallel lines select one of three 16 bit values Fig A.14 C..15, IR..15, ALU..15 simple extension to one line selection lots of wires, plenty of gates Adders (4) 1-bit adder A=1 Carry= B= Sum=1 Carry=1 Carry=1 1-bit adder with carry A=1 B= Sum= Implementation Table A.9, Fig A.22 Build 4-bit adder from 4 1-bit adders Fig A.21 19 22 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 optimise for space, not time Example: encode 8 input wires with 3 output pins route 3 wires around the board decode 3 wires back to 8 wires at target Fig A.15 Encode Decode 2 23 Read-Only-Memory (ROM) (4) Given input values, get output value Like multiplexer, but with fixed data Consider input as address, output as contents of memory location Truth tables for a ROM Table A.8 64 bit ROM 16 words, each 4 bits wide Mem (7) = 4 Mem (11) = 14 Implementation with decoder & or gates Sequential Circuit (sarjalliset piirit) 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, memory 21 24 Appendix A, Digital Logic 4

Flip-Flop (kiikku) S-R Latch Set (1) and Reset () (n) 2 states for ( or 1, true or false) 2 outputs and complement values both always available on different pins Need to be able to change the state () Write 1: S= 1 Write : R= 1 nor (, ) = 1 nor (, 1) = nor (1, ) = nor (1, 1) = nor(,)=1 R= R = =1 S= S=1 S= S 1 nor(,1)= nor(1,1)= nor(1,)= nor(1,1)= R= R=1 R= =1 = S= S 1 nor(,)=1 25 28 S-R Flip-Flop or S-R Latch (4) (laituri) Usually both R= S= Write 1 = set S=1 for a short time = set Write = set R=1 for a short time = reset nor (, ) = 1 nor (, 1) = nor (1, ) = nor (1, 1) = R S nor 1 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 = and CLOCK write J-K Flip-Flop Toggle when J=K=1 Fig. A.27 Fig. A.28 Fig. A.26 Fig. A.29 26 29 S-R Latch Stable States (3) Registers (2) 1 bit memory (value = value of ) bi-stable, when R=S= = =1 nor (, ) = 1 nor (, 1) = nor (1, ) = nor (1, 1) = R: S: nor(,1)= nor(,)=1 nor(,)=1 nor(1,)= = =1 1 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.3 Fig. A.31 27 3 Appendix A, Digital Logic 5

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 31 Summary 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 32 -- End of Appendix A: Digital Logic -- Simple processor http://www.gamezero.com/team-/articles/math_magic/micro/stage4.html 33 Appendix A, Digital Logic 6