Instructor:Po-Yu Kuo 教師:郭柏佑

Slides:



Advertisements
Similar presentations
Introduction to Computer Engineering ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin.
Advertisements

Chapter 3 Digital Logic Structures
Digital Logical Structures
Chapter 3 Digital Logic Structures
Logical Design.
Digital Logic Structures: Chapter 3 COMP 2610 Dr. James Money COMP
Chapter 3 Digital Logic Structures. 3-2 Transistor: Building Block of Computers Microprocessors contain millions of transistors Intel Pentium 4 (2000):
Introduction to Digital Systems By Dr. John Abraham UT-Panam.
Overview Logic Combinational Logic Sequential Logic Storage Devices SR Flip-Flops D Flip Flops JK Flip Flops Registers Addressing Computer Memory.
Chapter 4 Gates and Circuits.
Overview Recall Combinational Logic Sequential Logic Storage Devices
Chapter 3 Continued Logic Gates Logic Chips Combinational Logic Timing Sequential Logic Flip Flops Registers Memory State Machines.
11/16/2004EE 42 fall 2004 lecture 331 Lecture #33: Some example circuits Last lecture: –Edge triggers –Registers This lecture: –Example circuits –shift.
Major Numeric Data Types Unsigned Integers Signed Integers Alphanumeric Data – ASCII & UNICODE Floating Point Numbers.
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Wael Qassas/AABU 3-2.
Faculty of Computer Science © 2006 CMPUT 229 Digital Logic From Switches to Memories.
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Transistor: Building.
Computer ArchitectureFall 2008 © August 20 th, Introduction to Computer Architecture Lecture 2 – Digital Logic Design.
Computer Science 210 s1 Computer Systems Semester 1 Lecture Notes James Goodman (revised by Robert Sheehan) Credits: Slides prepared by Gregory.
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Building Functions.
Lecture 3. Boolean Algebra, Logic Gates Prof. Sin-Min Lee Department of Computer Science 2x.
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.
Chapter 4 Gates and Circuits.
Chapter 3 Digital Logic Structures. 3-2 Transistor: Building Block of Computers Microprocessors contain millions of transistors Intel Pentium 4 (2000):
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.
Introduction to Computing Systems from bits & gates to C & beyond Chapter 3 Digital Logic Structures Transistors Logic gates & Boolean logic Combinational.
Chapter 4 Gates and Circuits.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
SUPLEMENTARY CHAPTER 1: An Introduction to Digital Logic The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
Introduction to Computing Systems from bits & gates to C & beyond Chapter 3 Digital Logic Structures Transistors Logic gates & Boolean logic Combinational.
Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Roadmap Problems Algorithms.
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Basic Logic Gates.
Digital Logic. 4 Why is 32-bit or 64-bit significant in terms of speed, efficiency? 4 Difference between OR and XOR 4 What is a mux for? PLA 4 Two kinds.
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Combinational vs.
Quiz What are the results of the following 4-bit bitwise logical operations? NOT OR NOR AND
Digital Logic Structures MOS transistors logic gates functional units of a computer.
Introduction to Computer Engineering ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin.
IT253: Computer Organization Lecture 7: Logic and Gates: Digital Design Tonga Institute of Higher Education.
Chapter 3 Digital Logic Structures. 3-2 Combinational vs. Sequential Combinational Circuit always gives the same output for a given set of inputs  ex:
Chapter 3 Digital Logic Structures
PART 3 Digital Logic 1.Logic Gates 2.Logic Circuits 3.Memory 4.Sequential Circuits 5.LC-3 Data Path.
Introduction to Computer Engineering CS/ECE 252, Spring 2012 Prof. Karu Sankaralingam Computer Sciences Department University of Wisconsin – Madison.
Digital Logic Structures: Chapter 3 COMP 2610 Dr. James Money COMP
Introduction to Computer Engineering CS/ECE 252, Fall 2007 Prof. David A. Wood Computer Sciences Department University of Wisconsin – Madison.
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Transistor: Building.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Complex Combinational Logic Blocks ECE/CS 252, Fall 2010 Prof.
Instructor : Po-Yu Kuo 教師:郭柏佑 Ch. 3 Digital Logic Structures EL 1009 計算機概論 ( 電子一 B) Introduction to Computer Science.
Introduction to Computing Systems and Programming Digital Logic Structures.
CMOS Logic Gates. NMOS transistor acts as a switch 2 When gate voltage is 0 V No channel is formed current does not flow easily “open switch” When gate.
Chapter 3 Digital Logic Structures
CMPUT Computer Organization and Architecture I1 CMPUT229 - Fall 2002 Topic 2: Digital Logic Structure José Nelson Amaral.
Gates AND, OR, NOT NAND, NOR Combinational logic No memory A set of inputs uniquely and unambiguously specifies.
Latches, Flip Flops, and Memory ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin – Madison.
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.
Digital Logic Structures. Transistor: The Digital Building Block Microprocessors contain LOTS of transistors –Intel Pentium 4 (2000): 48 million –IBM.
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Transistor: Building.
Instructor:Po-Yu Kuo 教師:郭柏佑
ECE 3130 Digital Electronics and Design
Instructor:Po-Yu Kuo 教師:郭柏佑
Introduction to Computer Engineering
Chapter 3 Digital Logic Structures
CS105 Introduction to Computer Concepts GATES and CIRCUITS
Chapter 3 Digital Logic Structures
Introduction to Computer Engineering
Digital Logic Structures Logic gates & Boolean logic
Chapter 3 Digital Logic Structures
Chapter 3 Digital Logic Structures An Hong 2016 Fall
Week 7: Gates and Circuits: PART II
Instructor:Po-Yu Kuo 教師:郭柏佑
Digital Circuits and Logic
Presentation transcript:

Instructor:Po-Yu Kuo 教師:郭柏佑 EL 1009 計算機概論 (電子一A) Introduction to Computer Science Ch. 3 Digital Logic Structures Instructor:Po-Yu Kuo 教師:郭柏佑

The Transistor

Transistor: Building Block of Computers Microprocessors contain millions of transistors Intel Pentium 4 (2000): 48 million IBM PowerPC 750FX (2002): 38 million IBM/Apple PowerPC G5 (2003): 58 million Logically, each transistor acts as a switch Combined to implement logic functions AND, OR, NOT Combined to build higher-level structures Adder, multiplexer, decoder, register, … Combined to build processor LC-3

Simple Switch Circuit Switch open: Switch closed: No current through circuit Light is off Vout is +2.9V Switch closed: Short circuit across switch Current flows Light is on Vout is 0V Switch-based circuits can easily represent two states: on/off, open/closed, voltage/no voltage

n-type MOS Transistor MOS = Metal Oxide Semiconductor two types: n-type and p-type n-type when Gate has positive voltage, short circuit between #1 and #2 (switch closed) when Gate has zero voltage, open circuit between #1 and #2 (switch open) Gate = 1 Gate = 0 Terminal #2 must be connected to GND (0V).

p-type MOS Transistor p-type is complementary to n-type when Gate has positive voltage, open circuit between #1 and #2 (switch open) when Gate has zero voltage, short circuit between #1 and #2 (switch closed) Gate = 1 Gate = 0 Terminal #1 must be connected to +2.9V.

Logic Gates

Logic Gates Use switch behavior of MOS transistors to implement logical functions: AND, OR, NOT. Digital symbols: recall that we assign a range of analog voltages to each digital (logic) symbol assignment of voltage ranges depends on electrical properties of transistors being used Typical values for "1": +5V, +3.3V, +2.9V from now on we'll use +2.9V

CMOS Circuit Complementary MOS Use both n-type and p-type MOS transistors p-type Attached to + voltage Pulls output voltage UP when input is zero n-type Attached to GND Pulls output voltage DOWN when input is one For all inputs, make sure that output is either connected to GND or to +, but not both!!

Inverter (NOT Gate) Truth table In Out 0 V 2.9 V In Out 1

NOR Gate A B C 1 Note: Serial structure on top, parallel on bottom.

OR Gate A B C 1 Add inverter to NOR.

NAND Gate (AND-NOT) A B C 1 1 Note: Parallel structure on top, serial on bottom.

AND Gate A B C 1 Add inverter to NAND.

Basic Logic Gates

DeMorgan's Law To convert AND to OR (or vice versa), Converting AND to OR (with some help from NOT) Consider the following gates A AND B = A OR B A B 1 To convert AND to OR (or vice versa), invert inputs and output. Same as A+B !

More than 2 Inputs? AND/OR can take any number of inputs. AND = 1 if all inputs are 1. OR = 1 if any input is 1. Similar for NAND/NOR. Can implement with multiple two-input gates, or with single CMOS circuit. Cost problem!!

Combinational Logic Circuit

Building Fucnctions from Logic Gates Combinational Logic Circuit output depends only on the current inputs stateless Sequential Logic Circuit output depends on the sequence of inputs (past and present) stores information (state) from past inputs We'll first look at some useful combinational circuits, then show how to use sequential circuits to store information.

Decoder 2-bit decoder n inputs, 2n outputs exactly one output is 1 for each possible input pattern 2-bit decoder

Multiplexer (MUX) 4-to-1 MUX n-bit selector and 2n inputs, one output output equals one of the inputs, depending on selector 4-to-1 MUX

Full Adder Add two bits and carry-in, produce one-bit sum and carry-out. A B Cin S Cout 1

Four-bit Adder

Logical Completeness Can implement ANY truth table with AND, OR, NOT. 1 1. AND combinations that yield a "1" in the truth table. 2. OR the results of the AND gates.

Basic Storage Elements

Combinational vs. Sequential Combinational Circuit always gives the same output for a given set of inputs ex: adder always generates sum and carry, regardless of previous inputs Sequential Circuit stores information output depends on stored information (state) plus input so a given input might produce different outputs, depending on the stored information example: ticket counter advances when you push the button output depends on previous state useful for building “memory” elements and “state machines”

R-S Latch: Simple Storage Element R is used to “reset” or “clear” the element – set it to zero. S is used to “set” the element – set it to one. If both R and S are one, out could be either zero or one. “quiescent” state -- holds its previous value note: if a is 1, b is 0, and vice versa 1 1 1 1 1 1 1 1

Clearing the R-S latch Suppose we start with output = 1, then change R to zero. Then set R=1 to “store” value in quiescent state. 1 1 1 Output changes to zero. 1 1 1 1

Setting the R-S Latch Suppose we start with output = 0, then change S to zero. Then set S=1 to “store” value in quiescent state. 1 1 1 Output changes to one. 1 1 1 1

R-S Latch Summary R = S = 1 hold current value in latch S = 0, R=1 set value to 1 R = 0, S = 1 set value to 0 R = S = 0 both outputs equal one final state determined by electrical properties of gates Don’t do it!

Homework#2 1. 習題3.1, 3.2, 3.5, 3.6, 3.7, 3.9, 3.10, 3.12, 3.16, 3.22. 繳交期限: 2013/10/21。