מבנה מחשב תרגול 2. 2 Boolean AND Operation 10 000 101 Truth Table Equivalent Gate Different notations:

Slides:



Advertisements
Similar presentations
Part 4: combinational devices
Advertisements

COE 202: Digital Logic Design Sequential Circuits Part 1 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM.
Flip-Flops, Registers, Counters, and a Simple Processor
Chapter 1 — Computer Abstractions and Technology — 1 Lecture 7 Carry look ahead adders, Latches, Flip-flops, registers, multiplexors, decoders Digital.
Multiplexors Sequential Circuits and Finite State Machines Prof. Sin-Min Lee Department of Computer Science.
Module 12.  In Module 9, 10, 11, you have been introduced to examples of combinational logic circuits whereby the outputs are entirely dependent on the.
Logic Circuits Another look at Floating Point Numbers Common Combinational Logic Circuits Timing Sequential Circuits Note: Multiplication & Division in.
Chapter 4 Gates and Circuits.
CHAPTER 3 Digital Logic Structures
TDC 311 Digital Logic. Truth Tables  AND  OR  NOT  NAND  NOR  XOR  XNOR.
1 Chapter 5: Datapath and Control CS 447 Jason Bakos.
Chapter 4 Gates and Circuits. 4–2 Chapter Goals Identify the basic gates and describe the behavior of each Describe how gates are implemented using transistors.
Digital Computer Design Fundamental
Introduction to Digital Logic Design Appendix A of CO&A Dr. Farag
Some Useful Circuits Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University.
COE 202: Digital Logic Design Sequential Circuits Part 1
1 CHAPTER 4: PART I ARITHMETIC FOR COMPUTERS. 2 The MIPS ALU We’ll be working with the MIPS instruction set architecture –similar to other architectures.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
+ CS 325: CS Hardware and Software Organization and Architecture Combinational Circuits 1.
1 Registers and Counters A register consists of a group of flip-flops and gates that affect their transition. An n-bit register consists of n-bit flip-flops.
CPS120: Introduction to Computer Science
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.
1 Boolean Algebra & Logic Gates. 2 Objectives Understand the relationship between Boolean logic and digital computer circuits. Learn how to design simple.
HCL and ALU תרגול 10. Overview of Logic Design Fundamental Hardware Requirements – Communication: How to get values from one place to another – Computation.
Chapter 2Basic Digital Logic1 Chapter 2. Basic Digital Logic2 Outlines  Basic Digital Logic Gates  Two types of digital logic circuits Combinational.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
Lecture 18: Hardware for Arithmetic Today’s topic –Intro to Boolean functions (Continued) –Designing an ALU 1.
Computer Architecture and Organization Unit -1. Digital Logic Circuits – Logic Gates – Boolean Algebra – Map Simplification – Combinational Circuits –
מבנה מחשב תרגול 1 מבוא, אריתמטיקה בסיסית – ייצוג גרפי.
Hamming Code,Decoders and D,T-flip flops Prof. Sin-Min Lee Department of Computer Science.
CS/COE0447 Computer Organization & Assembly Language
Appendix C Basics of Digital Logic Part I. Florida A & M University - Department of Computer and Information Sciences Modern Computer Digital electronics.
Sequential Logic Computer Organization II 1 © McQuain A clock is a free-running signal with a cycle time. A clock may be either high or.
1 Fundamentals of Computer Science Combinational Circuits.
Synchronous Sequential Logic A digital system has combinational logic as well as sequential logic. The latter includes storage elements. feedback path.
CO5023 Latches, Flip-Flops and Decoders. Sequential Circuit What does this do? The OUTPUT of a sequential circuit is determined by the current output.
Apr. 3, 2000Systems Architecture I1 Introduction to VHDL (CS 570) Jeremy R. Johnson Wed. Nov. 8, 2000.
May 9, 2001Systems Architecture I1 Systems Architecture I (CS ) Lab 5: Introduction to VHDL Jeremy R. Johnson May 9, 2001.
Chapter5: Synchronous Sequential Logic – Part 1
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals.
Chapter 3 Digital Logic Structures
A combinational circuit is a connected arrangement of logic gate with a set of input and output.
Gates AND, OR, NOT NAND, NOR Combinational logic No memory A set of inputs uniquely and unambiguously specifies.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
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 The ALU l ALU includes combinational logic. –Combinational logic  a change in inputs directly causes a change in output, after a characteristic delay.
COMBINATIONAL AND SEQUENTIAL CIRCUITS Guided By: Prof. P. B. Swadas Prepared By: BIRLA VISHVAKARMA MAHAVDYALAYA.
Chapter 3 Boolean Algebra and Digital Logic T103: Computer architecture, logic and information processing.
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.
Systems Architecture Lab: Introduction to VHDL
Lecture 11: Hardware for Arithmetic
מבנה מחשב תרגול 3.
Instructor: Alexander Stoytchev
CS Chapter 3 (3A and ) – Part 4 of 5
Jeremy R. Johnson Wed. Sept. 29, 1999
Basics Combinational Circuits Sequential Circuits Ahmad Jawdat
Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan
CS/COE0447 Computer Organization & Assembly Language
CS/COE0447 Computer Organization & Assembly Language
COMS 361 Computer Organization
Thought of the Day To be what we are, and to become
Logic Circuits I Lecture 3.
Digital Logic Circuits
XOR Function Logic Symbol  Description  Truth Table 
Digital Circuits and Logic
Presentation transcript:

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

2 Boolean AND Operation Truth Table Equivalent Gate Different notations:

3 Boolean OR Operation Truth Table Equivalent Gate Different notations:

4 Boolean NOT Operation Truth Table Equivalent Gate Different notations:

5 Boolean NAND Operation Truth Table Equivalent Gate

6 Boolean NOR Operation Truth Table Equivalent Gate

7 Boolean XOR Operation Truth Table Equivalent Gate Different notations:

8 How to implement XOR? Which is Better?

Example What does the following combinational circuit decide ? 9

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

11 Boolean Equalities (2) Distribution deMorgan

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

13 Example (2): Simplify the expression

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

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

16 Truth Table We get Different Notation for

17 Disjunctive Normal Form It’s easy to transform a DNF formula to its equivalent gates’ representation

18 Disjunctive Normal Form

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

Multiplexors (MUXes) A device that selects one of several input signals and forwards it into a single line. Also called a data selector 20

21 Multiplexors (MUXes) 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 s0 c 3 X 8 multiplexor s1 s2 a31 b31 s c31 a30 b30 c a0 b0 c0 M M M abab s c 32 symbol

Encoders An encoder conv- erts information from one format to another. For the purposes of speed, secrecy, security, or saving space by shrinking size n input lines, and at most only one of them will ever be high, produces n-bit output lines. ( Other options – don’t cares )

Decoders Reverse operation of an Encoder undoing the encoding so that the original information can be retrieved Combinational circuit that converts binary information from n input lines to a maximum of 2 n unique output lines. The same method used to encode is usually just reversed in order to decode. Results in sending less information !!! 23

24 Decoders Each combination of the inputs enables exactly one output DECODER X 8 Decoder OutputsInputs O0O1O2O3O4O5O6O7I0I1I

Adders A digital circuit that performs addition of numbers. The half adder adds two single binary digits A and B. It has two outputs, sum (S) and carry (C). The carry signal represents an overflow into the next digit of a multi-digit addition. 25

Full Adder from Half Adders Half adder Full adder from 2 half adders + or gate abab Cout sum Cin abab Cout sum We will look into adders more closely when we examine the ALU

27 Flip-Flops What happens if we create a circle in the logic gates diagram? a Circuit that has two stable states and can be used to store state information. Can be made to change state by signals applied to one or more control inputs. This is a S-R Flip-Flop

An S-R flip-flop: S – set. R Reset. Initial state Q=1 and R = 0 S = 1 : Changes Q to 1. R = 1 S = 0 : Changes Q to 0. R=1 S=0 Q=0 Q=1 R=0 S=1 Q=1 Q=0 R=0 S=0 Q=0 Q=1 R=0 S=0 Q=1 Q=0 R = 1 S = 1 : illegal

S-R Latch (Or S-R Flip-Flop)  Feedback is the key to memory/state elements.  Once a value is fed to the element, it circulates inside the element and renews itself, even after the input is turned off.  Other memory devices can be built from the basic latch. R SR S Q Q QQRS Save Illegal

Clocked "D" Latch This latch has one input, called "D". When the clock is low, AND gates force zero on all inputs to the S-R latch  no change in state. When clock is high, the value at D sets the "S" input of the latch; inverted D sets the "R" input of the latch. Cloc k D Q Q S-R Flip-Flop With a Clock

31 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?

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

"D" Latch Clocking Waveforms The output "D" responds to the change in input, a characteristic delay after the clock goes high. Cloc k D Q Q DCQDCQ t delay t t

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

35 Registers Registers can be built from a series of ET D latches connected to the same clock Clock ET-D Latch D C Q ET-D Latch D C Q ET-D Latch D C Q... ET-D Latch D C Q D0D1D2D(n-1) Q0Q1Q2Q(n-1)

The Register File Modern digital systems are based on logic with state variables, which are changed according to a clock.  The system consists of two types of logic -- combinational and sequential. – Combinational logic  a change in inputs directly causes a change in output, after a characteristic delay. Different from sequential logic which only changes on the clock. – Sequential logic contains state elements or memory elements. State elemen t 1 State elemen t 2 Combination al Logic The simplest type of clocking system to understand is built with edge triggered state elements. The diagram shows a system which clocks on the leading edge of the clock. leading edge leading edge clock period

37 Register File Implementation of double read port register 0 register 1... register 6 register 7 MUXMUX MUXMUX data 1 data 2 read reg 1 read reg 2 3 bits 32 bits read reg 1 read reg 2 write reg write data write enable read data 1 read data 2 3 bits 32 bits 1 bit

38 Write Port Implementation n-to-1 decoder register 0 register register 6 register 7 CDCD CDCD CDCD CDCD CDCD write enable write data Reg # 32 bits 1 bit 3 bits Clock 1 bit