CS101 Lecture 25: The Machinery of Computation: Computer Architecture. John Magee 29 July 2013 Some material copyright Jones and Bartlett

Similar documents
CS140 Lecture 03: The Machinery of Computation: Combinational Logic

Von Neumann Architecture

Dec Hex Bin ORG ; ZERO. Introduction To Computing

Computer Organization and Levels of Abstraction

Computer Organization and Levels of Abstraction

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

Electricity: Voltage. Gate: A signal enters the gate at a certain voltage. The gate performs operations on it, and sends it out was a new signal.

Introduction to Computer Science. Homework 1

COSC 243. Computer Architecture 1. COSC 243 (Computer Architecture) Lecture 6 - Computer Architecture 1 1

Let s put together a Manual Processor

Chapter 5 12/2/2013. Objectives. Computer Systems Organization. Objectives. Objectives (continued) Introduction. INVITATION TO Computer Science 1

COSC 122 Computer Fluency. Computer Organization. Dr. Ramon Lawrence University of British Columbia Okanagan

Software and Hardware

CS 101, Mock Computer Architecture

CC411: Introduction To Microprocessors

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

Computer Systems. Binary Representation. Binary Representation. Logical Computation: Boolean Algebra

Show how to connect three Full Adders to implement a 3-bit ripple-carry adder

Computer Architecture Review. ICS332 - Spring 2016 Operating Systems

Arithmetic Circuits. Design of Digital Circuits 2014 Srdjan Capkun Frank K. Gürkaynak.

Lecture 21: Combinational Circuits. Integrated Circuits. Integrated Circuits, cont. Integrated Circuits Combinational Circuits

CS 261 Fall Mike Lam, Professor. Combinational Circuits

address ALU the operation opcode ACC Acc memory address

CS1004: Intro to CS in Java, Spring 2005

CO Computer Architecture and Programming Languages CAPL. Lecture 9

EXPERIMENT #8: BINARY ARITHMETIC OPERATIONS

Arithmetic-logic units

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

CSCI170 Lecture 1: Analysis of Programming Languages. John Magee 1 September 2011 Some material copyright Jones and Bartlett

In this lecture, we will look at how storage (or memory) works with processor in a computer system. This is in preparation for the next lecture, in

Digital Systems. John SUM Institute of Technology Management National Chung Hsing University Taichung, ROC. December 6, 2012

CS 140 Introduction to Computing & Computer Technology. Computing Components

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

CS 31: Intro to Systems Digital Logic

von Neumann Architecture Basic Computer System Early Computers Microprocessor Reading Assignment An Introduction to Computer Architecture

Basic Computer System. von Neumann Architecture. Reading Assignment. An Introduction to Computer Architecture. EEL 4744C: Microprocessor Applications

COS 116 The Computational Universe Laboratory 7: Digital Logic I

Level 2: The Hardware World Chapters 4 and 5 (topics of other cs courses)

8086 INTERNAL ARCHITECTURE

EET 1131 Lab #7 Arithmetic Circuits

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language

Segment 1A. Introduction to Microcomputer and Microprocessor

ECE 341 Midterm Exam

EE 3170 Microcontroller Applications

CSC 220: Computer Organization Unit 10 Arithmetic-logic units

Processor: Faster and Faster

2. Computer Evolution and Performance

COMPUTER SYSTEM. COMPUTER SYSTEM IB DP Computer science Standard Level ICS3U. COMPUTER SYSTEM IB DP Computer science Standard Level ICS3U

Chapter 5: Computer Systems Organization

Chapter 5: Computer Systems Organization. Invitation to Computer Science, C++ Version, Third Edition

Register Transfer and Micro-operations

CS140 Lecture 09a: Brief History of Computing

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Introduction to Computing Module No: CS/ES/1 Quadrant 1 e-text

CSE 141L Computer Architecture Lab Fall Lecture 3

Processors. Nils Jansen and Kasper Brink. (based on slides from Jeroen Keiren, Marc Seutter and David N. Jansen)

Introduction to Microcontrollers

Binary Addition. Add the binary numbers and and show the equivalent decimal addition.

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

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

Week 6: Processor Components

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

Intel 8086 MICROPROCESSOR ARCHITECTURE

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

CPU Architecture system clock

Digital Circuits. Page 1 of 5. I. Before coming to lab. II. Learning Objectives. III. Materials

Concept of Memory. The memory of computer is broadly categories into two categories:

Systems Architecture

COMS 1003 Fall Introduction to Computer Programming in C. History & Computer Organization. September 15 th

Lecture (01) Introducing Embedded Systems and the Microcontrollers By: Dr. Ahmed ElShafee

A Review of Chapter 5 and. CSc 2010 Spring 2012 Instructor: Qian Hu

Wednesday, February 4, Chapter 4

Machine Architecture. or what s in the box? Lectures 2 & 3. Prof Leslie Smith. ITNP23 - Autumn 2014 Lectures 2&3, Slide 1

Computer Architecture

Basic Arithmetic (adding and subtracting)

Computers: Inside and Out

Computer Architecture Review CS 595

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

Microcontroller Systems

TUTORIAL Describe the circumstances that would prompt you to use a microprocessorbased design solution instead of a hard-wired IC logic design.

Lecture 6: Signed Numbers & Arithmetic Circuits. BCD (Binary Coded Decimal) Points Addressed in this Lecture

ELEC 326: Class project

Building a Virtual Computer

ECE Lab 8. Logic Design for a Direct-Mapped Cache. To understand the function and design of a direct-mapped memory cache.

CS 261 Fall Mike Lam, Professor. Logic Gates

Topics. Computer Organization CS Exam 2 Review. Infix Notation. Reverse Polish Notation (RPN)

Dr. Chuck Cartledge. 10 June 2015

Many ways to build logic out of MOSFETs

Information Science 1

Computer Systems Architecture

16.1. Unit 16. Computer Organization Design of a Simple Processor

CS311 Lecture: The Architecture of a Simple Computer

CS101 Lecture 29: Brief History of Computing

For your convenience Apress has placed some of the front matter material after the index. Please use the Bookmarks and Contents at a Glance links to

Behind the Curtain. Introduce TA Friday 1 st lab! (1:30-3:30) (Do Prelab before) 1 st Problem set on Thurs. Comp 411 Fall /16/13

Microprocessors/Microcontrollers

Computer Organization and Programming


CS 31: Intro to Systems Caching. Martin Gagne Swarthmore College March 23, 2017

Lecture 1. Course Overview and The 8051 Architecture

Transcription:

CS101 Lecture 25: The Machinery of Computation: Computer Architecture John Magee 29 July 2013 Some material copyright Jones and Bartlett 1 Overview/Questions What did we do last time? Can we relate this circuit stuff to something we know something about? How can we combine these elements to do more complicated tasks? 2 1

What did we talk about last time? Circuits control the flow of electricity. Gates are simple logical systems. By combining several gates, we create logic-computing circuits. Logic-computing circuits can do binary number addition. 3 Integrated Circuits Integrated circuit (also called a chip) A piece of silicon on which multiple (many) gates have been embedded. Silicon pieces are mounted on a plastic or ceramic package with pins along the edges that can be soldered onto circuit boards or inserted into appropriate sockets 4 2

Integrated Circuits 5 Central Processor Units The most important integrated circuit in any computer is the Central Processing Unit, or CPU. The Intel Duo Core 2 processor has more than 1.9 billion (1.9 * 10 9 ) gate transistors on one chip. The CPU combines many gates, to enable a small number of instructions. Examples: Add/subtract 2 binary inputs Load a value from memory Store a value into memory 6 3

Recall Binary Number Addition Adding two 1-bit numbers together produces A sum bit A carry bit http://www.cs.bu.edu/courses/cs101/labs/ecs_2e/applets/applets/binaryadd/applet_frame.htm 7 Recall: The Full Adder The full adder takes 3 inputs: A, B, and a carry-in value Figure 4.10 A full adder 8 4

Here is the Full Adder, with its internal details hidden (an abstraction). The Full Adder What matters now are: inputs are A, B, and CI. outputs are S and CO 9 An 8-bit Adder To add two 8-bit numbers together, we need an 8-bit adder: Notice how the carry out from one bit s adder becomes the carry-in to the next adder. 10 5

An 8-bit Adder We can abstract away the 1-bit adders, And summarize with this diagram: Notice the inputs and outputs. 11 Output from the Adder The adder produces 2 outputs: Sum (multi-bit), Carry Out (1-bit) Where does the output go from here? Accumulator A circuit connected to an adder, which stores the adder s result. 12 6

Putting it Together The accumulator is a memory circuit, and is wired as both an output from the adder and an input back into the adder. 13 Accumulator Example Suppose we want to add 3 numbers: 1) Clear the accumulator (set to all 0s) 2) Load the first input into the adder 3) Compute the sum of accumulator + input 4) Result flows back into accumulator 5) Go to step 2 with next input 14 7

Input to the Adder The adder takes inputs A, B are two binary numbers (Carry-in should be 0) How do we feed numbers into the adder? Random Access Memory A large memory unit which stores data before/after processing. 15 Random Access Memory Memory cells are circuits which each hold a 1 bit value, grouped into 8-bit bytes. Each byte of memory has a unique address corresponding to its location within the circuit, so that it can be located. 8

Memory Memory Address A physical location in the computer s memory. Addressability The number of bits stored in each addressable location in memory. (A byte in our example.) Word Size The number of bits used in each memory address. This dictates how much physical memory can be addressed. Example: A 32-bit machine has 2 32 = 4,294,967,296 possible memory addresses. 17 Putting it together Input to the adder now comes from RAM. One issue we ll need to deal with: how to specify which data to fetch from RAM. 18 9

Putting it together Here s a more complete version, which takes another input for a memory address: 19 What about Subtraction? 2s complement Recall that binary subtraction is accomplished by adding the 2s complement of a number. Inverter A circuit built using NOT gates, which inverts all bits turning 1s into 0s and 0s into 1s. The inverter creates a 1s complement of its input. Adding 1 to this gives a 2s complement number, suitable for doing subtraction. (How could we add 1 to the inverted number?) 20 10

Putting it together Using an inverter, we can do addition and subtraction. Now we need a way to control the inverter. 21 From Adding Machine What we ve got is an machine that can do addition/subtraction in circuitry. It can read data from memory, and write data back to memory. We haven t dealt with how to: Specify from which address memory to read. Specify which operation to perform (add/subtract). Specify to which address to write. 22 11

to Automatic Computer We need a way to tell the machine to: Load some data from memory (by address) into the adder. Perform Add or Subtract Store data from the accumulator into the memory (by address) What we need is a a way to program it. 23 Computer Programming, 0.X The earliest digital computers were programmed by wiring them up to perform some specific logic. Pictured: Harvard Mark I 24 12

Computer Programming, 0.X Later, instructions were programmed by flipping switches. Pictured: Digital Equipment PDP-8 Demo: http://www.youtube.com/watch?v=dpioentahuy 25 Stored Program Computer John von Neumann (a mathematician who worked on the atomic bomb) Described a computer architecture in which instructions are read from the memory space (RAM), just like data. This design enables programmability, by making it relatively easy to provide new instructions to the computer s hardware. 26 13

Stored Program Computer (Von Neumann Architecture) Figure 5.1 The von Neumann architecture 27 Central Processing Unit Central Processing Unit (CPU) Refers to the combination of the Arithmetic/Logic Unit and the Control Unit. The ALU performs basic arithmetic operations and logic operations. Examples: Arithmetic: addition, subtraction, multiplication Logical operations: AND, OR, NOT, XOR 28 14

Central Processing Unit Central Processing Unit (CPU) Refers to the combination of the Arithmetic/Logic Unit and the Control Unit. The control unit coordinates the flow of operations and data in the computer. coordinates the ALU and memory Keeps track of which instruction to do in a Program Counter (PC) 29 Adder Inverter Accumulator Instructions Take-Away Points Von Neumann Architecture CPU: ALU/CU 30 15

Student To Dos Readings: Reed ch 7, pp 121-134 HW posted on course schedule. Ask for help / visit TF hours. Wednesday Lab: Bring a headset or microphone if you have one. Most laptops have built-in microphones as well. Warning: Homework assignments can be very time consuming! 31 16