CS/COE0447 Computer Organization & Assembly Language

Slides:



Advertisements
Similar presentations
1 CS/COE0447 Computer Organization & Assembly Language Logic Design.
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.
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
Computer ArchitectureFall 2008 © August 20 th, Introduction to Computer Architecture Lecture 2 – Digital Logic Design.
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 10_1 Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, NOT AND OR XOR NAND NOR Truth Tables Boolean Operators.
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.
Computer Organization 1 Logic Gates and Adders. Propositions –Venn Diagrams.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta
Apr. 3, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 3: Review of Digital Circuits and Logic Design Jeremy R. Johnson Mon. Apr.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /05/2013 Lecture 4: Basics of Logic Design Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER.
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.
מבנה מחשב תרגול 2. 2 Boolean AND Operation Truth Table Equivalent Gate Different notations:
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
Lecture 18: Hardware for Arithmetic Today’s topic –Intro to Boolean functions (Continued) –Designing an ALU 1.
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.
Gates AND, OR, NOT NAND, NOR Combinational logic No memory A set of inputs uniquely and unambiguously specifies.
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.
Computer Architecture & Operations I
Computer Architecture & Operations I
Morgan Kaufmann Publishers
Logic Gates & Boolean Algebra
CS 270: Mathematical Foundations of Computer Science
DIGITAL LOGIC CIRCUITS
Lecture 11: Hardware for Arithmetic
מבנה מחשב תרגול 3.
Digital Logic.
Basics of digital systems
DIGITAL LOGIC CIRCUITS
Basics of Digital Logic Design Presentation D
XOR, XNOR, and Binary Adders
Reading: Hambley Chapters
Lecture 3 Boolean Algebra and Digital Logic Lecture Duration: 2 Hours
Basics Combinational Circuits Sequential Circuits
Basics Combinational Circuits Sequential Circuits Ahmad Jawdat
Chapter 4 Gates and Circuits.
CS105 Introduction to Computer Concepts GATES and CIRCUITS
Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan
Fundamentals of Computer Science Part i2
CSE 311 Foundations of Computing I
Digital Logic Structures Logic gates & Boolean logic
Arithmetic Where we've been:
CS/COE0447 Computer Organization & Assembly Language
CSE 370 – Winter Combinational Logic - 1
XOR, XNOR, & Binary Adders
Lecture 11: Hardware for Arithmetic
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Reading: Hambley Ch. 7 through 7.5
13 Digital Logic Circuits.
COMS 361 Computer Organization
Chapter 10.3 and 10.4: Combinatorial Circuits
Logic Circuits I Lecture 3.
XOR, XNOR, and Binary Adders
XOR, XNOR, and Binary Adders
Reading: Hambley Ch. 7 through 7.5
Presentation transcript:

CS/COE0447 Computer Organization & Assembly Language Logic Design

Logic Design 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)

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 Microarchitecture Function blocks Logic gates Transistors

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

Function Impl. Using Gates … ? … inputs outputs

Describing a Function OutputA = F(Input0, Input1, …, InputN-1) OutputB = F’(Input0, Input1, …, InputN-1) OutputC = F’’(Input0, Input1, …, InputN-1) … Methods Truth table Sum of products Product of sums

Truth Table Input Output A B Cin S Cout 1

Truth Table, Cont’d S = A’B’Cin+A’BCin’+AB’Cin’+ABCin Input Output A B Cin S Cout 1 S = A’B’Cin+A’BCin’+AB’Cin’+ABCin Cout = A’BCin+AB’Cin+ABCin’+ABCin

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

Combinational Logic … … inputs outputs

Sequential Logic … … inputs outputs next state current state clock

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

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 (~)

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)

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

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 Nand and Nor gates are Universal: all boolean functions can be implemented using only Nand gates, or only Nor gates In Lecture: we showed this for Nand gates

Multiplexor In lecture, we saw a gate implementation of a MUX A Y B 1 Y B 1 S Y = (S) ? B:A;

A 32-bit Multiplexor

Simplifying Expressions Think of Cout in our Adder Cout = A’BCin+AB’Cin+ABCin’+ABCin Cout = BCin+ACin+AB Input Output A B Cin S Cout 1

Karnaugh Map [not covered Sp 2007] 1 BCin 00 ACin 01 1 11 1 1 BCin 10 1 AB Cout = BCin+AB+ACin

Implementing Comb. Logic PLA (Programming Logic Array) A direct implementation of sum of products form pla.html (thanks to: www.cs.umd.edu/class/spring2003/cmsc311/Notes/Comb/pla.html) ROM (Read Only Memory) Interpret the truth table as fixed values stored in memory Using logic gate chips (74LS…)

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

Building a 1-bit ALU ALU = Arithmetic Logic Unit

Building a 32-bit ALU

Implementing “SUB”

Implementing “NAND”/”NOR”

Implementing “SLT”

Implementing “SLT”, cont’d

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

ALU Symbol Note that it’s a combinational logic

ALU Control (figure 5.12)

ALU Control Logic Design For single-cycle control (multi-cycle involves the clock)

End of the material covered Spring 2007

RS Latch Note that there are feedbacks!

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

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

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

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

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

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

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

D Latch, cont’d R C D Q(t) Q(t-1) 1 S

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

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

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

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

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

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

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!

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