1 CS/COE0447 Computer Organization & Assembly Language Logic Design.

Slides:



Advertisements
Similar presentations
Digital Circuits.
Advertisements

Appendix B Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, NOT AND OR XOR NAND NOR Truth Tables Boolean Operators.
Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, NOT AND OR XOR NAND NOR Truth Tables Boolean.
Lecture 20, Slide 1EECS40, Fall 2004Prof. White Lecture #20 ANNOUNCEMENT Midterm 2 Thursday Nov. 18, 12:40 – 2:00 pm A-L initials in F295 Haas Business.
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
Lecture 14 Today we will Learn how to implement mathematical logical functions using logic gate circuitry, using Sum-of-products formulation NAND-NAND.
SUPLEMENTARY CHAPTER 1: An Introduction to Digital Logic The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
TDC 311 Digital Logic. Truth Tables  AND  OR  NOT  NAND  NOR  XOR  XNOR.
Introduction to Digital Logic Design Appendix A of CO&A Dr. Farag
Chapter 4 Gates and Circuits.
Chapter 10_1 Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, NOT AND OR XOR NAND NOR Truth Tables Boolean Operators.
Quiz # 2 Chapters 4, 5, & 6.
Lecture 17: Digital Design Today’s topic –Intro to Boolean functions Reminders –HW 4 due Wednesday 10/8/2014 (extended) –HW 5 due Wednesday 10/15/2014.
SUPLEMENTARY CHAPTER 1: An Introduction to Digital Logic The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
Boolean Algebra and Digital Circuits
Logic Design Computer Architecture and Design Lecture 1.
Computer Organization 1 Logic Gates and Adders. Propositions –Venn Diagrams.
The Digital Logic Level
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta
1 Boolean Algebra & Logic Gates. 2 Objectives Understand the relationship between Boolean logic and digital computer circuits. Learn how to design simple.
Apr. 3, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 3: Review of Digital Circuits and Logic Design Jeremy R. Johnson Mon. Apr.
Chapter 2Basic Digital Logic1 Chapter 2. Basic Digital Logic2 Outlines  Basic Digital Logic Gates  Two types of digital logic circuits Combinational.
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
Logic Gates Shashidhara H S Dept. of ISE MSRIT. Basic Logic Design and Boolean Algebra GATES = basic digital building blocks which correspond to and perform.
Why? What’s Boolean algebra used for? –“The purpose of Boolean algebra is to facilitate the analysis and design of digital circuits.” Express a truth table.
Lecture 22: 11/19/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Boolean Algebra & Logic Prepared by Dr P Marais (Modified by D Burford)
מבנה מחשב תרגול 2. 2 Boolean AND Operation Truth Table Equivalent Gate Different notations:
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
CSE 311 Foundations of Computing I
Computer Architecture and Organization Unit -1. Digital Logic Circuits – Logic Gates – Boolean Algebra – Map Simplification – Combinational Circuits –
CS/COE0447 Computer Organization & Assembly Language
Logic Design / Processor and Control Units Tony Diep.
Chapter 2 Boolean Algebra and Minimization Techniques.
Appendix C Basics of Digital Logic Part I. Florida A & M University - Department of Computer and Information Sciences Modern Computer Digital electronics.
Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals.
ECE DIGITAL LOGIC LECTURE 6: BOOLEAN ALGEBRA Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 02/01/2016.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
4–1. BSCS 5 th Semester Introduction Logic diagram: a graphical representation of a circuit –Each type of gate is represented by a specific graphical.
1 CS/COE0447 Computer Organization & Assembly Language Logic Design Appendix C.
Digital Circuits Design Chin-Sung Lin Eleanor Roosevelt High School.
Appendix C Basics of Logic Design. Appendix C — Logic Basic — 2 Logic Design Basics §4.2 Logic Design Conventions Objective: To understand how to build.
Hoda Roodaki Boolean Algebra Hoda Roodaki
Computer Architecture & Operations I
Computer Architecture & Operations I
Morgan Kaufmann Publishers
Logic Gates & Boolean Algebra
Digital Logic.
DIGITAL LOGIC CIRCUITS
Basics Combinational Circuits Sequential Circuits Ahmad Jawdat
4. Transistors and logic gates
Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan
Fundamentals of Computer Science Part i2
CSE 311 Foundations of Computing I
CS/COE0447 Computer Organization & Assembly Language
CSE 370 – Winter Combinational Logic - 1
Digital Logic.
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Reading: Hambley Ch. 7 through 7.5
Chapter 2 Introduction to Logic Circuits
CS/COE0447 Computer Organization & Assembly Language
Digital Logic.
Chapter 10.3 and 10.4: Combinatorial Circuits
Digital Logic Design Basics Combinational Circuits Sequential Circuits.
Reading: Hambley Ch. 7 through 7.5
Presentation transcript:

1 CS/COE0447 Computer Organization & Assembly Language Logic Design

2 Digital hardware is implemented by way of “logic design” Digital circuits process and produce two discrete values: 0 and 1 Example: 1-bit full adder (FA)

3 Layered Design Logic design is done using logic gates Often we design desired function using high-level languages at somewhat higher level than logic gates TransistorsLogic gates Function blocks Microarchitecture

4 Logic Gates Y=A&B Y=A|B Y=~(A&B) Y=~(A|B) 2-input AND 2-input OR 2-input NAND 2-input NOR A B A A A B B B Y Y Y Y

5 Function Impl. Using Gates inputsoutputs …… ?

6 Describing a Function Output A = F(Input 0, Input 1, …, Input N-1 ) Output B = F’(Input 0, Input 1, …, Input N-1 ) Output C = F’’(Input 0, Input 1, …, Input N-1 ) … Methods –Truth table –Sum of products –Product of sums

7 Truth Table InputOutput ABC in SC out

8 Truth Table, Cont’d S = A’B’C in +A’BC in ’+AB’C in ’+ABC in C out = A’BC in +AB’C in +ABC in ’+ABC in InputOutput ABC in SC out

9 Combinational vs. Sequential Logic Combinational logic –A function whose outputs are dependent only on the current input –As soon as inputs are known, outputs can be computed Sequential logic –Some memory elements (i.e., state) –Outputs are dependent on current state and current input –Next state is dependent on current state and current input

10 Combinational Logic inputsoutputs ……

11 Sequential Logic inputsoutputs …… clock current state next state

12 Implementing Combinational Logic Any combinational logic can be implemented using sum of products or product of sums Input-output relationship can be defined in a truth table From a truth table, each output function can be derived Boolean expressions can be further manipulated using various Boolean algebraic principles

13 Boolean Algebra Boole, George (1815~1864): mathematician and philosopher; inventor of Boolean Algebra, the basis of all computer arithmetic Binary values: 0, 1 Two binary operations: AND (  /  ), OR (  ) One unary operation: NOT (~)

14 Boolean Algebra, cont’d Binary operations: AND (  /  ), OR (  ) –Idempotent a  a = a+a = a –Commutative a  b = b  a a+b = b+a –Associative a  (b  c) = (a  b)  c a+(b+c) = (a+b)+c –Distributive a  (b+c) = a  b + a  c a+(b  c) = (a+b)  (a+c)

15 Boolean Algebra, cont’d De Morgan’s laws –~(a+b) = ~a  ~b –~(a  b) = ~a+~b More… –a+(a  b) = a –a  (a+b) = a –~~a=a –a+~a = 1 –a  (~a) = 0

16 Expressive Power With AND/OR/NOT, we can express any function in Boolean algebra Indeed, any combination logic can be implemented using AND/OR/NOT gate –Sum of products What if we have NAND/NOR/NOT? What if we have NAND only? What if we have NOR only?

17 Multiplexor A Y B S Y = (S)? B:A; 0 1

18 A 32-bit Multiplexor

19 Simplifying Expressions Think of C out in our Adder –C out = A’BC in +AB’C in +ABC in ’+ABC in –C out = BC in +AC in +AB InputOutput ABC in SC out

20 Karnaugh Map [not covered Sp 2007] A BC in BC in AB AC in C out = BC in +AB+AC in

21 Implementing Comb. Logic PLA (Programming Logic Array) –A direct implementation of sum of products form pla.htmlpla.html (thanks to: ROM (Read Only Memory) –Interpret the truth table as fixed values stored in memory Using logic gate chips (74LS…)

22 74LS Series Chips contain several logic gates SN 74LS08 Quad 2-input AND gate SN 74LS32 Quad 2-input OR gate SN 74LS04 Hex inverter gate

23 Building a 1-bit ALU ALU = Arithmetic Logic Unit

24 Building a 32-bit ALU

25 Implementing “SUB”

26 Implementing “NAND”/”NOR”

27 Implementing “SLT”

28 Implementing “SLT”, cont’d

29 Supporting “BEQ”/”BNE” Need a “zero-detector”

30 ALU Symbol Note that it’s a combinational logic

31 RS Latch Note that there are feedbacks!

32 RS Latch, cont’d When R=0, S=

33 RS Latch, cont’d When R=1, S=

34 RS Latch, cont’d When R=0, S=0, and Q was

35 RS Latch, cont’d When R=0, S=0, and Q was

36 RS Latch, cont’d What happens if R=S=1? 1 1

37 D Latch Note that we have an R-S latch as a back-end

38 D Latch, cont’d Note that S, R inputs always get inverted input of D when C=1 When C=0, S=R=0, remembering the previous value S R

39 D Latch, cont’d S R CDQ(t) 00Q(t-1)

40 D Latch, cont’d D C Q Q’ D Latch

41 D Flip-Flop (D-FF) Two D latches are cascaded, with opposite clock

42 D Flip-Flop, cont’d D C Q Q’ D-FF

43 ALU Control Logic Design we’ll return to this when we cover appendix B

44 Register File Implementation we’ll return to this in appendix B

45 Reg. File Impl., cont’d we’ll return to this in appendix B 1 0x

46 To Summarize… In digital logic, transistors are used as simple switches Logic gate is an abstraction of multiple transistor network A combinational logic block has inputs and outputs that depend on the current inputs A sequential logic block is composed of some combinational logic and memory that keeps the current state

47 To Summarize…, cont’d Boolean algebra provides theory for digital logic Combinational logic can be implemented using PLA (and many other methods) An ALU for MIPS architecture has been built!

48 To Summarize…, cont’d Flip-flops were used as a memory element An FSM can be implemented using FFs and some combinational logic