CS 1308 – Computer Literacy and the Internet. It’s Not Magic  The goal of the next series of lectures is to show you exactly how a computer works. 

Slides:



Advertisements
Similar presentations
Part 4: combinational devices
Advertisements

Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, Java Version, Third Edition.
Invitation to Computer Science, C++ Version, Third Edition
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third Edition.
The Logic Machine We looked at programming at the high level and at the low level. The question now is: How can a physical computer be built to run a program?
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third & Fourth Edition Spring 2008:
Building Computer Circuits Chapter 4.4. CMPUT101 Introduction to Computing(c) Yngvi Bjornsson2 Purpose We have looked at so far how to build logic gates.
Chapter 4 Gates and Circuits.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third Edition.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Fourth Edition.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Hao Ji.
Lecture 3. Boolean Algebra, Logic Gates
16/07/2015CSE1303 Part B lecture notes 1 Hardware Implementation Lecture B17 Lecture notes section B17.
CHAPTER 4 CS BUILDING BLOCKS: BINARY NUMBERS, BOOLEAN LOGIC, GATES.
Lecture 3. Boolean Algebra, Logic Gates Prof. Sin-Min Lee Department of Computer Science 2x.
Binary System and Logical Gates
Lecture 3. Error Detection and Correction, Logic Gates Prof. Sin-Min Lee Department of Computer Science 2x.
CPSC 171 Introduction to Computer Science Boolean Logic, Gates, & Circuits.
Test #1 rescheduled to next Tuesday, 09/20/05 The contents will cover chapter 1, 2, and part of Chapter 4. The contents will cover chapter 1, 2, and part.
Homework Problems 1. M1 runs the program P in 1.4 * 9 * ns or ns M2 runs the program P in 1.6*9800*10ns or ns Hence M2 is faster by.
Chapter 4 Gates and Circuits. Integrated Circuits aka CHIPS What’s in this thing???? 4–2.
Chapter 4 The Building Blocks: Binary Numbers, Boolean Logic, and Gates.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
CSCI-235 Micro-Computers in Science Hardware Design Part I.
Basic Arithmetic (adding and subtracting)
Logic Gates How Boolean logic is implemented. Transistors used as switches to implement Boolean logic: ANDOR Logic with Transistors.
Invitation to Computer Science 5th Edition
CPS120: Introduction to Computer Science
Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Roadmap Problems Algorithms.
1 The Chinese University of Hong Kong Faculty of Education Diploma in Education (Part-Time) Winter 1997 Educational Communications and Technology Assignment.
1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.
Introduction to Digital Logic and Circuits EE 101, Fall 2015 University of Kentucky.
Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /10/2013 Lecture 5: Combinational Logic Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE.
Digital Logic Structures MOS transistors logic gates functional units of a computer.
Invitation to Computer Science 6th Edition Chapter 4 The Building Blocks: Binary Numbers, Boolean Logic, and Gates.
Computer Science 101 Circuit Design - Examples. Sum of Products Algorithm Identify each row of the output that has a 1. Identify each row of the output.
CSCI-100 Introduction to Computing Hardware Design Part I.
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
Digital Logic. 2 Abstractions in CS (gates) Basic Gate: Inverter IO IO GNDI O Vcc Resister (limits conductivity) Truth Table.
Logic Design CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
CDA 3101 Fall 2013 Introduction to Computer Organization The Arithmetic Logic Unit (ALU) and MIPS ALU Support 20 September 2013.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science,
CS 1308 – Computer Literacy and the Internet Building the CPU.
CPS3340 Computer Architecture Fall Semester, 2013
Computer Science 101 More Devices: Arithmetic. From 1-Bit Equality to N-Bit Equality = A B A = B Two bit strings.
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.
Arithmetic Logic Unit (ALU) Introduction to Computer Yung-Yu Chuang with slides by Sedgewick & Wayne ( introcs.cs.princeton.edu ), Nisan & Schocken (
LECTURE 4 Logic Design. LOGIC DESIGN We already know that the language of the machine is binary – that is, sequences of 1’s and 0’s. But why is this?
1 3 Computing System Fundamentals 3.2 Computer Architecture.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
1 CS/COE0447 Computer Organization & Assembly Language Logic Design Appendix C.
Invitation to Computer Science, C++ Version, Fourth Edition
Combinational Circuits
Prof. Sin-Min Lee Department of Computer Science
CSCI-100 Introduction to Computing
Fundamentals & Ethics of Information Systems IS 201
Invitation to Computer Science, Java Version, Third Edition
Invitation to Computer Science, C++ Version, Third Edition
Computer Science 210 Computer Organization
Fundamentals of Computer Science Part i2
The Building Blocks: Binary Numbers, Boolean Logic, and Gates
Invitation to Computer Science 6th Edition
Digital Logic.
Chapter 5: Computer Systems Organization
Digital Logic.
COMS 361 Computer Organization
Combinational Circuits
Digital Circuits and Logic
Presentation transcript:

CS 1308 – Computer Literacy and the Internet

It’s Not Magic  The goal of the next series of lectures is to show you exactly how a computer works.  We will discuss the logic used to create computer instructions and how the computer decides which instructions to execute.  Although at times it may appear to be magical. It’s just math and science. 2

Our Picture of a Computer Data Bus memory input/ output control unit arithmetic- logic unit Central Processing Unit (CPU) registers

The Reliability of Binary Representation  Electronic devices are most reliable in a bistable environment  Bistable environment  Distinguishing only two electronic states  Current flowing or not  Direction of flow  Computers are bistable: hence binary representations 4

A Switch is a 2-state device that can be toggled A relay is a switch built with an electromagnet 5 controlled current controlling current when the controlling current is 1, the electromagnet pulls the switch closed, and the controlled current flows through the switch

Switches can do it all  With switches we can implement AND, OR, and NOT gates  With just those types of gates, we can design circuits to perform any computation  Remember, computers do very simple tasks, very quickly 6

Basic electric circuits: Computing AND CS Computer Fluency 7 in1 in2 out truth table for AND } when both inputs are 1, the circuit is closed and in1 in2 out = in1 in2 out power source in1 in2

Basic electric circuits: Computing OR 8 in1 in2 out truth table for OR } in1 in2 out or = in1 + in2 out in1 in2 when either input is 1, the circuit is closed

Basic electric circuits: Computing NOT 9 in1 out truth table for NOT } A new type of switch which is closed at rest in1 out = in1’ not out in1

A better switch: Transistors  bi-stable, solid state device  switching is done electronically, not mechanically  no moving parts; therefore, fast, small, reliable  can switch states in about one 10 billionth of a second  about 5 million transistors can fit on a chip 1 centimeter square. Density is increasing rapidly with new technology. 10

Figure 4.11 Simplified Model of a Transistor CS Computer Fluency 11

Boolean Logic and Gates: Boolean Logic  Boolean logic describes operations on true/false values  True/false maps easily onto bistable environment  Boolean logic operations on electronic signals may be built out of transistors and other electronic devices 12

Boolean Logic (continued)  Boolean expressions  Constructed by combining together Boolean operations  Example: (a AND b) OR ((NOT b) AND (NOT a))  Truth tables capture the output/value of a Boolean expression  A column for each input plus the output  A row for each combination of input values 13

Boolean Logic (continued)  Example: (a AND b) OR ((NOT b) and (NOT a)) 14 abValue

Building Computer Circuits: Introduction  A circuit is a collection of logic gates:  Transforms a set of binary inputs into a set of binary outputs  Values of the outputs depend only on the current values of the inputs  Combinational circuits have no cycles in them (no outputs feed back into their own inputs) 15

A Compare-for-equality Circuit  Compare-for-equality circuit  CE compares two unsigned binary integers for equality  Built by combining together 1-bit comparison circuits (1-CE)  Integers are equal if corresponding bits are equal (AND together 1-CD circuits for each pair of bits) 16

A Compare-for-equality Circuit (continued)  1-CE circuit truth table 17 abOutput

Figure 4.22 One-Bit Compare for Equality Circuit CS Computer Fluency 18

A Compare-for-equality Circuit (continued)  1-CE Boolean expression  First case: (NOT a) AND (NOT b)  Second case: a AND b  Combined: ((NOT a) AND (NOT b)) OR (a AND b) 19

Examples Of Circuit Design And Construction  Compare-for-equality circuit  Addition circuit  Both circuits can be built using the sum-of- products algorithm 20

An Addition Circuit  Addition circuit  Adds two unsigned binary integers, setting output bits and an overflow  Built from 1-bit adders (1-ADD)  Starting with rightmost bits, each pair produces  A value for that order  A carry bit for next place to the left 21

An Addition Circuit (continued)  1-ADD truth table  Input  One bit from each input integer  One carry bit (always zero for rightmost bit)  Output  One bit for output place value  One “carry” bit 22

Figure 4.24 The 1-ADD Circuit and Truth Table 23

An Addition Circuit (continued)  Building the full adder  Put rightmost bits into 1-ADD, with zero for the input carry  Send 1-ADD’s output value to output, and put its carry value as input to 1-ADD for next bits to left  Repeat process for all bits 24

Computer Instructions  The logic for every instruction is executed on every cycle by the Arithmetic and Logic Unit (ALU).  The answer used is the one for the instruction that is currently decoded and executed by the CPU.  This selection is done by the Control Circuits. 25

Control Circuits  Do not perform computations  Choose order of operations or select among data values described by the instruction  The pattern of ones and zeros in each instruction will determine the which result is used from the ALU 26

Control Circuits (cont.)  Major types of controls circuits  Multiplexors  Select one of inputs to send to output  Decoders  Sends a 1 on one output line, based on what input line indicates CS 1308 – Computer Literacy and the Internet 27

Summary  Binary values create a bistable environment, making computers reliable  Boolean logic maps easily onto electronic hardware  Circuits are constructed using Boolean expressions as an abstraction  Computational and control circuits may be built from Boolean gates 28