CS140 Lecture 02a: The Machinery of Computation: Circuits and Gates

Slides:



Advertisements
Similar presentations
Chapter 4 Gates and Circuits.
Advertisements

Chapter 4 Gates and Circuits Nell Dale • John Lewis.
Chapter 4 Gates and Circuits.
Gates and Circuits Nell Dale & John Lewis (adaptation by Erin Chambers and Michael Goldwasser)
CS105 Introduction to Computer Concepts GATES and CIRCUITS
Chapter 4 Gates and Circuits.
Sahar Mosleh PageCalifornia State University San Marcos 1 Introductory Concepts This section of the course introduces the concept of digital circuits and.
Chapter 4 Gates and Circuits.
9/19/06 Hofstra University – Overview of Computer Science, CSC005 1 Chapter 4 Gates and Circuits.
9/19/06 Hofstra University – Overview of Computer Science, CSC005 1 Chapter 4 Gates and Circuits.
Copyright © Cengage Learning. All rights reserved. CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS THE LOGIC OF COMPOUND STATEMENTS.
Gates CS105. Electrical Signals Transmission of data Any electrical signal has a level of voltage – Interpretation of 1s and 0s Generally speaking: –
Lecture 3. Boolean Algebra, Logic Gates
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.
Lecture 8 Topics –Switch –Transistor –CMOS transistor –Logic gates AND, OR, NOT Universal gates: NAND, NOR XOR.
3. DIGITAL ELECTRONICS..
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.
Lecture 3. Error Detection and Correction, Logic Gates Prof. Sin-Min Lee Department of Computer Science 2x.
Chapter 4 Gates and Circuits. Integrated Circuits aka CHIPS What’s in this thing???? 4–2.
Chapter 4 Gates and Circuits.
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Chapter 2: Binary Logic.
CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Elementary Digital Logic Apps O/S Arch  Arch Logic Digital Analog.
CSCI-235 Micro-Computers in Science Hardware Design Part I.
Logic Gates How Boolean logic is implemented. Transistors used as switches to implement Boolean logic: ANDOR Logic with Transistors.
CPS120: Introduction to Computer Science
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.
 In studying digital integrated circuits, one must start with the simplest group of circuit, the SSIs or Small Scale Integrated Circuits. Since these.
Week 6: Gates and Circuits: PART I READING: Chapter 4.
Sneha.  Gates Gates  Characteristics of gates Characteristics of gates  Basic Gates Basic Gates  AND Gate AND Gate  OR gate OR gate  NOT gate NOT.
CSCI-100 Introduction to Computing Hardware Design Part I.
CS151 Introduction to Digital Design Chapter 2: Combinational Logic Circuits Lecture 5: Binary Logic and Gates.
Digital electronics 4–1 Gates and Circuits SANJAYBHAI RAJGURU COLLEGE OF ENGG.
 A transistor is the basic building block of electronic components.  The average computer may have millions of them within its circuits.  Essentially,
L OGIC G ATES Computer Organization – week 3. W HAT ’ S ALU? 1. ALU stands for: Arithmetic Logic Unit 2. ALU is a digital circuit that performs Arithmetic.
Week 1: Introduction and Logic gates IT3002 – Computer Architecture
Logic Gates Unit 16.
Logic gates.
Unit 1 Logical operators.
GCSE OCR Computing A451 Binary logic Computing hardware 6.
CSIS-110 Introduction to Computer Science
Creating logic gates with Minecraft
Basics of Logic gates - Part 2
Basics of Logic gates - Part 1
Dr.Ahmed Bayoumi Dr.Shady Elmashad
CSIS-110 Introduction to Computer Science
CSCI-100 Introduction to Computing
CS140 Lecture 03: The Machinery of Computation: Combinational Logic
Digital Signals Digital Signals have two basic states:
Basic Digital Logic Basic Gates
Fundamentals & Ethics of Information Systems IS 201
Chapter 4 Gates and Circuits.
Basic Electrical Circuits
How Boolean logic is implemented
CS105 Introduction to Computer Concepts GATES and CIRCUITS
Fundamentals of Computer Science Part i2
Agenda – 2/12/18 Questions? Readings: CSI 4, P
Schematics 201 Lecture Topic: Electrical Symbols
Logic Gates.
Boolean Logic Boolean Logic is considered to be the basic of digital electronics. We know that a computer’s most basic operation is based on digital electronics.
Logic Gates.
Chapter 10.3 and 10.4: Combinatorial Circuits
Logic Gates.
Chapter 4 Gates and Circuits.
Introductory Concepts
Copyright © Cengage Learning. All rights reserved.
Basic Electrical Circuits
What are Logic Gates?.
Lecture 4 – Binary Logic and Logic Gates
Presentation transcript:

CS140 Lecture 02a: The Machinery of Computation: Circuits and Gates John Magee 23 January 2017 Some material copyright Jones and Bartlett Thanks to Charles Petzold for some diagrams and Aaron Stevens for some slides.

Overview/Questions In your previous CS courses, you’ve probably learned about abstraction and digital representation of information/data. Now we’re ready to ask some tough questions: What is the machinery of computation? How does digital computation happen? Why did we learn about binary numbers?

The Machinery of Computation The Central Processing Unit (CPU) is where computation happens. The CPU is a microprocessor chip made up of billions (109) of circuits. What is a circuit? What does a circuit do? How are circuits arranged to do computation?

A Plumbing Primer How faucets work A faucet is like an gate, which controls the flow of water. ON: the water flows from the source into the sink. OFF: the water gets stopped at the gate, and never makes it into the sink. Wikimedia Commons – User: Chabacano

Anatomy of a Flashlight A flashlight has 3 main components: A battery A bulb A conductor (e.g. wire)

Anatomy of a Flashlight Here the wires are connected, which forms a sort of circle, called a circuit. The circuit allows electrons to move from a source to a sink. Along the way, the bulb is lit.

Edison’s First Rule of Electricity You cannot make electricity flow without a plug. or, more precisely: Electric current flows through a closed circuit. If the wire is not connected, the circuit is said to be “open”, and the electrons don’t flow. of course, electrons can flow through the air (e.g. lightning, arcs, etc.) but let’s keep it simple for now

We need a switch… Wikimedia Commons: Author Scwerllguy Wikimedia Commons: Author Funpika ON: the electrons flows from the source into the sink. OFF: the electrons gets stopped at the gate, and never makes it into the sink.

… an electronically controlled switch… Vacuum Tubes “a device used to amplify, switch, otherwise modify, or create an electrical signal by controlling the movement of electrons in a low-pressure space” Wikimedia Commons: Dave Fischer

…a small switch! Transistors! a semiconductor device commonly used to amplify or switch electronic signals. AT&T Bell Labs – 1947 The greatest invention of the 20th century? Wikimedia Commons – User: Transisto

Light Switch Circuits We will now consider several examples to demonstrate some techniques for wiring circuits with light switches. This link brings up a great animated/interactive version, but I’ve reproduced “still” pictures on the following slides. http://www.charlespetzold.com/blog/2007/09/LogicalSwitches.xaml http://www.charlespetzold.com/blog/2007/09/ThreeWaySwitch.xaml

Switches in Series Consider this arrangement, called wiring in series. (the light is off)

Switches in Series Now we close one switch (e.g. connect the wire) (the light is still off)

Switches in Series Now we close the other switch (e.g. connect the wire) (the light is still off)

Switches in Series Now we close both switches (e.g. connect the wire) (now the light is on)

Switches in Series: Summary Left Switch Right Switch Light Bulb OFF ON Light is on if and only if both switches were closed (on).

Building Blocks These wiring arrangements are the fundamental building blocks of computer circuitry. Each switch has 2 states (on or off) Each light bulb has 2 states (on or off) We can abstractly describe switches and bulbs as each having a 1 bit state.

Building Blocks Gates (not Bill) Simple electric circuits which perform like our light switch examples. The input values explicitly determine the output values. We assume the “switch” is controlled by a electronic input rather than a physical switch.

Describing Gates and Circuits We describe gates and circuits using: Boolean expressions Uses Boolean algebra, a mathematical notation for expressing two-valued (T/F) logic. Logic diagrams A graphical representation of a circuit; each gate has its own symbol. Truth tables A table showing all possible input value and the associated output values.

AND Gate Just like wiring in series. The AND gate accepts two input signals. The output is 1 if and only if both inputs are 1. Otherwise the output is 0. Figure 4.2 Various representations of an AND gate Just like wiring in series.

Switches in Parallel Now let’s try connecting the switches a little differently. Consider this arrangement, called wiring in parallel. (the light is off)

Switches in Parallel Now we close just the top switch. (the light came on!)

Switches in Parallel Or we just the bottom switch. (the light is still on!)

Switches in Parallel Or we close both switches! (the light is still on!)

Switches in Parallel: Summary Top Switch Bottom Switch Light Bulb OFF ON Light is on if either switch alone, or both switches together are closed (on).

OR Gate The OR gate accepts two input signals. The output is 1 if either input is 1. The output is 0 if both inputs are 0. Figure 4.3 Various representations of a OR gate Just like wiring in parallel.

A 3-Way Switch Consider this arrangement, called wiring a 3-way switch. Both switches are to the left (the light is off).

A 3-Way Switch Now we have one switch left, one switch right. (the light is on).

A 3-Way Switch Now we have one switch right, one switch left. (the light came one)

A 3-Way Switch Now we have both switches to the right. (now the light is off again)

3 Way Switch: Summary Left Switch Right Switch Light Bulb LEFT OFF ON Light is on if and only if one switch is left and the other switch is right

XOR Gate An XOR (eXclusive OR) gate accepts two input signals. When the 2 inputs differ, the output is 1 When both inputs are the same, the output is 0 Figure 4.4 Various representations of an XOR gate Just like wiring with a 3-way switch.

NOT Gate The NOT gate accepts one input signal (0 or 1). The output is the opposite. Figure 4.1 Various representations of a NOT gate A NOT Gate is also called an inverter.

Combinational Circuits Combines some basic gates (AND, OR, XOR, NOT) into a more complex circuit. Outputs from one circuit flow into the inputs of another circuit. The input values explicitly determine the output values.

Combinational Circuits Three inputs require eight rows to describe all possible input combinations (23 = 8): This same circuit using a Boolean expression is (AB + AC) Canonical Representation: AB’C + ABC’ + ABC

Take-Away Points Gates control the flow of electric current. Basic logic gates (AND, OR, XOR, NOT) Combination gates