Computer Organization Boolean Logic and the CPU i206 Fall 2010 John Chuang Some slides adapted from Marti Hearst, Brian Hayes, or Glenn Brookshear.

Slides:



Advertisements
Similar presentations
ADDER, HALF ADDER & FULL ADDER
Advertisements

Computer Architecture and Data Manipulation Chapter 3.
Computer Organization Computer Architecture, Data Representation, Information Theory i206 Fall 2010 John Chuang Some slides adapted from Marti Hearst,
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Computer Science: An Overview Tenth Edition by J. Glenn Brookshear Chapter.
EECC341 - Shaaban #1 Lec # 1 Winter Introduction to Digital Systems Analog devices and systems process time-varying signals that can take.
1 Foundations of Software Design Lecture 3: How Computers Work Marti Hearst Fall 2002.
Software Design Analysis of Algorithms i206 Fall 2010 John Chuang Some slides adapted from Glenn Brookshear, Marti Hearst, or Goodrich & Tamassia.
I206: Distributed Computing Applications & Infrastructure Fall 2010.
Review for Test 2 i206 Fall 2010 John Chuang. 2 Topics  Operating System and Memory Hierarchy  Algorithm analysis and Big-O Notation  Data structures.
Computer Processing CSCE 110 J. Michael Moore.
Software Design i206 Fall 2010 John Chuang Some slides adapted from Glenn Brookshear, Brian Hayes, Marti Hearst, or James Landay.
Inter-Process Communication i206 Fall 2010 John Chuang Some slides adapted from Coulouris, Dollimore and Kindberg; Calvert and Donahoo.
Operating System & Memory Hierarchy i206 Fall 2010 John Chuang Some slides adapted from Glenn Brookshear, Brian Hayes, or Marti Hearst.
Chapter 2.2 Machine Language.
Course Review i206 Fall 2010 John Chuang. 2 Outline  Test 3 topics  Course review  Course evaluation.
SUPLEMENTARY CHAPTER 1: An Introduction to Digital Logic The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
Distributed Systems & Networks i206 Fall 2010 John Chuang Some slides adapted from Coulouris, Dollimore and Kindberg.
J. Michael Moore Computer Processing CSCE 110. J. Michael Moore ProcessorInputOutput Memory Storage.
Networking and Internetworking i206 Fall 2010 John Chuang.
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
Compsci Today’s topics l Binary Numbers  Brookshear l Computer Architecture  Notes from David A. Patterson and John L. Hennessy, Computer.
1. Fundamentals of Computer Systems Define a computer system Computer Systems in the modern world Professional standards for computer systems Ethical,
Quiz # 2 Chapters 4, 5, & 6.
Chapter 4 Gates and Circuits. Integrated Circuits aka CHIPS What’s in this thing???? 4–2.
Summer 2014 Chapter 1: Basic Concepts. Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Chapter Overview Welcome to Assembly Language.
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.
Logic Design Computer Architecture and Design Lecture 1.
1 i206: Lecture 18: Regular Expressions Marti Hearst Spring 2012.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Monday, December 6 Assignment(s) due:Assignments #11(original or redo), #12 and #EC2 are due tonight Tonight is the last chance to turn in Quizzes #13.
Compsci Today’s topics l Binary Numbers  Brookshear l Slides from Prof. Marti Hearst of UC Berkeley SIMS l Upcoming  Networks Interactive.
1 i206: Lecture 2: Computer Architecture, Binary Encodings, and Data Representation Marti Hearst Spring 2012.
1 i206: Lecture 9: Review; Intro to Algorithms Marti Hearst Spring 2012.
Compsci Today’s topics l Binary Numbers  Brookshear l Slides from Prof. Marti Hearst of UC Berkeley SIMS l Upcoming  Networks Interactive.
The Central Processing Unit (CPU) and the Machine Cycle.
General Concepts of Computer Organization Overview of Microcomputer.
Computer Architecture And Organization UNIT-II General System Architecture.
1 EG 32 Digital Electronics Thought for the day You learn from your mistakes..... So make as many as you can and you will eventually know everything.
1 i206: Lecture 4: The CPU, Instruction Sets, and How Computers Work Marti Hearst Spring 2012.
Computer Architecture Memory, Math and Logic. Basic Building Blocks Seen: – Memory – Logic & Math.
Chapter 2 Data Manipulation. © 2005 Pearson Addison-Wesley. All rights reserved 2-2 Chapter 2: Data Manipulation 2.1 Computer Architecture 2.2 Machine.
Logic Design / Processor and Control Units Tony Diep.
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Transistor: Building.
Computer Organization and Assembly Languages Yung-Yu Chuang 2005/09/29
1 i206: Lecture 3: Boolean Logic, Logic Circuits Marti Hearst Spring 2012.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
Logic Gates Dr.Ahmed Bayoumi Dr.Shady Elmashad. Objectives  Identify the basic gates and describe the behavior of each  Combine basic gates into circuits.
© 2015 Pearson Education Limited 2015 Quiz in last 15 minutes Midterm 1 is next Sunday Assignment 1 due today at 4pm Assignment 2 will be up today; due.
Dr.Ahmed Bayoumi Dr.Shady Elmashad
CS 270: Mathematical Foundations of Computer Science
Computer Organisation
DIGITAL LOGIC CIRCUITS
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
The Central Processing Unit
Basics of digital systems
i206: Lecture 20: Memory Management; Operating Systems
CS105 Introduction to Computer Concepts GATES and CIRCUITS
Week 7: Gates and Circuits: PART II
Logic Gates.
Logic Circuits I Lecture 3.
Computer Organization and Assembly Languages Yung-Yu Chuang 2005/09/29
Digital Circuits and Logic
Presentation transcript:

Computer Organization Boolean Logic and the CPU i206 Fall 2010 John Chuang Some slides adapted from Marti Hearst, Brian Hayes, or Glenn Brookshear

John Chuang2 Boolean Logic CPU Operation Bits & Bytes Binary Numbers Number Systems Gates Boolean Logic Circuits CPU Machine Instructions Assembly Instructions Program Algorithms Application Memory Data compression Compiler/ Interpreter Operating System Data Structures Analysis I/O Memory hierarchy Design Methodologies/ Tools Process Truth table Venn Diagram DeMorgan’s Law Numbers, text, audio, video, image, … Decimal, Hexadecimal, Binary AND, OR, NOT, XOR, NAND, NOR, etc. Register, Cache Main Memory, Secondary Storage Context switch Process vs. Thread Locks and deadlocks Op-code, operands Instruction set arch Lossless v. lossy Info entropy & Huffman code Adders, decoders, Memory latches, ALUs, etc. Data Representation Data storage Principles ALUs, Registers, Program Counter, Instruction Register Network Distributed Systems Security Cryptography Standards & Protocols Inter-process Communication Searching, sorting, Encryption, etc. Stacks, queues, maps, trees, graphs, … Big-O UML, CRC TCP/IP, RSA, … Confidentiality Integrity Authentication … C/S, P2P Caching sockets Formal models Finite automata regex

John Chuang3 Central Processing Unit (CPU)  Software programs consist of arithmetic and logical operations  The CPU or processor of a machine is responsible for executing these operations in hardware  Modern CPUs are implemented using tens of millions of transistors (switches)

John Chuang4 Central Processing Unit (CPU)  CPU components: -Arithmetic/Logic Units (ALU) -Control Unit -Registers -Cache Memory

John Chuang5 Boolean Logic  Boolean algebra = logical calculation of truth values (true/false values)  Basic boolean operators -AND -OR -XOR (exclusive-OR) -NOT

John Chuang6 AND, OR, XOR, and NOT: Gates and Truth Tables

John Chuang7 Boolean Notation U OperatorSymbolExample AND* or orA*B = AB = A B = AB OR+ or UA+B = A U B NOT¬ or ¯ or - ¬(A+B) = (A+B) = -(A+B) XORA B = AB + AB + U +

John Chuang8 Boolean Logic Relationships A BC D Venn Diagram  C = A*B  D = (A+B)  X+X = 1; X*X = 0  X+Y=Y+X; XY = YX  X(Y+Z) = XY + XZ  DeMorgan’s Law: -(A*B) = A + B -(A+B) = A * B

John Chuang9 Exercise  Let’s solve a problem using Boolean Logic -First express the problem using Boolean expressions and/or truth table -Then implement solution using Boolean gates

John Chuang10 NAND, NOR, XNOR  NAND and NOR gates easier to implement in hardware than AND and OR gates  Example: AND logic can be implemented with two NOTs and a NOR (DeMorgan’s Law) A B = A B

John Chuang11 Gates  The Richest Man in the World  Devices that produce the outputs of Boolean operations when given the operations’ input values -Often implemented as electronic circuits called transistors -Provide the building blocks from which computers are constructed -Gates are used to build up circuits that perform computations (e.g., addition, subtraction), or store values to be used later

John Chuang12 Inverter (NOT Gate)  Implements the simplest Boolean operator “NOT” using two transistors  Photolithography techniques used in fabrication of integrated circuit (IC) chips Image and further reading at:

John Chuang13 NAND Gate  NAND gate implemented using 4 transistors

John Chuang14 Integrated Circuit (IC) Chips Contain Gates & Connectors Images from

John Chuang15 Circuits for Binary Addition Half Adder Images from

John Chuang16 Circuits for Binary Addition Full Adder Images from

John Chuang17 Circuits for Binary Addition Full Adder, 4 bit output + carry  Can link up an arbitrary number of input bits  Can modify this easily to do subtraction Images from

John Chuang18 Arithmetic Logic Unit (ALU) Add, Subtract, and Logic Operations multiplexer

John Chuang19 Decoder  Implementation of a truth table  Example: 2-bit decoder -Uses NOTs (invertors) to convert 2 inputs to turn on one (and only one) of 4 outputs Adapted from

John Chuang20 Example: Decoder for LED Clock Images from

John Chuang21 CPU Operation Bits & Bytes Binary Numbers Number Systems Gates Boolean Logic Circuits CPU Machine Instructions Assembly Instructions Program Algorithms Application Memory Data compression Compiler/ Interpreter Operating System Data Structures Analysis I/O Memory hierarchy Design Methodologies/ Tools Process Truth table Venn Diagram DeMorgan’s Law Numbers, text, audio, video, image, … Decimal, Hexadecimal, Binary AND, OR, NOT, XOR, NAND, NOR, etc. Register, Cache Main Memory, Secondary Storage Context switch Process vs. Thread Locks and deadlocks Op-code, operands Instruction set arch Lossless v. lossy Info entropy & Huffman code Adders, decoders, Memory latches, ALUs, etc. Data Representation Data storage Principles ALUs, Registers, Program Counter, Instruction Register Network Distributed Systems Security Cryptography Standards & Protocols Inter-process Communication Searching, sorting, Encryption, etc. Stacks, queues, maps, trees, graphs, … Big-O UML, CRC TCP/IP, RSA, … Confidentiality Integrity Authentication … C/S, P2P Caching sockets Formal models Finite automata regex

John Chuang22 Central Processing Unit (CPU)  Software programs consist of arithmetic and logical operations  The CPU or processor of a machine is responsible for executing these operations in hardware  CPU components -Arithmetic/Logic Units (ALU) -Control Unit -Registers -Cache Memory

John Chuang23 Program execution  Controlled by two special-purpose registers -Program counter: address of next instruction -Instruction register: current instruction  Steps performed by control unit -Fetch -Decode -Execute

John Chuang24 Machine language  Machine instruction: an instruction coded as a bit pattern directly recognizable by the CPU  Machine language: the set of all instructions recognized by a machine -Also known as instruction set architecture (ISA) -E.g., Intel x86, IA-64, MIPS, PowerPC, … -Brookshear Appendix C provides an example

John Chuang25 Example Machine Architecture (Brookshear Appendix C)

John Chuang26 Machine instruction types  Data Transfer: copy data between CPU and main memory  Arithmetic/Logic: use existing data values to compute a new data value  Control: direct the execution of the program

John Chuang27 Parts of a machine instruction  Op-code: specifies which machine operation to execute -One per instruction  Operand: more detailed information about this operation -Number of operands varies depending on op-code  Example:

John Chuang28 Example: Decoding the instruction 35A7

John Chuang29 Example: Addition Operation

John Chuang30 Readings for Next Week  Read: Brookshear Chapter , 6.1  Review: Brookshear Chapter  Read: Brookshear Chapter  Read: -