Digital Logic Review: Part II

Slides:



Advertisements
Similar presentations
BOOLEAN ALGEBRA. A Mathematical notation used to represent the function of the Digital circuit. A notation that allows variables & constants to have only.
Advertisements

Digital Circuits.
ECE 238L Computer Logic Design Spring 2010
1 CK Cheng CSE Dept. UC San Diego CS 140, Lecture 2 Combinational Logic.
Boolean Algebra and Logic Gate
Relationship Between Basic Operation of Boolean and Basic Logic Gate The basic construction of a logical circuit is gates Gate is an electronic circuit.
1 Digital Logic
EET 1131 Unit 5 Boolean Algebra and Reduction Techniques
Lecture 3. Boolean Algebra, Logic Gates
+ CS 325: CS Hardware and Software Organization and Architecture Exam 1: Study Guide.
Chapter 2: Boolean Algebra and Logic Functions
Boolean Algebra ‘An algebra of Logic’ Prepared by: Manish Kumar, Asst Master (Comp. Sc.) Sainik School Gopalganj.
Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.
1 Fundamentals of Computer Science Propositional Logic (Boolean Algebra)
Binary Logic and Gates Binary variables take on one of two values.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary.
Boolean Algebra and Digital Circuits
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC. K-Map (1)  Karnaugh Mapping is used to minimize the number of logic gates that are required in a digital circuit.
ECE 331 – Digital System Design
Computer Science 210 Computer Organization Introduction to Boolean Algebra.
1 Binary Codes Digital systems use 2-state devices that understand only 2 binary values (0 and 1). But we communicate using various symbols and methods.
Chapter 4 Combinational Logic Design Principles. Overview Objectives -Define combinational logic circuit -Analysis of logic circuits (to describe what.
Minimisation ENEL111. Minimisation Last Lecture  Sum of products  Boolean algebra This Lecture  Karnaugh maps  Some more examples of algebra and truth.
Unit 1 Minimization Techniques and Logic Gates. Introduction to Digital Systems Analog devices and systems process time-varying signals that can take.
ECE 301 – Digital Electronics Basic Logic Operations, Boolean Expressions, and Boolean Algebra (Lecture #3)
ENG241 Digital Design Week #2 Combinational Logic Circuits.
Computer Arithmetic, K-maps Prof. Sin-Min Lee Department of Computer Science.
KFUPM COE 202: Digital Logic Design Combinational Logic Part 1 Courtesy of Dr. Ahmad Almulhem.
In1200/04-PDS 1 TU-Delft Digital Logic. in1200/04-PDS 2 TU-Delft Unit of Information l Computers consist of digital (binary) circuits l Unit of information:
Computer Systems 1 Fundamentals of Computing Simplifying Boolean Expressions.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
Lecture 4 Boolean Algebra. Logical Statements °A proposition that may or may not be true: Today is Monday Today is Sunday It is raining °Compound Statements.
BOOLEAN ALGEBRA Kamrul Ahsan Teacher of
Boolean Algebra & Logic Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
Conversion from one number base to another Binary arithmetic Equation simplification DeMorgan’s Laws Conversion to/from SOP/POS Reading equations from.
BOOLEAN ALGEBRA – Digital Circuit 1 Choopan Rattanapoka.
Logic Gates Digital Electronics.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
THE K-MAP.
KARNAUGH MAP A Karnaugh map (K Map) is a pictorial method used to minimize boolean expressions without having to use boolean algebra theorems and equation.
Ahmad Almulhem, KFUPM 2009 COE 202: Digital Logic Design Combinational Logic Part 1 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 4 Dr. Shi Dept. of Electrical and Computer Engineering.
Digital Logic (Karnaugh Map). Karnaugh Maps Karnaugh maps (K-maps) are graphical representations of boolean functions. One map cell corresponds to a row.
ECE DIGITAL LOGIC LECTURE 6: BOOLEAN ALGEBRA Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 02/01/2016.
DE MORGAN’S THEOREM. De Morgan’s Theorem De Morgan’s Theorem.
Function Simplification. Outline  Function Simplification  Algebraic Simplification  Half Adder  Introduction to K-maps  Venn Diagrams.
Boolean Algebra.
1 Binary Signals Logic gate circuits are designed to input and output only two types of signals: “high” (1) and “low” (0), as represented by a variable.
K-maps and Decoders Prof. Sin-Min Lee Department of Computer Science.
EET 1131 Unit 5 Boolean Algebra and Reduction Techniques
CHAPTER 3 Simplification of Boolean Functions
Chapter 11 (Part 1): Boolean Algebra
De Morgan’s Theorem,.
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
DeMorgan’s Theorem DeMorgan’s 2nd Theorem
Basic Digital Logic Systems
Boolean Algebra and Combinational Logic
Week 3 Logic will get you from A to B. Imagination will take you everywhere. Albert Einstein.
COE 202: Digital Logic Design Combinational Logic Part 1
BASIC & COMBINATIONAL LOGIC CIRCUIT
Fundamentals of Computer Systems
ECE 352 Digital System Fundamentals
BOOLEAN ALGEBRA.
Laws & Rules of Boolean Algebra
Chapter 4 Combinational Logic Design Principles. Overview Objectives -Define combinational logic circuit -Analysis of logic circuits (to describe what.
Week 3 Logic will get you from A to B. Imagination will take you everywhere. Albert Einstein.
Digital Systems Section 3 Boolean Algebra. Digital Systems Section 3 Boolean Algebra.
Presentation transcript:

Digital Logic Review: Part II ECE511: Digital System & Microprocessor

What we will learn in this session: Negative number representation: 2’s Complement method. Minimizing Boolean expressions: K-map Boolean algebra. Comparison between Active High, and Active Low signals.

2’s Complement Representation

2’s Complement Used by M68k to represent negative numbers. Advantages: Simple representation, conversion method. Can perform arithmetic operations directly. Can use existing circuits. MSB regarded as sign bit. If 0, then positive number. If 1, then negative number. Max value for 8-bits  -128 to 127

2’s Complement +34 (decimal) 00100010 -54 (decimal) 11001010 Value Sign bit Value Sign bit

Converting to 2’s Complement 1. Start with positive number 10 (decimal) = 00001010 (binary) 2. Invert all the bits 00001010 (invert) 11110101 3. Add 1 to inverted result 11110101 + 1 11110110 2’s Complement (-10)

Converting 2’s Complement Back Converting -5 to 5: 1. The 2’s complement representation: -5 (decimal) = 11111011 (binary) 2. Invert all the bits 11111011 (invert) 00000100 3. Add 1 to inverted result 00000100 + 1 00000101 Positive value (+5)

Max Value  +127 1 1 1 1 1 1 1 Sign bit Value -127 = 10000001

Min Value  -128 1 Sign bit Value +128 = ???

What about zero? Sign bit Value invert 1 1 1 1 1 1 1 1 +1 Sign bit Value invert 1 1 1 1 1 1 1 1 +1 1 carried out, not counted.

Calculating the Maximum Range Calculated using the following formula: -(2n-1)< x < +(2n-1-1) Where n is number of bits.

Example: Calculating 2’s Complement Range What is the range for 32-bit in 2’s complement representation? n = 32 -(232-1+1) < x < 232-1 -2,147,483,649 < x < 2,147,483,648

Active High vs. Active Low

Active High and Active Low Some signals are active lows. They are active when they are low. Marked with bar:

Active High and Active Low 5 V is ACTIVE 0 V is INACTIVE Active Low 5 V is INACTIVE 0 V is ACTIVE TRUE FALSE TRUE FALSE

Why are active low signals preferred in control? More noise immunity: All electronic circuits affected by noise. Less likely to false trigger. Not affected by voltage surge.

Noise Immunity Example: Resets system when active (pulled high). + = False Triggering, system reset accidentally. 5V 5V 5V + = 0V 0V 0V Signal Noise New Signal

Noise Immunity Example: Resets system when active (pulled low). + = No effect, since RESET is active low. 5V 5V 5V + = 0V 0V 0V Signal Noise New Signal

Noise Immunity Example: Reads from memory when low, writes to memory when high. False Triggering, memory contents will be lost. 5V 5V 5V + = 0V 0V 0V Signal Noise New Signal

Noise Immunity Example: Reads from memory when high, writes to memory when low. No data lost even when false triggering occurred. 5V 5V 5V + = 0V 0V 0V Signal Noise New Signal

Logic Minimization

Importance of Minimization In electronics, we want: Functionality – desired objective. Minimal circuit area – wafers, board space. Minimal cost – more IC, more $$$. Maximum reliability – more components, more fail. Logic minimization + good design achieves all this. 2 popular methods: Boolan Algebra. Karnaugh Map.

Boolean Algebra

Boolean Algebra Named after George Boole. Based on set theory and algebra. Application to electronics – C. Shannon. Application to computers: J. V. Atanasoff. Important in computer emergence.

Boolean Identities Set of fundamental rules: Defines Boolean behaviors. Mathematics and Set Theory. Used for minimization. No set guideline for minimization: When to use what. Depends on luck, experience. Better to use K-Map.

Boolean Identities Identity Law Dominance Law Idempotent Law Inverse Law Commutative Law Associative Law Distributive Law Absorption Law De Morgan Law Double Complement Law *You don’t have to memorize all these, you just have to know about them. Just use K-Map for minimization.

Identity Law + Dominance Law 1x = x 0 + x = x 0x = 0 1 + x = 1

Idempotent Law + Inverse Law xx = x x + x = x xx = 0 x + x = x

Commutative Law + Associative Law xy = yx x + y = y + x (xy)z = x(yz) (x + y) + z = x + (y + z)

Distributive Law x + yz = (x + y) (x + z) x(y + z) = xy + xz

Absorption Law x (x + y) = x x + xy = x

Double Complement Law x = x

De Morgan’s Law A . B = A + B A + B = A . B A . B A + B . = + A + B + = .

De Morgan’s Law A . B = A + B A + B = A . B A . B A + B . = + A + B + = .

Example 1 Z = ABC + ABC + ABC Z = ABC + B(AC + AC) Z = ABC + BC(A + A) Minimize: Z = ABC + ABC + ABC Z = ABC + ABC + ABC Z = ABC + B(AC + AC) Z = ABC + BC(A + A) Z = ABC + BC Distributive Law Distributive Law Inverse Law

What if… Z = ABC + ABC + ABC Z = A(BC + BC) + ABC Minimize: Z = ABC + ABC + ABC Z = ABC + ABC + ABC Distributive Law Z = A(BC + BC) + ABC Stuck here… * Can never get the answer!

Karnaugh Map

Karnaugh Maps To simplify Boolean expressions. Invented by Maurice Karnaugh. Simpler than Boolean Algebra. Principles: Group together common factors. Delete unwanted variables. Works best for two to four variables.

Table Layout – 2 Variables 1 B A

Table Layout – 3 Variables 11 01 00 10 C AB 1

Table Layout – 4 Variables 11 01 00 10 CD AB

How to Construct the K-Map Analyze function, create Truth Table (TT). Draw K-Map based on no. of variables. Fill the K-Map with values from TT. Group 1’s together. Extract simplified expression.

× Rules √ 1. You must not miss any 1’s. 11 01 00 10 CD AB 1 × √ 1. You must not miss any 1’s. 2. You can go right-left or up-down, but you cannot go diagonal.

× Rules √ 3. You can only have 1, 2, 4, 8, …, 2n elements in a group. 11 01 00 10 CD AB 1 √ 3. You can only have 1, 2, 4, 8, …, 2n elements in a group. 11 01 00 10 CD AB 1 ×

× Rules √ 4. Try to cover all 1’s using the minimum number of groups. 11 01 00 10 CD AB 1 4. Try to cover all 1’s using the minimum number of groups. . √ 11 01 00 10 CD AB 1 × 2 groups 6 groups

Rules √ √ √ 5. Overlapping groups are allowed. AB AB CD CD 11 01 00 10 1 5. Overlapping groups are allowed. √ 11 01 00 10 CD AB 1 √ √

Rules √ √ 6. Wrap-around is allowed. CD AB CD AB Corner wrap Side wrap 11 01 00 10 CD AB 1 11 01 00 10 CD AB 1 √ √ Corner wrap Side wrap

Rules 11 01 00 10 CD AB 1 √ Top-down wrap

× Rules √ 6. Don’t cares (X) can be grouped with 1’s if they help. CD 11 01 00 10 CD AB X 1 11 01 00 10 CD AB X 1 × √ Don’t cares can help make the group larger (1 group). Not selecting don’t cares (2 groups)

Extracting the Results *All AB cancel out, only C and D are left. AB 00 01 11 10 AB 00 CD 00 01 11 10 00 1 1 1 1 01 CD 11 1 1 10 1 1 AB *A and D cancel out, only B and C are left. Answer: 01 11 11 CD 10

Example Minimize this logic equation:

Solution A B C Z 1

Solution AB 00 01 11 10 1 1 1 C 1 1 1 1 Values of Z (from TT)

Solution AB 00 01 11 10 1 1 1 C 1 1 1 1

Solution 11 01 00 10 C AB 1

Example 1 Z = ABC + BC C Minimize: Z = ABC + ABC + ABC AB 11 01 00 10 C A B C Z 1 Truth Table: Z = ABC + BC

Example 2 Minimize: Z = ABCD + ABCD + ABCD + ABCD B C D Z 1 A 1 A Truth Table:

Example 2 11 01 00 10 CD AB 1 Z = ACD + ABCD + ABCD

Conclusion

Conclusion Active low signals are active when they are low. 2’s Complement represents negative numbers in µP. Boolean Logic and K-Map minimize equations. K-Map simpler, less errors. Both should have same answers.

The End Please read: http://computerscience.jbpub.com/ecoa/2e/Null03.pdf http://en.wikipedia.org/wiki/Two's_complement http://en.wikipedia.org/wiki/Active_low. http://www.ee.surrey.ac.uk/Projects/Labview/minimisation/karnaugh.html