Every time has a value associated with it, not just some times. A variable can take on any value within a range

Similar documents
Logic Design. Chapter 2: Introduction to Logic Circuits

University of Technology

CHAPTER1: Digital Logic Circuits Combination Circuits

MC9211 Computer Organization

Chapter 2 Combinational Logic Circuits

Chapter 2 Combinational Logic Circuits

CS 121 Digital Logic Design. Chapter 2. Teacher Assistant. Hanin Abdulrahman

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

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 2 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

Combinational Logic. Review of Combinational Logic 1

Chapter 2 Boolean Algebra and Logic Gates

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

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

Chapter 2 Combinational Logic Circuits

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

Chapter 2 Boolean Algebra and Logic Gates

Chap 2. Combinational Logic Circuits

Binary Logic and Gates. Our objective is to learn how to design digital circuits.

ENG2410 Digital Design Combinational Logic Circuits

211: Computer Architecture Summer 2016

Chapter 2 Boolean Algebra and Logic Gates

Boolean Algebra & Logic Gates. By : Ali Mustafa

CS 226: Digital Logic Design

Combinational Logic Design Principles

EC-121 Digital Logic Design

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

Chapter 2: Switching Algebra and Logic Circuits

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

WEEK 2.1 BOOLEAN ALGEBRA

Digital Circuit And Logic Design I. Lecture 3

Boolean Algebra and Logic Gates

Chapter 2 Boolean Algebra and Logic Gates

ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2

Lecture 5: NAND, NOR and XOR Gates, Simplification of Algebraic Expressions

CHAPTER III BOOLEAN ALGEBRA

Lecture 2 Review on Digital Logic (Part 1)

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

Boolean Algebra, Gates and Circuits

Number System conversions

EECS Variable Logic Functions

CSC9R6 Computer Design. Practical Digital Logic

Chapter 2 (Lect 2) Canonical and Standard Forms. Standard Form. Other Logic Operators Logic Gates. Sum of Minterms Product of Maxterms

Review for Test 1 : Ch1 5

Functions. Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways:

Week-I. Combinational Logic & Circuits

Systems I: Computer Organization and Architecture

In Module 3, we have learned about Exclusive OR (XOR) gate. Boolean Expression AB + A B = Y also A B = Y. Logic Gate. Truth table

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

UC Berkeley College of Engineering, EECS Department CS61C: Representations of Combinational Logic Circuits

Chapter 2. Boolean Algebra and Logic Gates

Switches: basic element of physical implementations

EEA051 - Digital Logic 數位邏輯 吳俊興高雄大學資訊工程學系. September 2004

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

CS61c: Representations of Combinational Logic Circuits

UNIVERSITI TENAGA NASIONAL. College of Information Technology

Digital Logic (2) Boolean Algebra

XOR - XNOR Gates. The graphic symbol and truth table of XOR gate is shown in the figure.

Gate-Level Minimization

CHAPTER III BOOLEAN ALGEBRA

Unit 8A Computer Organization. Boolean Logic and Gates

Review: Additional Boolean operations

Combinational Logic. By : Ali Mustafa

Digital Logic. Lecture 5 - Chapter 2. Outline. Other Logic Gates and their uses. Other Logic Operations. CS 2420 Husain Gholoom - lecturer Page 1

Chapter 2: Boolean Algebra and Logic Gates

Contents. Chapter 2 Digital Circuits Page 1 of 30

Binary Logic and Gates

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

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Logic Gate Level. Part 2

Ex: Boolean expression for majority function F = A'BC + AB'C + ABC ' + ABC.

Chapter 7 Logic Circuits

L2: Combinational Logic Design (Construction and Boolean Algebra)

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

Slide Set 3. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Computer Organization: Boolean Logic

Chapter 2 Combinational Logic Circuits

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS

Signals and Systems Digital Logic System

2 Application of Boolean Algebra Theorems (15 Points - graded for completion only)

ELCT201: DIGITAL LOGIC DESIGN

Combinational logic. Possible logic functions of two variables. Minimal set of functions. Cost of different logic functions.

CHAPTER 2 BOOLEAN ALGEBRA

Part 1: Digital Logic and Gates. Analog vs. Digital waveforms. The digital advantage. In real life...

Lecture A: Logic Design and Gates

Chapter 2 Combinational Logic Circuits

of Digital Electronics

ECE 545 Digital System Design with VHDL Lecture 1. Digital Logic Refresher Part A Combinational Logic Building Blocks

Unit 2 Boolean Algebra

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

Computer Organization I

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

Circuits & Boolean algebra.

EEE130 Digital Electronics I Lecture #4

Chapter-2 BOOLEAN ALGEBRA

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

BOOLEAN ALGEBRA TRUTH TABLE

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

Combinatorial Logic Design Principles

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

Logic and Computer Design Fundamentals. Chapter 2 Combinational Logic Circuits. Part 1 Gate Circuits and Boolean Equations

Transcription:

Digital Logic Circuits Binary Logic and Gates Logic Simulation Boolean Algebra NAND/NOR and XOR gates Decoder fundamentals Half Adder, Full Adder, Ripple Carry Adder

Analog vs Digital Analog Continuous» Time Every time has a value associated with it, not just some times» Magnitude» e.g. A variable can take on any value within a range temperature, voltage, current, weight, length, brightness, color

Digital Systems Digital vs. Analog Waveforms +5 +5 V T ime V T ime 5 5 Digital: only assumes discrete values Analog: values vary over a broad range continuously

Quantization

Analog vs Digital Digital Discontinuous» Time (discretized) The variable is only defined at certain times» Magnitude (quantized)» e.g. The variable can only take on values from a finite set Switch position, digital logic, Dow-Jones Industrial, lottery, batting-average

Analog to Digital A Continuous Signal is Sampled at Some Time and Converted to a Quantized Representation of its Magnitude at that Time Samples are usually taken at regular intervals and controlled by a clock signal The magnitude of the signal is stored as a sequence of binary valued (,) bits according to some encoding scheme

Digital to Analog A Binary Valued, B = {, }, Code Word can be Converted to its Analog Value Output of D/A Usually Passed Through Analog Low Pass Filter to Approximate a Continuous Signal Many Applications Construct a Signal Digitally and then D/A e.g., RF Transmitters, Signal Generators

Digital is Ubiquitous Electronic Circuits based on Digital Principles are Widely Used Automotive Engine/Speed Controllers Microwave Oven Controllers Heating Duct Controls Digital Watches Cellular Phones Video Games

Why Digital? Increased Noise Immunity Reliable Inexpensive Programmable Easy to Compute Nonlinear Functions Reproducible Small

Digital Design Process Computer Aided Design Tools Design entry Synthesis Verification and simulation Physical design Fabrication Testing

Definition

Representations for combinational logic Truth tables Graphical (logic gates) Algebraic equations (Boolean) Exclusive-or (XOR,( EXOR, not-equivalence, ring-or OR) Algebraic symbol: Gate symbol:

Boolean algebra & logic circuits

Representations of a Digital Design Truth Tables tabulate all possible input combinations and their associated output values Example: half adder adds two binary digits to form Sum and Carry Example: full adder adds two binary digits and Carry in to form Sum and Carry Out A B Sum Carry NOTE: plus is with a carry of in binary A B C in S um C out

Representations of Digital Design: Boolean Algebra values:, variables: A, B, C,..., X, Y, Z operations: NOT, AND, OR,... NOT X is written as X X AND Y is written as X & Y, or sometimes X Y X OR Y is written as X + Y Deriving Boolean equations from truth tables: A B Sum Carry Sum = A B + A B OR'd together product terms for each truth table row where the function is if input variable is, it appears in complemented form; if, it appears uncomplemented Carry = A B

Representations of a Digital Representations of a Digital Design: Boolean Algebra Design: Boolean Algebra A B Cin Sum Cout Another example: Sum = A B Cin + A B Cin + A B Cin + A B Cin Cout = A B Cin + A B Cin + A B Cin + A B Cin

Gate Representations of a Digital Design most widely used primitive building block in digital system design Standard Logic Gate Representation Inverter A Half Adder Schematic AND Net SUM OR B Net 2 CARR Y Net: electrically connected collection of wires Netlist: tabulation of gate inputs & outputs and the nets they are connected to

Design methodology

Top-down vs. bottom-up design

Analysis procedures

Schematic for 4 Bit ALU Inverto r AN D Gate EXO R Gate OR Gate

Simulation of 4 Bit ALU A B S 4 4 2 D if S= then D=B A if S= then D=A B if S=2 then D=A+B if S=3 then D= A

Elementary Binary Logic Functions Digital circuits represent information using two voltage levels. binary variables are used to denote these values by convention, the values are called and and we often think of them as meaning True and False Functions of binary variables are called logic functions. AND(A,B) = if A= and B=, else it is zero.» AND is generally written in the shorthand A B (or A&B or A B) OR(A,B) = if A= or B=, else it is zero.» OR is generally written in the shorthand form A+B (or A B or A B) NOT(A) = if A= else it is zero.» NOT is generally written in the shorthand form A (or A or A ) AND, OR and NOT can be used to express all other logic functions.

Two Variable Binary Logic Functions A B ZERO ONE A B A B AND NAND OR NOR EXOR Can make similar truth tables for 3 variable or 4 variable functions, but gets big (256 & 65,536 columns). EQUAL Representing functions in terms of AND, OR, NOT. NAND(A,B) = (A B) EXOR(A,B) = (A B) + (A B ) Α Β Β Α (Α Β) (Β Α)

Basic Logic Gates AND Gate OR Gate Inverter X Y X Y X Y X+Y X X Timing Diagram X Y X Y X+Y X Logic gates compute elementary binary functions. output of an AND gate is when both of its inputs are, otherwise the output is zero similarly for OR gate and inverter Timing diagram shows how output values change over time as input values change

Multivariable Gates 3 input AND Gate A B C A B C 6 input OR Gate A C B D E F A+B+C+D+E+F AND function on n variables is if and only if ALL its arguments are. n input AND gate output is if all inputs are OR function on n variables is if and only if at least one of its arguments is. n input OR gate output is if any inputs are Can construct large gates from 2 input gates. however, large gates can be less expensive than required number of 2 input gates

Elements of Boolean Algebra Boolean algebra defines rules for manipulating symbolic binary logic expressions. a symbolic binary logic expression consists of binary variables and the operators AND, OR and NOT (e.g. A+B C ) The possible values for any Boolean expression can be tabulated in a truth table. Can define circuit for expression by combining gates. A B C A+B C A B C B C A+B C

Schematic Capture & Logic Simulation wires terminals gates advance simulation signal waveforms schematic entry tools signal names

Boolean Functions to Logic Circuits Any Boolean expression can be converted to a logic circuit made up of AND, OR and NOT gates. step : step 2: step 3: add parentheses to expression to fully define order of operations - A+( +(B (C )) create gate for last operation in expression gate s output is value of expression gate s inputs are expressions combined by operation A A+B C (B (C )) repeat for sub-expressions and continue until done Number of simple gates needed to implement expression equals number of operations in expression. so, simpler equivalent expression yields less expensive circuit Boolean algebra provides rules for simplifying expressions

Basic Identities of Boolean Algebra. X + = X 3. X + = 5. X + X = X 7. X + X = 9. (X ) = X. X + Y = Y + X 2. X+( +(Y+Z ) = (X+Y )+Z 4. X(Y+Z ) = X Y + X Z 2. X = X 4. X = 6. X X = X 8. X X =. X Y = Y X 3. X (Y Z ) = (X Y ) Z 5. X+( +(Y Z ) = (X+Y ) (X+Z ) 7. (X Y) = X +Y 6. (X + Y ) = X Y Identities define intrinsic properties of Boolean algebra. Useful in simplifying Boolean expressions Note: 5-77 have no counterpart in ordinary algebra. Parallel columns illustrate duality principle. commutative associative distributive DeMorgan s

Verifying Identities Using Truth Tables XY (X + Y ) = X Y (X + Y ) X Y XYZ Y Z X+( +(Y Z ) = (X+Y ) (X+Z ) X+( +(Y Z ) X+Y X+Z (X+Y ) (X+Z ) Can verify any logical equation with small number of variables using truth tables. Break large expressions into parts, as needed.

DeMorgan s Law

DeMorgan s Laws for n Variables We can extend DeMorgan s laws to 3 variables by applying the laws for two variables. (X + Y + Z ) = (X + (Y + Z )) - by associative law = X (Y + Z ) - by DeMorgan s law = X (Y Z ) - by DeMorgan s law = X Y Z - by associative law (X Y Z) = (X (Y Z )) - by associative law = X + (Y Z ) - by DeMorgan s law = X + (Y + Z ) - by DeMorgan s law = X + Y + Z - by associative law Generalization to n variables. (X + X 2 + + X n ) = X X 2 X n (X X 2 X n ) = X + X 2 + + X n

Simplification of Boolean Expressions X Y Z F=X YZ +X YZ +XZ by identity 4 Y Z X F=X Y(Z +Z )+XZ by identity 7 X Y Z F=X Y +XZ =X Y +XZ by identity 2

The Duality Principle The dual of a Boolean expression is obtained by interchanging all ANDs s and ORs, and all s and s. example: the dual of A+( +(B C )+ is A (B+C ) The duality principle states that if E and E 2 are Boolean expressions then E = E 2 dual (E )=dual (E 2 ) where dual(e) ) is the dual of E.. For example, A+( +(B C )+ = (B C )+D A (B+C ) = (B +C ) D Consequently, the pairs of identities (,2), (3,4), (5,6), (7,8), (,), (2,3), (4,5) and (6,7) all follow from each other through the duality principle.

The Consensus Theorem Theorem. XY + X Z +YZ = XY + X Z Proof. XY + X Z +YZ = XY + X Z + YZ(X + X )) 2,7 = XY + X Z + XYZ + X YZ 4 = XY + XYZ + X Z + X YZ = XY( + Z ) + X Z( + Y ) 2,4 = XY + X Z 3,2 Example. (A + B )(A + C ) = AA + AC + A B + BC = AC + A B + BC = AC + A B Dual. (X + Y )(X + Z )(Y + Z ) = (X + Y )(X + Z )

Taking the Complement of a Function Method.. Apply DeMorgan s Theorem repeatedly. (X(Y Z + YZ )) = X + (Y Z + YZ ) = X + (Y Z ) (YZYZ ) = X + (Y + Z )(Y + Z ) Method 2.. Complement literals and take dual (X (Y Z + YZ )) = dual(x (YZ + Y Z )) = X + (Y + Z )(Y + Z )

Sum of Products Form The sum of products is one of two standard forms for Boolean expressions. sum-of-products-expression Example. X Y Z + X Z + XY + XYZ = term + term... + term term = literal literal literal literal A minterm is a term that contains every variable, in either complemented or uncomplemented form. Example. in expression above, X Y Z is minterm, but X Z is not A sum of minterms expression is a sum of products expression in which every term is a minterm Example. X Y Z + X YZ + XYZ + XYZ is sum of minterms expression that is equivalent to expression above

Product of Sums Form The product of sums is the second standard form for Boolean expressions. product-of-sums-expression = s-term s-term... s-term s-term = literal + literal + + literal Example. (X +Y +Z )(X +Z )(X+Y )(X+Y +Z ) A maxterm is a sum term that contains every variable, in complemented or uncomplemented form. Example. in exp. above, X +Y +Z is a maxterm, but X +Z is not A product of maxterms expression is a product of sums expression in which every term is a maxterm Example. (X +Y +Z )(X +Y+Z)(X+Y+Z )(X+Y+Z ) is product of maxterms expression that is equivalent to expression above

NAND Gate X Y NAND and NOR Gates (X Y) NOR Gate In certain technologies (including CMOS), a NAND (NOR) gate is simpler & faster than an AND (OR) gate. Consequently circuits are often constructed using NANDs and NORs directly, instead of ANDs and ORs. Alternative gate representations makes this easier. X Y (X+Y) = = = =

A B Exclusive Or and Odd Function AB +A B EXOR gate The EXOR function is defined by A B = AB + A B. The odd function on n variables is when an odd number of its variables are. odd(x,y,z ) = XY Z + X Y Z + X Y Z + X Y Z = X Y Z similarly for 4 or more variables Alternative Implementation A Parity checking circuits use the odd function to provide a simple integrity check to verify correctness of data. any erroneous single bit change will alter value of odd function, allowing detection of the change B

Positive and Negative Logic In positive logic systems, a high voltage is associated with a logic, and a low voltage with a logic. positive logic is just one of two conventions that can be used to associate a logic value with a voltage sometimes it is more convenient to use the opposite convention In logic diagrams that use negative logic,, a polarity indicator is used to indicate the correct logical interpretation for a signal. X Y X Y X Y X+Y Circuits commonly use a combination of positive and negative logic.

Analysis example

Truth tables from logic diagram

Logic simulation

Decoder Fundamentals Route data to one specific output line. Selection of devices, resources Code conversions. Arbitrary switching functions implements the AND plane Asserts one-of-many signal; at most one output will be asserted for any input combination

Encoding Binary Decimal Unencoded Encoded 2 3 Note: Finite state machines may be unencoded ("one-hot") or binary encoded. If the all 's state is used, then one less bit is needed and it is called modified one-hot coding.

Why Encode? A Logarithmic Relationship 8 7 6 5 Log 2 (N) 4 3 2 25 5 75 25 5 N

2:4 Decoder A B AND 2 Y E Q 3 A B AND 2 A Y E Q 2 A B AND 2 A Y E Q D D A B AND 2 B Y E Q What happens when the inputs goes from to?

2:4 Decoder with Enable A B C AND 3 Y E Q 3 A B C AND 3 A Y E Q 2 A B C AND 3 A Y E Q D D ENABLE A B C AND 3 B Y E Q

2: Multiplexer A A B Y X A B Y Y S B A B Y X2

Design synthesis procedure

Half Adder

Full Adder with EXOR, AND and OR

Full Adder with EXOR and NAND One-bit Full Adder (FA) 3 inputs: A, B, C 2 outputs: S, Co Truth table: Schematic View: cell-based approach C S A, B, C S, Co,,,,,,,,,,,,,,,,,,,,,,,, A B Co

Ripple Carry Adder