Computer Programming Skills Revision Prepared by: Ghader Kurdi.

Slides:



Advertisements
Similar presentations
EET 1131 Unit 5 Boolean Algebra and Reduction Techniques
Advertisements

Prof. Sin-Min Lee Department of Computer Science
Boolean Algebra and Reduction Techniques
Boolean Algebra and Combinational Logic
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapter 2 – Part 4.
Digital Fundamentals Floyd Chapter 4 Tenth Edition
EET 1131 Unit 5 Boolean Algebra and Reduction Techniques
Digital Fundamentals with PLD Programming Floyd Chapter 4
Computer Organization and Assembly Language: Chapter 7 The Karnaugh Maps September 30, 2013 By Engineer. Bilal Ahmad.
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
+ CS 325: CS Hardware and Software Organization and Architecture Exam 1: Study Guide.
Digital Logic Design Adil Waheed. BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION AND gate F = A.B OR gate F = A + B NOT gate F = A NAND gate F = A.B NOR gate.
Boolean Algebra and Logic Simplification
Digital Logic and Design Vishal Jethva Lecture No. 10 svbitec.wordpress.com.
KU College of Engineering Elec 204: Digital Systems Design
1 Fundamentals of Computer Science Propositional Logic (Boolean Algebra)
Lecture 7 How computers process data (Number Systems) PRESENTED BY MD. MAHBUBUL ALAM, PHD 1.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Fundamentals of IT UNIT-I OnlyforIPMCA. DIGITAL SIGNALS & LOGIC GATES Signals and data are classified as analog or digital. Analog refers to something.
Boolean Algebra and Digital Circuits
1 Chapter 5 Karnaugh Maps Mei Yang ECG Logic Design 1.
Digital Logic Basics Chapter 2 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer, 
1 Digital Logic Design Week 5 Simplifying logic expressions.
Digital Circuits Design Chin-Sung Lin Eleanor Roosevelt High School.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
Chapter 3: Digital Logic Dr Mohamed Menacer Taibah University
Chapter 5 Boolean Algebra and Reduction Techniques 1.
CH41 Chapter 4 Boolean Algebra and Logic Simplification By Taweesak Reungpeerakul.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
Boolean Algebra and Reduction Techniques
1 EENG 2710 Chapter 2 Algebraic Methods For The Analysis and Synthesis of Logic circuits.
1 Digital Logic Design Week 5&6 cont’d Revision for Quiz 2/Exam.
ECE 3110: Introduction to Digital Systems Chapter #4 Review.
Floyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd Chapter 4 © 2008 Pearson Education.
Chapter 2 Boolean Algebra and Minimization Techniques.
Sum-of-Products (SOP)
DKT 122/3 - DIGITAL SYSTEM I Chapter 4A:Boolean Algebra and Logic Simplification) Mohd ridzuan mohd nor
Karnaugh Maps (K-Maps)
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Binary Numbers For digital systems, the.
Logic Simplification-Using K-Maps
1 3- De-Morgan’s Theorems 1.The complement of a product of variables is equal to the sum of the complements of the variables. 2. The complement of a sum.
Logic Gates Ghader Kurdi Adapted from the slides prepared by DEPARTMENT OF PREPARATORY YEAR.
Introduction to Digital Electronics Lecture 5: Function Minimisation.
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
Logic Simplification-Using Boolean Laws Logic Design Laboratory EE 2121 Lectures By Manesh T EE2121-In Charge
School of Computer and Communication Engineering, UniMAP DKT 122/3 - DIGITAL SYSTEM I Chapter 4A:Boolean Algebra and Logic Simplification) Mohd ridzuan.
DeMorgan’s Theorem DeMorgan’s 2 nd Theorem The complement of a sum of variables is equal to the product of the complemented variables. A + B = A. B Applying.
Chapter 3 Boolean Algebra and Digital Logic T103: Computer architecture, logic and information processing.
Digital Logic & Design Dr. Waseem Ikram Lecture 09.
Mu.com.lec 9. Overview Gates, latches, memories and other logic components are used to design computer systems and their subsystems Good understanding.
Dr. ClincyLecture Slide 1 CS6020- Chapter 3 (3A and ) Dr. Clincy Professor of CS First Exam - Tuesday, September 6th Coverage: All subjects up to.
EET 1131 Unit 5 Boolean Algebra and Reduction Techniques
CHAPTER 3 Simplification of Boolean Functions
DeMorgan’s Theorem DeMorgan’s 2nd Theorem
ECE 2110: Introduction to Digital Systems
ECE 3110: Introduction to Digital Systems
Boolean Algebra and Combinational Logic
Digital Logic and Design
Karnaugh Maps (K-Maps)
BASIC & COMBINATIONAL LOGIC CIRCUIT
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION Part (a)
13 Digital Logic Circuits.
ECB2212-Digital Electronics K-Map
Dr. Clincy Professor of CS
3-Variable K-map AB/C AB/C A’B’ A’B AB AB’
Analysis of Logic Circuits Example 1
Laws & Rules of Boolean Algebra
Presentation transcript:

Computer Programming Skills Revision Prepared by: Ghader Kurdi

Chapter 1 Number Systems

Contents Number Systems Number Systems Conversion Among Bases Conversion Among Bases Binary Addition and Multiplication Binary Addition and Multiplication

Number Systems SystemBaseSymbols Examples Decimal100, 1, 2, 3, 4, 5, 6, 7, 8, 9 101, 33, 108, 987 Binary20, 1 101, 1110, 10, 1, 0 Octal80, 1, 2, 3, 4, 5, 6, 7 101, 33, 777, 642 Hexa- decimal 160, 1, 2, 3, 4, 5, 6, 7, 8, 9 A, B, C, D, E, F 101, 33, 108, 1AF ABDF, 35FF, 10A

Conversion Among Bases Decimal BinaryOctalHexadecimal

Conversion Among Bases Divide the number by base and write the remainders. Continue downwards, dividing each new quotient by base and writing the remainders. Stop when the quotient is 0. Decimal BinaryOctalHexadecimal

Conversion Among Bases Start at the right Break the binary numeral into groups of three digits Replace each 3-digits binary numeral with it’s 1-digit octal equivalent Replace each octal digit with it’s 3-digits binary equivalent Combine all binary equivalent into a single binary numeral. Octal Binary Octal Binary

Conversion Among Bases Start at the right Break the binary numeral into groups of four digits Replace each 4-digits binary numeral with it’s 1-digit hexadecimal equivalent Replace each hexadecimal digit with it’s 4-digits binary equivalent Combine all binary equivalent into a single binary numeral. hexadecimal Binary hexadecimal Binary

Conversion Among Bases octal binary hexadecimal

Binary Addition and Multiplication Binary addition To add 3 or more numbers: Add the first two numbers. Add the first two numbers. Then, add the third number to the result and so on. Then, add the third number to the result and so on. Examples

Binary Addition and Multiplication Binary Multiplication To multiply 3 or more numbers: Multiply the first two numbers. Multiply the first two numbers. Then, multiply the result by the third number and so on. Then, multiply the result by the third number and so on. Example

Chapter 2 Digital Logic Design

Digital Logic Design Logic gates Logic gates Logic Functions Logic Functions Derivation of logical expressions Derivation of logical expressions sum-of-products (SOP) form sum-of-products (SOP) form product-of-sums (POS) form product-of-sums (POS) form Logical Equivalence Logical Equivalence Truth table method Truth table method Algebraic manipulation method Algebraic manipulation method Logical Expression Simplification Logical Expression Simplification Boolean Algebra Boolean Algebra Karnaugh Map Method Karnaugh Map Method

Logic gates Logic gates Logic gates AND OR NOT NAND NAND NOR NOR XOR XOR Precedence (NOT > AND > OR) Precedence (NOT > AND > OR) You must know: You must know: The function and truth table of each gate The function and truth table of each gate The graphical representation of each gate The graphical representation of each gate The logical representation of each gate The logical representation of each gate

Logic Functions Logical functions can be expressed in several ways: Logical functions can be expressed in several ways: Truth table Truth table Logical expressions Logical expressions Graphical form Graphical form You must know how to: You must know how to: Use a graphical representation to derive a logical expression. Use a graphical representation to derive a logical expression. Use a graphical representation to derive a truth table. Use a graphical representation to derive a truth table. Use a logical expression to derive a graphical representation. Use a logical expression to derive a graphical representation. Use a logical expression to derive a truth table. Use a logical expression to derive a truth table. Use a truth tables to derive a logical expression (SOP & POS) Use a truth tables to derive a logical expression (SOP & POS)

Derivation of logical expressions An SOP expression  when two or more product terms are summed by Boolean addition. An SOP expression  when two or more product terms are summed by Boolean addition. In an SOP form, a single overbar cannot extend over more than one variable In an SOP form, a single overbar cannot extend over more than one variable Example Example But not But not An POS expression  When two or more sum terms are multiplied by Boolean multiplication. In a POS form, a single overbar cannot extend over more than one variable Example But not

Derivation of logical expressions To determine the SOP expression represented by a truth table. Instructions: Step 1: List the binary values of the input variables for which the output is 1. Step 2: Convert each binary value to the corresponding product term by replacing: each 1 with the corresponding variable, and each 0 with the corresponding variable complement. Example: 1010  To determine the POS expression represented by a truth table. Instructions: Step 1: List the binary values of the input variables for which the output is 0. Step 2: Convert each binary value to the corresponding product term by replacing: each 1 with the corresponding variable complement, and each 0 with the corresponding variable. Example: 1001 

POS SOP Derivation of logical expressions from a Truth Table (example) I/PO/P ABCX There are four 1s in the output and the corresponding binary value are 011, 100, 110, and 111. There are four 0s in the output and the corresponding binary value are 000, 001, 010, and 101. There are four 0s in the output and the corresponding binary value are 000, 001, 010, and 101.

Converting SOP and POS Expressions to Truth Table Format Recall the fact: Recall the fact: An SOP expression corresponds to 1 output. An SOP expression corresponds to 1 output. Constructing a truth table: Constructing a truth table: Step 1: List all possible combinations of binary values of the variables in the expression. Step 1: List all possible combinations of binary values of the variables in the expression. Step 2: Place a 1 in the output column (X) for each binary value that makes the SOP expression a 1 and place 0 for all the remaining binary values. Step 2: Place a 1 in the output column (X) for each binary value that makes the SOP expression a 1 and place 0 for all the remaining binary values. Recall the fact: A POS expression corresponds to 0 output. Constructing a truth table: Step 1: List all possible combinations of binary values of the variables in the expression. Step 2: Place a 0 in the output column (X) for each binary value that makes the POS expression a 0 and place 1 for all the remaining binary values.

Converting SOP Expressions to Truth Table Format (example) Develop a truth table for the standard SOP expression Develop a truth table for the standard SOP expressionInputsOutput Product Term ABCX InputsOutput ABCX InputsOutput ABCX InputsOutput ABCX

Converting POS Expressions to Truth Table Format (example) Develop a truth table for the standard SOP expression Develop a truth table for the standard SOP expressionInputsOutput Product Term ABCX InputsOutput ABCX InputsOutput ABCX InputsOutput ABCX

Implementation of SOP & POS Implementation of an SOP Implementation of an SOP Implementation of a POS A B B A A B X A B B A A B

Logical Equivalence Truth table method Truth table method Derive the logical expression Derive the logical expression Derive truth tables for each expression. Derive truth tables for each expression. If both expressions yield the same output, they are equivalent. Otherwise, they are not. If both expressions yield the same output, they are equivalent. Otherwise, they are not. Algebraic manipulation method Derive the logical expressions Simplify each expression using boolean laws. If both expressions yield the same simplified expression, they are equivalent. Otherwise, they are not.

Logical Expression Simplification Boolean Algebra Need boolean identities (Laws) Need boolean identities (Laws) Start with an expression and apply Boolean laws to derive the simplest (minimum) expression possible. Start with an expression and apply Boolean laws to derive the simplest (minimum) expression possible. Karnaugh Map Method A K-map is a graphical method for simplifying Boolean expressions and, if properly used, will produce the simplest (minimum) expression possible. The size of k-map depends on the number of variables.

Simplification using Boolean Algebra

Simplification using Boolean Algebra (cont.)

Simplification using K-Map The process of simplification (minimization): The process of simplification (minimization): Mapping the expression into k-map Mapping the expression into k-map Grouping the 1s Grouping the 1s Determining the minimum SOP expression from the map Determining the minimum SOP expression from the map

Grouping the 1s (rules) 1. A group must contain either 1,2,4, or 8 cells (depending on number of variables in the expression) 2. Each cell in a group must be adjacent to one or more cells in that same group. 3. Always include the largest possible number of 1s in a group in accordance with rule Each 1 on the map must be included in at least one group. 5. The 1s already in a group can be included in another group as long as the overlapping groups include non common 1s.

ABC Cell Adjacency

CAB Simplification using K-Map (full example) The expression: Practice:

Simplification using K-Map (full example) CAB

اسأل الله لكم التوفيق والسداد أ. غدير كردي