CSI-2111 Computer Architecture Ipage 2-1 2. Revision  Objective : To examine basic concepts of: –2.1 Numbering Systems –2.2 Binary Numbers –2.3 Boolean.

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Logical Systems Synthesis.
Chapter 2 Logic Circuits.
Computer ArchitectureFall 2008 © August 25, CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (1)
1 CSE 20: Lecture 7 Boolean Algebra CK Cheng 4/21/2011.
+ CS 325: CS Hardware and Software Organization and Architecture Exam 1: Study Guide.
CS 105 Digital Logic Design
Boolean Algebra and Logic Simplification. Boolean Addition & Multiplication Boolean Addition performed by OR gate Sum Term describes Boolean Addition.
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.
Chapter 2: Boolean Algebra and Logic Functions
ES 244: Digital Logic Design Chapter 1 Chapter 1: Introduction Uchechukwu Ofoegbu Temple University.
CSI-2111 Structure of Computers Ipage 4-1 1X Karnaugh Maps and Circuits v Objective: To know how to simplify switching functions by Karnaugh maps,
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
1 COMBINATIONAL LOGIC One or more digital signal inputs One or more digital signal outputs Outputs are only functions of current input values (ideal) plus.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
 Seattle Pacific University EE Logic System DesignSOP-POS-1 The Connection: Truth Tables to Functions abcF abcF
F = ∑m(1,4,5,6,7) F = A’B’C+ (AB’C’+AB’C) + (ABC’+ABC) Use X’ + X = 1.
1 CMSC 250 Chapter 1, con't., Combinatorial circuits.
Computer Organization 1 Logic Gates and Adders. Propositions –Venn Diagrams.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Course contents Chapter 1 - section 1.6 Chapter 2 - all sections Chapter – 4.7, and 4.12 Chapter , Chapter 6 - all sections.
Digital Electronics Lecture 6 Combinational Logic Circuit Design.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Logic Gates Logic gates are electronic digital circuit perform logic functions. Commonly expected logic functions are already having the corresponding.
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
1 EG 32 Digital Electronics Thought for the day You learn from your mistakes..... So make as many as you can and you will eventually know everything.
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Computer Arithmetic, K-maps Prof. Sin-Min Lee Department of Computer Science.
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
1 EENG 2710 Chapter 2 Algebraic Methods For The Analysis and Synthesis of Logic circuits.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
Lecture 4 Introduction to Boolean Algebra. Binary Operators In the following descriptions, we will let A and B be Boolean variables and define a set of.
Module 5.  In Module 3, you have learned the concept of Boolean Algebra which consists of binary variables and binary operator.  A binary variable x,
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
1 Fundamentals of Computer Science Combinational Circuits.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 4 Dr. Shi Dept. of Electrical and Computer Engineering.
CSI-2111 Structure of Computers Ipage Combinational Circuits  Objectives : To recognize the principal types of combinational circuits  Adders.
Review. Boolean Algebra.
Number Representation (Part 2) Computer Architecture (Fall 2006)
ELECTRICAL ENGINEERING: PRINCIPLES AND APPLICATIONS, Third Edition, by Allan R. Hambley, ©2005 Pearson Education, Inc. Chapter 7 Logic Circuits.
DE MORGAN’S THEOREM. De Morgan’s Theorem De Morgan’s Theorem.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
1 CS 352 Introduction to Logic Design Lecture 1 Ahmed Ezzat Number Systems and Boolean Algebra, Ch-1 + Ch-2.
CSE 461. Binary Logic Binary logic consists of binary variables and logical operations. Variables are designated by letters such as A, B, C, x, y, z etc.
©2010 Cengage Learning SLIDES FOR CHAPTER 4 APPLICATIONS OF BOOLEAN ALGEBRA MINTERM AND MAXTERM EXPANSIONS Click the mouse to move to the next page. Use.
UNIT 4 APPLICATIONS OF BOOLEAN ALGEBRA MINTERM AND MAXTERM EXPANSIONS Click the mouse to move to the next page. Use the ESC key to exit this chapter. This.
Digital Logic Circuits, Digital Component and Data Representation Course: BCA-2 nd Sem Subject: Computer Organization And Architecture Unit-1 1.
Digital Circuits Design Chin-Sung Lin Eleanor Roosevelt High School.
1 CMSC 250 Circuits. 2 CMSC 250 Find Boolean formula for: p, q & r are the variables. pqroutput
Hoda Roodaki Boolean Algebra Hoda Roodaki
De Morgan’s Theorem,.
Chapter 2: Boolean Algebra and Logic Functions
Boolean Algebra & De Morgan's Theorems
CHAPTER 1 : INTRODUCTION
Princess Sumaya University
ECE 331 – Digital System Design
CSE 311 Foundations of Computing I
Boolean Algebra.
Digital Electronics & Logic Design
Lecture 14: Boolean Algebra
CSE 370 – Winter Combinational Logic - 1
ELL100: INTRODUCTION TO ELECTRICAL ENGG.
Combinatorial Logic Circuit
January 19 W’05 Yutao He 4532B Boelter Hall CSM51A/EEM16-Sec.1 W’05
Chapter 2 Introduction to Logic Circuits
COMS 361 Computer Organization
Logic Circuits I Lecture 3.
CSE 370 – Winter Number syst.; Logic functions- 1
Presentation transcript:

CSI-2111 Computer Architecture Ipage Revision  Objective : To examine basic concepts of: –2.1 Numbering Systems –2.2 Binary Numbers –2.3 Boolean Algebra –2.4 Logic Gates –2.5 Adders –2.6 Timing Diagram

CSI-2111 Computer Architecture Ipage Number System (base B)  Number is represented in terms of Positional Weighting:  ( N ) B = d n-1 B n-1 + d n-2 B n d 1 B 1 + d 0 B 0 · d -1 B d -m B -m Integral Part. Fractional Part B = base d k = digit in position k, -m ≤ k ≤ n-1 B k = weight of position k, -m ≤ k ≤ n-1 n = number of integral digits in N m = number of fractional digits in N

CSI-2111 Computer Architecture Ipage 2-3 The most known systems  B = 10 (Decimal) digits : (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)  B = 2(Binary) digits: (0, 1)  B = 8(Octal) digits: (0, 1, 2, 3, 4, 5, 6, 7)  B = 16(Hexadecimal) digits: (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F)

CSI-2111 Computer Architecture Ipage 2-4 Conversions (I)  How to convert from one number system to the other (change of base B )?  Algorithm 1: –favorable for conversions to the decimal system (N 1 ) A  (N 2 ) 10

CSI-2111 Computer Architecture Ipage 2-5 Conversions (II)  Algorithm 2: Use of successive divisions and multiplications –favorable for conversions from the decimal system (N 1 ) 10  (N 2 ) B (34.625) 10  (?) 2

CSI-2111 Computer Architecture Ipage 2-6 Conversions (II) - Example (34.625) 10  ( ) 2 Integral Part: Fractional Part: 34 ÷ 2 = 17r x 2 = ÷ 2 = 8r x 2 =0.5 8 ÷ 2 = 4r 00.5 x 2 =1 4 ÷ 2 = 2r 0 2 ÷ 2 = 1r 0 1 ÷ 2 = 0r 1

CSI-2111 Computer Architecture Ipage 2-7 Binary  Hexadecimal  Binary  Hexadecimal –Form groups of 4 bits starting at binary point. –Each group of 4 bits represents a hexadecimal digit.  Hexadecimal  Binary –Convert each hexadecimal digit to its binary equivalent (4 bits).

CSI-2111 Computer Architecture Ipage 2-8 Binary  Octal  Binary  Octal –Form groups of 3 bits starting at binary point. –Each group of 3 bits represents an octal digit.  Octal  Binary –Convert each octal digit to its binary equivalent (3 bits).

CSI-2111 Computer Architecture Ipage Binary Numbers  Fixed Point Representation. –(N) 2 has an implicit binary point in a fixed position. –Notion of complement : Complement(d) = (Base - 1) - d

CSI-2111 Computer Architecture Ipage 2-10 Complements of Binary Numbers  1’s Complement : (1CF)  2’s Complement : (2CF)  2’s Complement of = ?

CSI-2111 Computer Architecture Ipage 2-11 Unsigned Binary Integers (UBI)  N is represented in terms of positional weighting: 0 ≤ N ≤ 2 n – 1 d n-1 d n-2 d n-3... d 2 d 1 d 0  No sign  N = ( ) 2(7.4) = (?) 10 –Word of 11 digits –Fixed point representation, with 4 digits for the fractional part

CSI-2111 Computer Architecture Ipage 2-12 Signed Binary Integers  3 ways of representing ± N with n bits: –Sign-Magnitude Form (SMF) –1’s Complement Form(1CF) –2’s Complement Form(2CF)

CSI-2111 Computer Architecture Ipage 2-13 Comparison of SMF, 1CF, and 2CF Sign Magnitude / 2’s Complement / 1’s Complement (4 bits word length) BinarySMF2CF1CF

CSI-2111 Computer Architecture Ipage 2-14 Binary Addition (by complement)  The bit sign is treated like any other bit (they are added!)  The subtraction is performed by addition; the negative numbers are treated like numbers to add.  Addition by 1CF  Addition by 2CF

CSI-2111 Computer Architecture Ipage 2-15 Overflow  An overflow occurs when the operands have the same sign and the result has a sign different from that of the operands.  Ex ; 4 bits word; SMF (-2)1 010

CSI-2111 Computer Architecture Ipage Boolean Algebra  Two elements: 0 and 1  Elementary operators: {AND, OR, NOT}  Representation and algebraic simplification of Boolean functions and their realization using logic gates will be studied.

CSI-2111 Computer Architecture Ipage 2-17 Boolean Functions & Truth Tables  Any Boolean function defined over n variables, each taking a Boolean constant value (0 or 1).  The Truth Table represents the function f, with all 2 n combinations of 1’s and 0’s of its variables.  Each Boolean function is defined by its truth table and is represented by inter- connected logic gates.

CSI-2111 Computer Architecture Ipage 2-18 Functions and Logic Gates

CSI-2111 Computer Architecture Ipage 2-19 Laws of Boolean Algebra  Together with –Postulates (or axioms) –Theorems  Manipulations (proof) –Algebraic –Tabular  Simplifications –Algebraic

CSI-2111 Computer Architecture Ipage 2-20 Proofs and Simplifications  Algebraic Proofs  Tabular Proofs  Algebraic Simplifications

CSI-2111 Computer Architecture Ipage 2-21 Examples *  Algebraic Proof: (A B’) + B = A + B = B + (A B’) ( Commutative, OR ) = (B + A) (B + B’) (Distributive, OR) = (B + A) (1) (Complementation, OR) = (B + A) ( Identity Element, AND ) = A + B( Commutative, OR )

CSI-2111 Computer Architecture Ipage 2-22 Examples *  Proof by Truth Table: (A B’) + B = A + B A B (A B’) + B A + B

CSI-2111 Computer Architecture Ipage 2-23 Examples *  Algebraic Simplification Example: f(ABC) = AC’ + A’B + A’B’C’ = ? = AC’ + A’B + A’BC’ + A’B’C’(Absorption, OR) = AC’ + A’B + A’C’ (B + B’)(Distributive, AND) = AC’ + A’B + A’C’ (1) (Complementation, OR) = AC’ + A’B + A’C’ (Identity Element, AND) = A’B + AC’ + A’C’ (Commutative, OR) = A’B + C’A + C’A’ (Commutative, AND (2 times)) = A’B + C’ (A+A’) (Distributive, AND) = A’B + C’ (1) (Complimentation, OR) = A’B + C’ (Identity Element, AND)

CSI-2111 Computer Architecture Ipage 2-24 Representation: Canonical Forms  Canonical Sum of Products Form (CSOP or  m) –Sum of mintermes –Ex.: f (A, B) = (A’B) + (AB) =  m(1, 3)  Canonical Product of Sums Form (CPOS or  M) –Product of maxtermes –Ex.: f (A, B) = (A+B’) (A’+B) =  M(1, 2)

CSI-2111 Computer Architecture Ipage 2-25 Examples of Canonical Forms  According to De Morgan’s law: M i ' = m i and m i ' = M i  Say f(A, B, C) defined by: ABCf

CSI-2111 Computer Architecture Ipage 2-26 Examples of Canonical Forms *  f(A, B, C) defined by: A BCf = A’B’C + AB’C’ + AB’C + ABC’ + ABC =  m (1, 4, 5, 6, 7) is the CSOP form of f

CSI-2111 Computer Architecture Ipage 2-27 Examples of Canonical Forms *  f(A, B, C) defined by: ABCf ABCf = (A+B+C) (A+B’+C) (A+B’+C’) =  M (0, 2, 3) is the CPOS form of f.

CSI-2111 Computer Architecture Ipage 2-28 Equivalence of Canonical Forms* f(A, B, C) =  m (0, 4, 5, 7) =  M (?)  M (1, 2, 3, 6) f(A, B, C, D) =  M (2, 3, 5, 6, 7) =  m (?)  m (0, 1, 4) ???  m (0, 1, 4, 8, 9, 10, 11, 12, 13, 14, 15) !!!

CSI-2111 Computer Architecture Ipage 2-29 Canonical Forms (encore!)  A function f is not necessarily represented in a canonical form. f(A, B, C) = A’B’C + AB’+ BC’  How to obtain the canonical forms of such functions? –Algebraic method

CSI-2111 Computer Architecture Ipage 2-30 Algebraic Method* f(A, B, C) = A’B + C’ + ABC =A’B(C+C’) + C’(A+A’)(B+B’) +ABC =A’BC + A’BC’ + ABC’ + AB’C’ + A’BC’ + A’B’C’ + ABC =A’BC + A’BC’ + ABC’ + AB’C’ + A’B’C’ + ABC =  m(3, 2, 6, 4, 0, 7)

CSI-2111 Computer Architecture Ipage 2-31 Remarks on Boolean Functions  Single representation ( POS or SOP ).  Logical equivalence.  How many possible functions for N Boolean variable?  Functions with 2 Boolean variables

CSI-2111 Computer Architecture Ipage 2-32 Functionally Complete Sets  Together of operators being able to represent all the functions  {AND, NOT, OR}, {NOR}, {NAND}  POS form with {NOR}  SOP form with {NAND}

CSI-2111 Computer Architecture Ipage Logic Gates   The logic gates implement the switching functions  A gate with N inputs represents a function with N Boolean variables  One comes across OR, AND, NOR, and NAND gates with N inputs

CSI-2111 Computer Architecture Ipage 2-34 Synthesis with Logic Gates  To implement a switching function with logic gates f (A, B, C) = (A + (BC)')'  B C A f

CSI-2111 Computer Architecture Ipage 2-35 Analysis with Logic Gates  To find the functionality of the circuit made up of logic gates  f (A, B, C) = (A + (BC)')' B C A f

CSI-2111 Computer Architecture Ipage 2-36 Synthesis with Single Gates  More economical than {AND, OR, NOT}  SOP form with {NAND}  POS form with {NOR} –Similar to SOP. A B A+B A 1 B 1 

CSI-2111 Computer Architecture Ipage 2-37 Return to NOR-NAND *  f (A, B, C, D) = AB’ +A’C + D  To implement with NAND (  ) only: = ((AB’ +A’C + D)’)’ = ((AB’)’. (A’C)’. (D)’)’ = (AB’)’  (A’C)’  (D)’ = (A  B’)  (A’  C)  (D)’

CSI-2111 Computer Architecture Ipage 2-38 Return to NOR-NAND *  f (A, B, C, D) = AB’ +A’C + D  To implement with NOR (  only: = ((AB’)’)’ + ((A’C)’)’ + D = (A’+B)’ + (A+C’)’ + D = (A’  B) +(A  C’) + D = (((A’  B) +(A  C’) + D)’)’ = ((A’  B)  (A  C’)  D)’ = ((A’  B)  (A  C’)  D)  0

CSI-2111 Computer Architecture Ipage 2-39 Return to NOR-NAND *  g (A, B, C, D) = (A+B’).(A’+C). D  Implement with NAND (  ) only: = ((A+B’)’)’. ((A’+C)’)’. D = (A’B)’. (AC’)’. D = (A’  B). (A  C’). D = (((A’  B). (A  C’). D)’)’ = ((A’  B)  (A  C’)  D)’ = ((A’  B)  (A  C’)  D) 

CSI-2111 Computer Architecture Ipage 2-40 Return to NOR-NAND *  g (A, B, C, D) = (A+B’).(A’+C). D  Implement with NOR (  only: = (((A+B’).(A’+C).D)’)’ = ((A+B’)’ + (A’+C)’ + D’)’ = (A+B’)’  (A’+C)’  D’ = (A  B’)  (A’  C)  D’

CSI-2111 Computer Architecture Ipage Adders  Classic combinational circuits  Various common circuits –Half-Adders –Elementary adder –Parallel full-adder –Elementary subtracter –Adder-substracter

CSI-2111 Computer Architecture Ipage 2-42 Adding words of several bits?  Parallel full-adder of 4 bits  EA = Elementary Adder EA B4B4 A4A4 C4C4 S4S4 B3B3 A3A3 C3C3 S3S3 B2B2 A2A2 C2C2 S2S2 B1B1 A1A1 C1C1 S1S1 R5R5

CSI-2111 Computer Architecture Ipage Logic Timing Diagram

CSI-2111 Computer Architecture Ipage 2-44 Complementary Reading  In Mano and Kime –Sections 1.2 and 1.3 Numbers and binary arithmetic –Sections 2.1, 2.2, 2.3, 2.6 and 2.7 Boolean algebra, logic gates, canonical forms –Section 3.8, except « Carry Lookahead Adder » Adders –Sections 3.9 and 3.10 Subtracters