Intro To Digital Logic

Similar documents
Switches: basic element of physical implementations

CS 61C: Great Ideas in Computer Architecture Synchronous Digital Systems

Floating Point Representation and Digital Logic. Lecture 11 CS301

Digital Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits.

E40M. Binary Numbers. M. Horowitz, J. Plummer, R. Howe 1

CS61c: Representations of Combinational Logic Circuits

EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits)

CS 226: Digital Logic Design

CMSC 313 Lecture 17. Focus Groups. Announcement: in-class lab Thu 10/30 Homework 3 Questions Circuits for Addition Midterm Exam returned

Outline. EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) Combinational Logic (CL) Defined

Boolean Algebra. The Building Blocks of Digital Logic Design. Section. Section Overview. Binary Operations and Their Representation.

Chapter 1 :: From Zero to One

Digital Circuits. 1. Inputs & Outputs are quantized at two levels. 2. Binary arithmetic, only digits are 0 & 1. Position indicates power of 2.

Computer organization

UC Berkeley College of Engineering, EECS Department CS61C: Representations of Combinational Logic Circuits

Gates and Logic: From switches to Transistors, Logic Gates and Logic Circuits

COSC 243. Introduction to Logic And Combinatorial Logic. Lecture 4 - Introduction to Logic and Combinatorial Logic. COSC 243 (Computer Architecture)

Implementation of Boolean Logic by Digital Circuits

ECE/CS 250 Computer Architecture

CMPE12 - Notes chapter 1. Digital Logic. (Textbook Chapter 3)

CSE140: Components and Design Techniques for Digital Systems. Introduction. Instructor: Mohsen Imani

Chapter 2: Switching Algebra and Logic Circuits

Lecture A: Logic Design and Gates

Computer Organization: Boolean Logic

ECE 250 / CPS 250 Computer Architecture. Basics of Logic Design Boolean Algebra, Logic Gates

Computer Science. 20. Combinational Circuits. Computer Science COMPUTER SCIENCE. Section

From Physics to Logic

Gates and Logic: From Transistors to Logic Gates and Logic Circuits

School of Computer Science and Electrical Engineering 28/05/01. Digital Circuits. Lecture 14. ENG1030 Electrical Physics and Electronics

ELEC Digital Logic Circuits Fall 2014 Switching Algebra (Chapter 2)

Boolean Algebra & Digital Logic

Lecture 22 Chapters 3 Logic Circuits Part 1

Digital Logic. Lecture 5 - Chapter 2. Outline. Other Logic Gates and their uses. Other Logic Operations. CS 2420 Husain Gholoom - lecturer Page 1

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Digital Logic

Introduction to Computer Engineering ECE 203

ECE/CS 250: Computer Architecture. Basics of Logic Design: Boolean Algebra, Logic Gates. Benjamin Lee

CMPE12 - Notes chapter 2. Digital Logic. (Textbook Chapters and 2.1)"

EECS150 - Digital Design Lecture 19 - Combinational Logic Circuits : A Deep Dive

Applications. Smartphone, tablet, game controller, antilock brakes, microprocessor, Wires

20. Combinational Circuits

DIGITAL TECHNICS. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 1. LECTURE: COMBINATONAL CIRCUITS BASIC CONCEPTS

Fundamentals of Digital Design

Binary addition example worked out

CMSC 313 Lecture 16 Postulates & Theorems of Boolean Algebra Semiconductors CMOS Logic Gates

Introduction to CMOS VLSI Design Lecture 1: Introduction

Introduction to Computer Engineering. CS/ECE 252, Fall 2012 Prof. Guri Sohi Computer Sciences Department University of Wisconsin Madison

Chapter 2 Combinational Logic Circuits

CPE100: Digital Logic Design I

control in out in out Figure 1. Binary switch: (a) opened or off; (b) closed or on.

Introduction to Computer Engineering. CS/ECE 252, Spring 2017 Rahul Nayar Computer Sciences Department University of Wisconsin Madison

EE141-Fall 2011 Digital Integrated Circuits

Digital electronic systems are designed to process voltage signals which change quickly between two levels. Low time.

4 Switching Algebra 4.1 Axioms; Signals and Switching Algebra

2.1. Unit 2. Digital Circuits (Logic)

Gates and Logic: From Transistors to Logic Gates and Logic Circuits

Section 3: Combinational Logic Design. Department of Electrical Engineering, University of Waterloo. Combinational Logic

Chapter 2 Combinational Logic Circuits

CMSC 313 Lecture 16 Announcement: no office hours today. Good-bye Assembly Language Programming Overview of second half on Digital Logic DigSim Demo

Fundamentals of Computer Systems

THE LOGIC OF COMPOUND STATEMENTS

EEE130 Digital Electronics I Lecture #4

Welcome to EECS 150: Components and Design Techniques for Digital Systems

CPS311 Lecture: Introduction to Digital Logic

Chapter 2: Boolean Algebra and Logic Gates

Fundamentals of Computer Systems

CSC258: Computer Organization. Digital Logic: Transistors and Gates

Lab 3 Revisited. Zener diodes IAP 2008 Lecture 4 1

2009 Spring CS211 Digital Systems & Lab CHAPTER 2: INTRODUCTION TO LOGIC CIRCUITS

Unit 8A Computer Organization. Boolean Logic and Gates

of Digital Electronics

CS311 Lecture: Introduction to Digital Logic

. T SHREE MAHAPRABHU PUBLIC SCHOOL & COLLEGE NOTES FOR BOARD EXAMINATION SUBJECT COMPUTER SCIENCE (Code: 083) Boolean Algebra

CSC9R6 Computer Design. Practical Digital Logic

Digital Logic (2) Boolean Algebra

Computer Science. 19. Combinational Circuits. Computer Science COMPUTER SCIENCE. Section 6.1.

Lecture 7: Logic design. Combinational logic circuits

XOR - XNOR Gates. The graphic symbol and truth table of XOR gate is shown in the figure.

Experiment 7: Magnitude comparators

Fundamentals of Computer Systems

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

CMSC 313 Lecture 15 Good-bye Assembly Language Programming Overview of second half on Digital Logic DigSim Demo

Building a Computer Adder

Overview. Multiplexor. cs281: Introduction to Computer Systems Lab02 Basic Combinational Circuits: The Mux and the Adder

Why digital? Overview. Number Systems. Binary to Decimal conversion

CMSC 313 Lecture 18 Midterm Exam returned Assign Homework 3 Circuits for Addition Digital Logic Components Programmable Logic Arrays

1.10 (a) Function of AND, OR, NOT, NAND & NOR Logic gates and their input/output.

CMOS Technology Worksheet

Every time has a value associated with it, not just some times. A variable can take on any value within a range

Welcome to EECS 150: Components and Design Techniques for Digital Systems

Week-I. Combinational Logic & Circuits

Digital Electronics Part 1: Binary Logic

Lecture 0: Introduction

EECS Variable Logic Functions

EEC 116 Lecture #5: CMOS Logic. Rajeevan Amirtharajah Bevan Baas University of California, Davis Jeff Parkhurst Intel Corporation

Designing Information Devices and Systems II Fall 2017 Miki Lustig and Michel Maharbiz Homework 1. This homework is due September 5, 2017, at 11:59AM.

Lecture 6: Time-Dependent Behaviour of Digital Circuits

Number System conversions

Gates and Flip-Flops

Fig. 1 CMOS Transistor Circuits (a) Inverter Out = NOT In, (b) NOR-gate C = NOT (A or B)

Transcription:

Intro To Digital Logic 1

Announcements... Project 2.2 out But delayed till after the midterm Midterm in a week Covers up to last lecture + next week's homework & lab Nick goes "H-Bomb of Justice" About a dozen and change caught Don't Lie To Me That makes me up the yield... And really don't cheat on Project 2... 2

Levels of Representation/Interpretation lw $t0, 0($2) lw $t1, 4($2) sw $t1, 0($2) sw $t0, 4($2) Machine Interpretation High Level Language Program (e.g., C) Compiler Assembly Language Program (e.g., MIPS) Assembler Machine Language Program (MIPS) Hardware Architecture Description (e.g., block diagrams) Architecture Implementation Logic Circuit Description (Circuit Schematic Diagrams) temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; Anything can be represented as a number, i.e., data or instructions 0000 1001 1100 0110 1010 1111 0101 1000 1010 1111 0101 1000 0000 1001 1100 0110 1100 0110 1010 1111 0101 1000 0000 1001 0101 1000 0000 1001 1100 0110 1010 1111 3

Hardware Design Next several weeks: how a modern processor is built, starting with basic elements as building blocks Why study hardware design? Understand capabilities and limitations of HW in general and processors in particular What processors can do fast and what they can t do fast (avoid slow things if you want your code to run fast!) Background for more in-depth HW courses (EECS 151, CS 152) Hard to know what you ll need for next 30 years There is only so much you can do with standard processors: you may need to design own custom HW for extra performance Even some commercial processors today have customizable hardware! 4

Synchronous Digital Systems: Almost Every Processor etc... Synchronous: All operations coordinated by a central clock Heartbeat of the system! Anynchronous systems much much much much harder to design & debug Digital: Represent all values by discrete values Two binary digits: 1 and 0, or True and False Electrical signals are treated as 1 s and 0 s 1 and 0 are complements of each other High/low voltage for true/false, 1/0 These days, even a lot of analog circuitry is best done as: Put it through an analog to digital converter, do it all digitally in a synchronous circuit, and output to a digital-to-analog converter 5

Switches: Basic Element of Physical Implementations Implementing a simple circuit (arrow shows action if wire changes to 1 or is asserted): A Z On-switch (if A is 1 or asserted) turns-on light bulb (Z) A Z Off-switch (if A is 0 or unasserted) turns-off light bulb (Z) Z A 6

Switches (cont d) Compose switches into more complex ones (Boolean functions): A B AND Z A and B OR A Z A or B B 7

Historical Note Early computer designers built ad hoc circuits from switches Began to notice common patterns in their work: ANDs, ORs, Master s thesis (by Claude Shannon, 1940) made link between work and 19th Century Mathematician George Boole Called it Boolean in his honor Could apply math to give theory to hardware design, minimization, 8

Transistors High voltage (V dd ) represents 1, or true The Raspberry Pi: V dd ~ 1.2 Volt Low voltage (0 Volt or Ground) represents 0, or false Pick a midpoint voltage to decide if a 0 or a 1 Voltage greater than midpoint = 1 Voltage less than midpoint = 0 This removes noise as signals propagate a big advantage of digital systems over analog systems If one switch can control another switch, we can build a computer! Our switches: CMOS transistors 9

CMOS Transistor Networks Modern digital systems designed in CMOS MOS: Metal-Oxide on Semiconductor Describes how the transistors are constructed These are "Field Effect Transistors" (MOSFETs) C for complementary: use pairs of normally-on and normally-off switches CMOS transistors act as voltage-controlled switches Similar, though easier to work with, than electro-mechanical relay switches from earlier era Use energy primarily when switching But not completely: they do "leak" a bit 10

CMOS Transistors Gate Source Drain Three terminals: source, gate, and drain Switch action: if voltage on gate terminal is (some amount) higher/lower than source terminal then conducting path established between drain and source terminals (switch is closed) Source Gate Drain Source Gate Note circle symbol to indicate NOT or complement Drain n-channel transitor off when voltage at Gate is low on when: voltage(gate) > voltage (Threshold) p-channel transistor on when voltage at Gate is low off when: voltage(gate) > voltage (Threshold) 11

#2: Moore s Law # of transistors on an integrated circuit (IC) Predicts: 2X Transistors / chip every 2 years Modern microprocessor chips include several billion transistors Gordon Moore Intel Cofounder B.S. Cal 1950! Year 12

Intel 14nm Technology Plan view of transistors Side view of wiring layers 13

Sense of Scale Source: Mark Bohr, IDF14 14

CMOS Circuit Rules Don t pass weak values => Use Complementary Pairs N-type transistors pass weak 1 s (V dd - V th ) N-type transistors pass strong 0 s (ground) Use N-type transistors only to pass 0 s (N for negative) Converse for P-type transistors: Pass weak 0s, strong 1s Pass weak 0 s (V th ), strong 1 s (V dd ) Use P-type transistors only to pass 1 s (P for positive) Use pairs of N-type and P-type to get strong values Never leave a wire undriven Make sure there s always a path to Vdd or GND Never create a path from Vdd to GND (ground) This would short-circuit the power supply! 15

CMOS Networks p-channel transistor on when voltage at Gate is low off when: voltage(gate) > voltage (Threshold) X what is the relationship between x and y? x y 1V 0V Y 0 Volt (GND) 1 Volt (Vdd) 1 Volt (Vdd) 0 Volt (GND) n-channel transitor off when voltage at Gate is low on when: voltage(gate) > voltage (Threshold) Called an inverter or not gate 16

Two-Input Networks X Y what is the relationship between x, y and z? x y z 1V 0 Volt 0 Volt 1 Volt Z 0 Volt 1 Volt 1 Volt 0 Volt 1 Volt 1 Volt 0V 1 Volt 1 Volt 0 Volt Called a NAND gate (NOT AND) 17

Clickers/Peer Instruction X Y x y z A B C D 1V 0 Volt 0 Volt 0 0 1 1 Volts Z 0 Volt 1 Volt 1 Volt 0 Volt 0 1 0 1 0 1 0 1 Volts Volts 0v 1 Volt 1 Volt 1 1 0 0 Volts 18

Combinational Logic Symbols Common combinational logic systems have standard symbols called logic gates Buffer, NOT A Z AND, NAND OR, NOR A B A B Z Z Inverting versions (NOT, NAND, NOR) easiest to implement with CMOS transistors (the switches we have available and use most) 19

Boolean Algebra Use plus + for OR logical sum Use product for AND (a b or implied via ab) logical product Hat to mean complement (NOT) Thus ab + a + c = a b + a + c = (a AND b) OR a OR (NOT c ) 20

Representations of Combinational Logic (groups of logic gates) Truth Table Enumerate Inputs Sum of Products, Product of Sums Methods Enumerate Inputs Boolean Expression Use Equivalency between boolean operators and gates Gate Diagram 21

Truth Tables for Combinational Logic A B C D F Y Exhaustive list of the output value generated for each combination of inputs How many logic functions can be defined with N inputs? 22

Truth Table Example #1: y= F(a,b): 1 iff a b a b y 0 0 0 Y = A B + A B 0 1 1 1 0 1 1 1 0 Y = A + B XOR 23

Truth Table Example #2: 2-bit Adder A1 A0 B1 B0 + C2 C1 C0 How Many Rows? 24

Truth Table Example #3: 32-bit Unsigned Adder How Many Rows? 25

Truth Table Example #4: 3-input Majority Circuit Y = A B C + A B C + A B C + A B C This is called Sum of Products form; Just another way to represent the TT as a logical expression Y = B C + A (B C + B C) Y = B C + A (B + C) More simplified forms (fewer gates and wires) 26

And in Conclusion, Multiple Hardware Representations Analog voltages quantized to represent logic 0 and logic 1 Transistor switches form gates: AND, OR, NOT, NAND, NOR Truth table mapped to gates for combinational logic design Boolean algebra for gate minimization 27