מבנה מחשב תרגול 3.

Slides:



Advertisements
Similar presentations
Logic Gates A logic gate is an elementary building block of a digital circuit Most logic gates have two inputs and one output At any given moment, every.
Advertisements

Logic Gates.
Flip-Flops and Registers
Multiplexors Sequential Circuits and Finite State Machines Prof. Sin-Min Lee Department of Computer Science.
Dr. ClincyLecture1 Appendix A – Part 2: Logic Circuits Current State or output of the device is affected by the previous states Circuit Flip Flops New.
Logic Circuits Another look at Floating Point Numbers Common Combinational Logic Circuits Timing Sequential Circuits Note: Multiplication & Division in.
1 Digital Logic
1 Chapter 5: Datapath and Control CS 447 Jason Bakos.
Chapter 3 Continued Logic Gates Logic Chips Combinational Logic Timing Sequential Logic Flip Flops Registers Memory State Machines.
Propositional Calculus Math Foundations of Computer Science.
In this module you will learn: What the various logic gates do. How to represent logic gates on a circuit diagram. The truth tables for the logic gates.
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
Transistors and Logic Circuits. Transistor control voltage in voltage out control high allows current to flow -- switch is closed (on) control low stops.
Apr. 3, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 3: Review of Digital Circuits and Logic Design Jeremy R. Johnson Mon. Apr.
Flip-Flops and Registers
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.
Exclusive OR Gate. Logically, the exclusive OR (XOR) operation can be seen as either of the following operations:exclusive OR (XOR) 1. A AND NOT B OR.
מבנה מחשב תרגול 2. 2 Boolean AND Operation Truth Table Equivalent Gate Different notations:
IT253: Computer Organization Lecture 7: Logic and Gates: Digital Design Tonga Institute of Higher Education.
Computer Architecture and Organization Unit -1. Digital Logic Circuits – Logic Gates – Boolean Algebra – Map Simplification – Combinational Circuits –
מבנה מחשב תרגול 1 מבוא, אריתמטיקה בסיסית – ייצוג גרפי.
CS/COE0447 Computer Organization & Assembly Language
Chapter 10 Flip-Flops and Registers 1. Objectives You should be able to: Explain the internal circuit operation of S-R and gated S-R flip-flops. Explain.
CO5023 Latches, Flip-Flops and Decoders. Sequential Circuit What does this do? The OUTPUT of a sequential circuit is determined by the current output.
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.
1 The Registers File l Modern digital systems are based on logic with state variables, which are changed according to a clock. – The system consists of.
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 Science 210 Computer Organization
Morgan Kaufmann Publishers
Transistors and Logic Circuits
Summary Latch & Flip-Flop
Lecture 11: Hardware for Arithmetic
Transistors and Logic Circuits
Who Wants to be an Electronics Millionaire?
Logic Gates.
Exclusive OR Gate.
Digital Design Lecture 9
FLIP FLOPS.
Sequential Circuits Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and so on require.
CS Chapter 3 (3A and ) – Part 4 of 5
Jeremy R. Johnson Wed. Sept. 29, 1999
Basics of Digital Logic Design Presentation D
Latches, Flip-Flops and Registers
Computer Science 210 Computer Organization
Sequential Circuits: Flip-Flops
Latches and Flip-flops
Yee-Wing Hsieh Steve Jacobs
Chapter 4 Gates and Circuits.
Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan
Fundamentals of Computer Science Part i2
Computer Science 210 Computer Organization
Propositional Calculus: Boolean Algebra and Simplification
How does the CPU work? CPU’s program counter (PC) register has address i of the first instruction Control circuits “fetch” the contents of the location.
CS/COE0447 Computer Organization & Assembly Language
Instructor: Alexander Stoytchev
Logic Gates.
ECE 120 Midterm 2 HKN Review Session
13 Digital Logic Circuits.
CS/COE0447 Computer Organization & Assembly Language
Digital Logic Circuits
Flip-Flops.
14 Digital Systems.
Department of Electronics
Chapter 5 Sequential Circuits.
Digital Circuits and Logic
Sequential Digital Circuits
Week 11 Flip flop & Latches.
Lecture 4 Sequential units. Registers
ECE 120 Midterm 2 HKN Review Session.
Presentation transcript:

מבנה מחשב תרגול 3

Boolean AND Operation 1 Truth Table Equivalent Gate Different notations:

Boolean OR Operation 1 Truth Table Equivalent Gate Different notations:

Boolean NOT Operation 1 Truth Table Equivalent Gate Different notations:

Boolean NAND Operation Equivalent Gate Truth Table 1

Boolean NOR Operation Equivalent Gate Truth Table 1

Boolean XOR Operation 1 Truth Table Equivalent Gate Different notations:

How to implement XOR? Which is Better?

Boolean Equalities (1) Rules of Associativity, Commutation. Other rules:

Boolean Equalities (2) Distribution deMorgan

Example (1): Simplify the expression Compare number of gates

Example (2): Simplify the expression

Evaluating an Expression (1) Let’s look at the first expression: 1 1 1 1 1

Evaluating an Expression (2) Let’s look at the first expression: 1 1 1 1 =1

Truth Table 1 We get Different Notation for 1 1 1 2 1 3 1 1 4 1 1 5 1 1 1 6 1 1 7 1 1 1 1

Disjunctive Normal Form 1 It’s easy to transform a DNF formula to its equivalent gates’ representation 1 1 1 4 1 1 5 1 1 1 7 1 1 1 1

Disjunctive Normal Form Notation Notice

Flip-Flops What happens if we create a circle in the logic gates diagram? Consider the following diagram: This is a S-R Flip-Flop

S-R Flip-Flop S-R Flip Flop truth table: Save 1

S-R Flip-Flop With a Clock The CPU is timed by the pulses of a clock. Maintaining the FF contents when the clock is between pulses (i.e. outputting 0) using the S-R FF:

D-Flip-Flop (1) On each clock pulse the FF should be meaningful Therefore the R and S lines should be opposite If so do we still need both of them?

D Flip-Flop (2) D Flip-Flop when the clock is pulsing: 1

Edge Triggered "D" flip-flop Clock Q Latch C The first latch is called the master, the second latch is called the slave When the clock goes high, the first D latch (master) accepts the change in input Because of the inverter, the change is blocked from moving on the second D latch (slave). When the clock goes low, the slave latch accepts the change in input

New Components Two major components of combinational logic are – multiplexors & decoders. 2-input multiplexor (or selector) is implemented with gates below a b a b c c s s symbol gate implementation

Multiplexors (MUXes) s Multiplexors can have any number of inputs (in theory) Multiplexors can apply to buses  multiplied for many lines. Example: 1 x 2 multiplexor on 32 bits bus. 1 2 3 4 5 6 7 a31 b31 M c31 c a30 b30 3 X 8 multiplexor M c30 s2 s1 s0 . . 32 a b 32 c a0 b0 M c0 32 symbol s

Decoders Each combination of the inputs enables exactly one output Outputs Inputs O0 O1 O2 O3 O4 O5 O6 O7 I0 I1 I2 1 1 2 3 4 5 6 7 DECODER 3 X 8 Decoder Each combination of the inputs enables exactly one output

Registers Registers can be built from a series of ET D latches connected to the same clock Clock ET-D Latch D C Q . . . D0 D1 D2 D(n-1) Q0 Q1 Q2 Q(n-1)

Register File Implementation of double read port read reg 1 reg 2 5 bits read reg 1 reg 2 32 bits M U X register 0 data 1 2 5 bits 32 bits read reg 1 read reg 2 write reg write data read data 1 data 2 32 bits register 1 32 bits 32 bits 5 bits . . . 32 bits register 30 5 bits 32 bits 32 bits register 31 32 bits 5 bits write enable 1 bit M U X 32 bits

Write Port Implementation write enable 1 bit 1 bit 1 bit n-to-1 decoder Clock 1 . 30 31 C D register 0 5 bits . register 1 Reg # C D . C D C D register 30 register 31 C D write data 32 bits