Computer Internals ECE2036. Lecture 2. ECE2036 Computer Internals Spring / 12

Size: px
Start display at page:

Download "Computer Internals ECE2036. Lecture 2. ECE2036 Computer Internals Spring / 12"

Transcription

1 Computer Internals ECE2036 Lecture 2 ECE2036 Computer Internals Spring / 12

2 Components of a Computer 1 Central Processing Unit (CPU) 2 Memory 3 Input/Output Devices The computer actually has a number of other components, such as a power supply, case, cables, PCI bus, AGP bus, and many more. For the purposes of this class, we can safely ignore all of these and focus on the three components listed above. ECE2036 Computer Internals Spring / 12

3 Central Processing Unit 1 The CPU is the brains of the computer. 2 Step by step execution (think steps in an Algorithm) 3 Very simple operations (called Instructions) 1 Add, Subtract, Multiply, Divide two numbers 2 Compare two numbers 3 Advance to the next instruction 4 Conditionally Branch to a different instruction 5 Read or write a memory location 6 Read or write an input/output device 4 Instructions are stored in memory 5 After executing an instruction, the CPU automatically advances to the next instruction and executes that, unless the previous instruction was a Branch. ECE2036 Computer Internals Spring / 12

4 Memory Memory has two conceptually different attributes 1 Address 1 The Address identifies a particular memory location. 2 Similar to a page number identifying a particular page in a book, but does not identify what is written on that page. 3 Addresses are numbered sequentially from zero to N 1, where N is the size of the memory installed in the computer. For example, if you have 1GB (Giga-Byte) of memory, the locations are numbered from zero to 1,073,741, Contents 1 The contents of a memory location is the number stored (Remembered) in a given address. 2 Each memory location has only a limited range of values that can be stored. For example, a typical integer value can only store values in the range of zero to 4,294,967,295. There is quite a bit more to the story about memory addresses and the range of values mentioned above that we will discuss later in class. For now, the above discussion is sufficient. ECE2036 Computer Internals Spring / 12

5 Input/Output Devices 1 Keyboard 2 Mouse 3 Monitor 4 Disk Drives 5 CD/DVD Drives 6 Network interface (Internet) 7 Audio Output (speakers, headphones) 8 Audio Input (microphone) 9 Universial Serial Bus (USB) devices In general, it is not possible for programs that you write to access any of these devices directly. Rather, the operating system (Windows, Linux, Mac OSX) is responsible for doing this on behalf or your program. ECE2036 Computer Internals Spring / 12

6 Computer Conceptual Model ECE2036 Computer Internals Spring / 12

7 Computer Conceptual Model (More Realistic) ECE2036 Computer Internals Spring / 12

8 CPU Registers All modern CPU s have built-in Registers. Usually just a small number (our sample CPU in the previous slide had 8). The registers are just memory locations, conceptually identical the to the main memory discussed earlier. The difference is that the CPU can read and write registers much much faster than reading and writing main memory. For example, register access usually takes a few nano-seconds, as opposed to a few tens of nano-seconds to access main memory. All arithmetic and comparision operations are register to register All memory read operations are memory to register All memory write operations are register to memory ECE2036 Computer Internals Spring / 12

9 CPU Instruction Set, Loads and Stores LDM R d, C Load Memory Read memory location C and store contents in register R d. LDM R d, R i, C Load Memory Read memory location C + R i and store contents in register R d. LDI R d, C Load Immediate Store the value C in register R d. LD R d, R s Load Copy the value of register R s into register R d. STM R s, C Store Memory Store the contents of register R s into memory location C. STM R s, R i, C Store Memory Store the contents of register R s into memory location C + R i. ECE2036 Computer Internals Spring / 12

10 CPU Instruction Set, Arithmetic Operations ADD R d, R s, R t Add Compute R s + R t, store results in R d ADDI R d, R s, C Add Immediate Compute R s + C, store results in R d SUB R d, R s, R t Subtract Compute R s R t, store results in R d SUBI R d, R s, C Subtract Immediate Compute R s C, store results in register R d MUL R d, R s, R t Multiply Compute R s R t, store results in R d DIV R d, R s, R t Divide Compute R s /R t, store results in R d (Integer quotient) MOD R d, R s, R t Modulus Compute R s MODULO R t, store results in R d (Integer remainder) ECE2036 Computer Internals Spring / 12

11 CPU Instruction Set, Branching Operations BLT R s, R t, I Branch if Less Than Branch to instruction at address I if R s < R t. BLE R s, R t, I Branch if Less Than or Equal Branch to instruction at address I if R s R t. BGT R s, R t, I Branch if Greater Than Branch to instruction at address I if R s > R t. BGE R s, R t, I Branch if Greater Than or Equal Branch to instruction at address I if R s R t. BEQ R s, R t, I Branch if Equal To Branch to instruction at address I if R s = R t. BNE R s, R t, I Branch if Not Equal To Branch to instruction at address I if R s R t. HLT Halt Stop Processing. Note No real processor has a HLT instruction ECE2036 Computer Internals Spring / 12

12 Averaging Algorithm, Assembly Code # Program t o compute average o f an a r r a y o f numbers LDI, R0,0 # Index i n t o d LDM, R1, Length # Get value of l ength LDI, R2,0 # I n i t a l i z e Sum to zero Loop : LDM, R4, R0, d # Read next element ADD, R2, R2, R4 # Add to sum STM, R2,Sum # Store r e s u l t i n Sum ADDI, R0, R0,1 # Increment index BLT, R0, R1, Loop # Repeat while index < length DIV, R0, R2, R1 # Sum / n STM, R0, Avg # Store r e s u l t i n Avg HLT # Done ECE2036 Computer Internals Spring / 12

Describing and Implementing Algorithms

Describing and Implementing Algorithms Describing and Implementing Algorithms ECE2036 Lecture 1 ECE2036 Describing and Implementing Algorithms Spring 2016 1 / 19 What is an Algorithm? According to Wikipedia: An algorithm is a sequence of instructions,

More information

Concurrency ECE2893. Lecture 12. ECE2893 Concurrency Spring / 16

Concurrency ECE2893. Lecture 12. ECE2893 Concurrency Spring / 16 Concurrency ECE2893 Lecture 12 ECE2893 Concurrency Spring 2011 1 / 16 Single Core Architectures 1 Recall that in the very beginning of the class we discussed the basic architecture of a modern computer,

More information

The Assembly Language of the Boz 5

The Assembly Language of the Boz 5 The Assembly Language of the Boz 5 The Boz 5 uses bits 31 27 of the IR as a five bit opcode. Of the possible 32 opcodes, only 26 are implemented. Op-Code Mnemonic Description 00000 HLT Halt the Computer

More information

Word Bank - questions 1-6. Place the letter of the matching term in the space provided. (2 pts. each)

Word Bank - questions 1-6. Place the letter of the matching term in the space provided. (2 pts. each) CpSc 2310 Exam 1 Spring 2012 Name: Word Bank - questions 1-6. Place the letter of the matching term in the space provided. (2 pts. each) A. accumulator machine B. address C. assembler D. ALU E. CPU F.

More information

Introduction to MIPS Processor

Introduction to MIPS Processor Introduction to MIPS Processor The processor we will be considering in this tutorial is the MIPS processor. The MIPS processor, designed in 1984 by researchers at Stanford University, is a RISC (Reduced

More information

Chapter 04: Instruction Sets and the Processor organizations. Lesson 08: Processor Instructions - Part 1

Chapter 04: Instruction Sets and the Processor organizations. Lesson 08: Processor Instructions - Part 1 Chapter 04: Instruction Sets and the Processor organizations Lesson 08: Processor Instructions - Part 1 1 Objective Understand the load, store instructions and register transfer instructions Understand

More information

ECE 30 Introduction to Computer Engineering

ECE 30 Introduction to Computer Engineering ECE 30 Introduction to Computer Engineering Study Problems, Set #3 Spring 2015 Use the MIPS assembly instructions listed below to solve the following problems. arithmetic add add sub subtract addi add

More information

LAB 1: MC68000 CPU PROGRAMMING DATA TRANSFER INSTRUCTIONS

LAB 1: MC68000 CPU PROGRAMMING DATA TRANSFER INSTRUCTIONS LAB 1: MC68000 CPU PROGRAMMING DATA TRANSFER INSTRUCTIONS OBJECTIVES At the end of the laboratory works, you should be able to write simple assembly language programs for the MC68000 CPU using data transfer

More information

ECE232: Hardware Organization and Design. Computer Organization - Previously covered

ECE232: Hardware Organization and Design. Computer Organization - Previously covered ECE232: Hardware Organization and Design Part 6: MIPS Instructions II http://www.ecs.umass.edu/ece/ece232/ Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Computer Organization

More information

Compiling Techniques

Compiling Techniques Lecture 10: An Introduction to MIPS assembly 18 October 2016 Table of contents 1 Overview 2 3 Assembly program template.data Data segment: constant and variable definitions go here (including statically

More information

Topic Notes: MIPS Instruction Set Architecture

Topic Notes: MIPS Instruction Set Architecture Computer Science 220 Assembly Language & Comp. Architecture Siena College Fall 2011 Topic Notes: MIPS Instruction Set Architecture vonneumann Architecture Modern computers use the vonneumann architecture.

More information

2.2 THE MARIE Instruction Set Architecture

2.2 THE MARIE Instruction Set Architecture 2.2 THE MARIE Instruction Set Architecture MARIE has a very simple, yet powerful, instruction set. The instruction set architecture (ISA) of a machine specifies the instructions that the computer can perform

More information

COMP MIPS instructions 2 Feb. 8, f = g + h i;

COMP MIPS instructions 2 Feb. 8, f = g + h i; Register names (save, temporary, zero) From what I have said up to now, you will have the impression that you are free to use any of the 32 registers ($0,..., $31) in any instruction. This is not so, however.

More information

I. instruction J. instruction register K. label L. load M. load/store machine N. location counter (loc) O. MAR P. MDR

I. instruction J. instruction register K. label L. load M. load/store machine N. location counter (loc) O. MAR P. MDR CpSc 231 Exam 1 Spring 2012 Name: Word Bank - questions 1-10. Place the letter of the matching term in the space provided. A. accumulator machine B. address C. assembler D. ALU E. CPU F. direct addressing

More information

ECE 372 Microcontroller Design Assembly Programming. ECE 372 Microcontroller Design Assembly Programming

ECE 372 Microcontroller Design Assembly Programming. ECE 372 Microcontroller Design Assembly Programming Assembly Programming HCS12 Assembly Programming Basic Assembly Programming Top Assembly Instructions (Instruction You Should Know!) Assembly Programming Concepts Assembly Programming HCS12 Assembly Instructions

More information

bits 5..0 the sub-function of opcode 0, 32 for the add instruction

bits 5..0 the sub-function of opcode 0, 32 for the add instruction CS2 Computer Systems note 1a Some MIPS instructions More details on these, and other instructions in the MIPS instruction set, can be found in Chapter 3 of Patterson and Hennessy. A full listing of MIPS

More information

We will use the accumulator machine architecture to demonstrate pass1 and pass2.

We will use the accumulator machine architecture to demonstrate pass1 and pass2. Accumulator machine We will use the accumulator machine architecture to demonstrate pass1 and pass2. The accumulator machine - has one processor register: the accumulator - all other operands are in memory,

More information

Machine Architecture and Number Systems CMSC104. Von Neumann Machine. Major Computer Components. Schematic Diagram of a Computer. First Computer?

Machine Architecture and Number Systems CMSC104. Von Neumann Machine. Major Computer Components. Schematic Diagram of a Computer. First Computer? CMSC104 Lecture 2 Remember to report to the lab on Wednesday Topics Machine Architecture and Number Systems Major Computer Components Bits, Bytes, and Words The Decimal Number System The Binary Number

More information

EE 3170 Microcontroller Applications

EE 3170 Microcontroller Applications Lecture Overview EE 3170 Microcontroller Applications Lecture 7 : Instruction Subset & Machine Language: Conditions & Branches in Motorola 68HC11 - Miller 2.2 & 2.3 & 2.4 Based on slides for ECE3170 by

More information

Processor design - MIPS

Processor design - MIPS EASY Processor design - MIPS Q.1 What happens when a register is loaded? 1. The bits of the register are set to all ones. 2. The bit pattern in the register is copied to a location in memory. 3. A bit

More information

MIPS Architecture and Assembly Language Overview

MIPS Architecture and Assembly Language Overview MIPS Architecture and Assembly Language Overview Adapted from: http://edge.mcs.dre.g.el.edu/gicl/people/sevy/architecture/mipsref(spim).html [Register Description] [I/O Description] Data Types and Literals

More information

RISC-V Assembly and Binary Notation

RISC-V Assembly and Binary Notation RISC-V Assembly and Binary Notation L02-1 Course Mechanics Reminders Course website: http://6004.mit.edu All lectures, videos, tutorials, and exam material can be found under Information/Resources tab.

More information

Quiz 2 CSCI 1103 Computer Science I Honors KEY. Tuesday November 8, 2016 Instructor Muller Boston College. Fall 2016

Quiz 2 CSCI 1103 Computer Science I Honors KEY. Tuesday November 8, 2016 Instructor Muller Boston College. Fall 2016 Quiz 2 CSCI 1103 Computer Science I Honors KEY Tuesday November 8, 2016 Instructor Muller Boston College Fall 2016 Please do not write your name on the top of this quiz. Before reading further, please

More information

1 5. Addressing Modes COMP2611 Fall 2015 Instruction: Language of the Computer

1 5. Addressing Modes COMP2611 Fall 2015 Instruction: Language of the Computer 1 5. Addressing Modes MIPS Addressing Modes 2 Addressing takes care of where to find data instruction We have seen, so far three addressing modes of MIPS (to find data): 1. Immediate addressing: provides

More information

ECE331: Hardware Organization and Design

ECE331: Hardware Organization and Design ECE331: Hardware Organization and Design Lecture 15: Midterm 1 Review Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Basics Midterm to cover Book Sections (inclusive) 1.1 1.5

More information

Chapter 04: Instruction Sets and the Processor organizations. Lesson 18: Stack-based processor Organisation

Chapter 04: Instruction Sets and the Processor organizations. Lesson 18: Stack-based processor Organisation Chapter 04: Instruction Sets and the Processor organizations Lesson 18: Stack-based processor Organisation 1 Objective To understand stack based processor organisation Instruction set of a stack organized

More information

Lecture 6 Decision + Shift + I/O

Lecture 6 Decision + Shift + I/O Lecture 6 Decision + Shift + I/O Instructions so far MIPS C Program add, sub, addi, multi, div lw $t0,12($s0) sw $t0, 12($s0) beq $s0, $s1, L1 bne $s0, $s1, L1 j L1 (unconditional branch) slt reg1,reg2,reg3

More information

MIPS ISA and MIPS Assembly. CS301 Prof. Szajda

MIPS ISA and MIPS Assembly. CS301 Prof. Szajda MIPS ISA and MIPS Assembly CS301 Prof. Szajda Administrative HW #2 due Wednesday (9/11) at 5pm Lab #2 due Friday (9/13) 1:30pm Read Appendix B5, B6, B.9 and Chapter 2.5-2.9 (if you have not already done

More information

Computer Architecture and Assembly Language 11/30/2017

Computer Architecture and Assembly Language 11/30/2017 Computer Architecture and Assembly Language 11/30/2017 1 Announcements PS 7 is ready Today: Computer Architecture and Assembly Language Reading: Chapter 9 of Conery Acknowledgement: Some of this lecture

More information

Computer Architecture and Assembly Language

Computer Architecture and Assembly Language Announcements Computer Architecture and Assembly Language 11/30/2017 PS 7 is ready Today: Computer Architecture and Assembly Language Reading: Chapter 9 of Conery Acknowledgement: Some of this lecture

More information

SAM Architecture Reference (Revised)

SAM Architecture Reference (Revised) SAM Architecture Reference (Revised) Mika Nyström Department of Computer Science California Institute of Technology Pasadena, California, U.S.A. 2000 April 19, 2000 Revised April 2, 2002 1. Introduction

More information

Chapter 2. Instructions:

Chapter 2. Instructions: Chapter 2 1 Instructions: Language of the Machine More primitive than higher level languages e.g., no sophisticated control flow Very restrictive e.g., MIPS Arithmetic Instructions We ll be working with

More information

Arithmetic for Computers

Arithmetic for Computers MIPS Arithmetic Instructions Cptr280 Dr Curtis Nelson Arithmetic for Computers Operations on integers Addition and subtraction; Multiplication and division; Dealing with overflow; Signed vs. unsigned numbers.

More information

Computer Architecture Homework #1 Due: September 7, 2007 (F) (4 PM in ITT 305 mailbox or under my office door, ITT 313)

Computer Architecture Homework #1 Due: September 7, 2007 (F) (4 PM in ITT 305 mailbox or under my office door, ITT 313) Computer Architecture Homework #1 Due: September 7, 2007 (F) (4 PM in ITT 305 mailbox or under my office door, ITT 313) Type of Instruction Memory Access (Load and Store) Move Load Address Arithmetic Instruction

More information

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture Computer Science 324 Computer Architecture Mount Holyoke College Fall 2009 Topic Notes: MIPS Instruction Set Architecture vonneumann Architecture Modern computers use the vonneumann architecture. Idea:

More information

Assembler: Basics. Alberto Bosio October 20, Univeristé de Montpellier

Assembler: Basics. Alberto Bosio October 20, Univeristé de Montpellier Assembler: Basics Alberto Bosio bosio@lirmm.fr Univeristé de Montpellier October 20, 2017 Assembler Program Template. t e x t / S t a r t o f the program code s e c t i o n /.data / V a r i a b l e s /

More information

Programmable Machines

Programmable Machines Programmable Machines Silvina Hanono Wachman Computer Science & Artificial Intelligence Lab M.I.T. Quiz 1: next week Covers L1-L8 Oct 11, 7:30-9:30PM Walker memorial 50-340 L09-1 6.004 So Far Using Combinational

More information

MIPS Assembly Language

MIPS Assembly Language MIPS Assembly Language Chapter 15 S. Dandamudi Outline MIPS architecture Registers Addressing modes MIPS instruction set Instruction format Data transfer instructions Arithmetic instructions Logical/shift/rotate/compare

More information

Number Systems and Their Representations

Number Systems and Their Representations Number Representations Cptr280 Dr Curtis Nelson Number Systems and Their Representations In this presentation you will learn about: Representation of numbers in computers; Signed vs. unsigned numbers;

More information

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

Computer Systems. Binary Representation. Binary Representation. Logical Computation: Boolean Algebra Binary Representation Computer Systems Information is represented as a sequence of binary digits: Bits What the actual bits represent depends on the context: Seminar 3 Numerical value (integer, floating

More information

General-purpose computers

General-purpose computers General-purpose computers We ve seen how to implement any algorithm as a digital circuit But we usually can t implement a new digital circuits for each algorithm. If we could implement only ONE algorithm

More information

Quick Review. lw $t0, 4($a0) Registers x Memory. $a0 is simply another name for register 4 $t0 is another name for register (green sheet)

Quick Review. lw $t0, 4($a0) Registers x Memory. $a0 is simply another name for register 4 $t0 is another name for register (green sheet) CSE378 Lecture 3 Today: Finish up memory Control-flow (branches) in MIPS if/then loops case/switch (maybe) Start: Array Indexing vs. Pointers In particular pointer arithmetic String representation 1 Quick

More information

Programming with QtSpim: A User s Manual

Programming with QtSpim: A User s Manual Programming with QtSpim: A User s Manual John McCranie November 15, 2013 1 1 Introduction to SPIM Spim is a self-contained simulator that runs MIPS32 programs. It utilizes the instruction set originally

More information

MIPS Assembly Language Guide

MIPS Assembly Language Guide MIPS Assembly Language Guide MIPS is an example of a Reduced Instruction Set Computer (RISC) which was designed for easy instruction pipelining. MIPS has a Load/Store architecture since all instructions

More information

Overview. Introduction to the MIPS ISA. MIPS ISA Overview. Overview (2)

Overview. Introduction to the MIPS ISA. MIPS ISA Overview. Overview (2) Introduction to the MIPS ISA Overview Remember that the machine only understands very basic instructions (machine instructions) It is the compiler s job to translate your high-level (e.g. C program) into

More information

Programmable Machines

Programmable Machines Programmable Machines Silvina Hanono Wachman Computer Science & Artificial Intelligence Lab M.I.T. Quiz 1: next week Covers L1-L8 Oct 11, 7:30-9:30PM Walker memorial 50-340 L09-1 6.004 So Far Using Combinational

More information

Introduction to Embedded Microcomputer Systems Lecture 8.1. Computers in the future may weigh no more than 1.5 tons Popular Science, 1949

Introduction to Embedded Microcomputer Systems Lecture 8.1. Computers in the future may weigh no more than 1.5 tons Popular Science, 1949 Introduction to Embedded Microcomputer Systems Lecture 8.1 Computers in the future may weigh no more than 1.5 tons Popular Science, 1949 Recap Debugging: Monitor, dump TExaS Real 9S12DG Overview Addition

More information

Machine Architecture and Number Systems

Machine Architecture and Number Systems Machine Architecture and Number Systems Topics Major Computer Components Bits, Bytes, and Words The Decimal Number System The Binary Number System Converting from Binary to Decimal Converting from Decimal

More information

ECE 2035 Programming HW/SW Systems Fall problems, 6 pages Exam One 19 September 2012

ECE 2035 Programming HW/SW Systems Fall problems, 6 pages Exam One 19 September 2012 Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate

More information

EE 3170 Microcontroller Applications

EE 3170 Microcontroller Applications EE 37 Microcontroller Applications Lecture 8: Instruction Subset & Machine Language: A Brief Tour of the 68HC Instruction Set - Miller 2.4 & 5.2-5.3 & Appendix A Based on slides for ECE37 by Profs. Davis,

More information

ECE/CS 552: Introduction to Computer Architecture ASSIGNMENT #1 Due Date: At the beginning of lecture, September 22 nd, 2010

ECE/CS 552: Introduction to Computer Architecture ASSIGNMENT #1 Due Date: At the beginning of lecture, September 22 nd, 2010 ECE/CS 552: Introduction to Computer Architecture ASSIGNMENT #1 Due Date: At the beginning of lecture, September 22 nd, 2010 This homework is to be done individually. Total 9 Questions, 100 points 1. (8

More information

MIPS Assembly Programming

MIPS Assembly Programming COMP 212 Computer Organization & Architecture COMP 212 Fall 2008 Lecture 8 Cache & Disk System Review MIPS Assembly Programming Comp 212 Computer Org & Arch 1 Z. Li, 2008 Comp 212 Computer Org & Arch 2

More information

Computer Architecture

Computer Architecture Computer Architecture Computer Architecture Hardware INFO 2603 Platform Technologies Week 1: 04-Sept-2018 Computer architecture refers to the overall design of the physical parts of a computer. It examines:

More information

MIPS Memory Access Instructions

MIPS Memory Access Instructions MIPS Memory Access Instructions MIPS has two basic data transfer instructions for accessing memory lw $t0, 4($s3) #load word from memory sw $t0, 8($s3) #store word to memory The data is loaded into (lw)

More information

The MIPS Instruction Set Architecture

The MIPS Instruction Set Architecture The MIPS Set Architecture CPS 14 Lecture 5 Today s Lecture Admin HW #1 is due HW #2 assigned Outline Review A specific ISA, we ll use it throughout semester, very similar to the NiosII ISA (we will use

More information

ELEC / Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2)

ELEC / Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2) ELEC 5200-001/6200-001 Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2) Victor P. Nelson, Professor & Asst. Chair Vishwani D. Agrawal, James J. Danaher Professor Department

More information

Logic and Computer Design Fundamentals. Chapter 1 Digital Computers and Information

Logic and Computer Design Fundamentals. Chapter 1 Digital Computers and Information Logic and Computer Design Fundamentals Chapter 1 Digital Computers and Information Overview Digital Systems and Computer Systems Information Representation Number Systems [binary, octal and hexadecimal]

More information

Cache Organizations for Multi-cores

Cache Organizations for Multi-cores Lecture 26: Recap Announcements: Assgn 9 (and earlier assignments) will be ready for pick-up from the CS front office later this week Office hours: all day next Tuesday Final exam: Wednesday 13 th, 7:50-10am,

More information

Chapter 1. Computer Abstractions and Technology

Chapter 1. Computer Abstractions and Technology Chapter 1 Computer Abstractions and Technology The Computer Revolution Progress in computer technology Underpinned by Moore s Law Makes novel applications feasible Computers in automobiles Cell phones

More information

Fast Arithmetic. Philipp Koehn. 19 October 2016

Fast Arithmetic. Philipp Koehn. 19 October 2016 Fast Arithmetic Philipp Koehn 19 October 2016 1 arithmetic Addition (Immediate) 2 Load immediately one number (s0 = 2) li $s0, 2 Add 4 ($s1 = $s0 + 4 = 6) addi $s1, $s0, 4 Subtract 3 ($s2 = $s1-3 = 3)

More information

CS232 Final Exam May 5, 2001

CS232 Final Exam May 5, 2001 CS232 Final Exam May 5, 2 Name: This exam has 4 pages, including this cover. There are six questions, worth a total of 5 points. You have 3 hours. Budget your time! Write clearly and show your work. State

More information

Supplement for MIPS (Section 4.14 of the textbook)

Supplement for MIPS (Section 4.14 of the textbook) Supplement for MIPS (Section 44 of the textbook) Section 44 does a good job emphasizing that MARIE is a toy architecture that lacks key feature of real-world computer architectures Most noticable, MARIE

More information

Computer Systems Architecture

Computer Systems Architecture Computer Systems Architecture http://cs.nott.ac.uk/ txa/g51csa/ Thorsten Altenkirch and Liyang Hu School of Computer Science and IT University of Nottingham Lecture 05: Comparisons, Loops and Bitwise Operations

More information

Computer Architecture 2/26/01 Lecture #

Computer Architecture 2/26/01 Lecture # Computer Architecture 2/26/01 Lecture #9 16.070 On a previous lecture, we discussed the software development process and in particular, the development of a software architecture Recall the output of the

More information

EEC 483 Computer Organization

EEC 483 Computer Organization EEC 483 Computer Organization Chapter 3. Arithmetic for Computers Chansu Yu Table of Contents Ch.1 Introduction Ch. 2 Instruction: Machine Language Ch. 3-4 CPU Implementation Ch. 5 Cache and VM Ch. 6-7

More information

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 153) Pass Marks: 24

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 153) Pass Marks: 24 Prepared By ASCOL CSIT 2070 Batch Institute of Science and Technology 2065 Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 153) Pass

More information

CSCI 402: Computer Architectures. Instructions: Language of the Computer (4) Fengguang Song Department of Computer & Information Science IUPUI

CSCI 402: Computer Architectures. Instructions: Language of the Computer (4) Fengguang Song Department of Computer & Information Science IUPUI CSCI 402: Computer Architectures Instructions: Language of the Computer (4) Fengguang Song Department of Computer & Information Science IUPUI op Instruction address 6 bits 26 bits Jump Addressing J-type

More information

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA MIPS ISA. In a CPU. (vonneumann) Processor Organization

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA MIPS ISA. In a CPU. (vonneumann) Processor Organization CISC 662 Graduate Computer Architecture Lecture 4 - ISA MIPS ISA Michela Taufer http://www.cis.udel.edu/~taufer/courses Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer Architecture,

More information

MIPS Instruction Format

MIPS Instruction Format MIPS Instruction Format MIPS uses a 32-bit fixed-length instruction format. only three different instruction word formats: There are Register format Op-code Rs Rt Rd Function code 000000 sssss ttttt ddddd

More information

Chapter 2 Data Manipulation

Chapter 2 Data Manipulation Chapter 2 Data Manipulation Dr. Farzana Rahman Assistant Professor Department of Computer Science James Madison University 1 What the chapter is about? 2.1 Computer Architecture 2.2 Machine Language 2.3

More information

Contents. Slide Set 1. About these slides. Outline of Slide Set 1. Typographical conventions: Italics. Typographical conventions. About these slides

Contents. Slide Set 1. About these slides. Outline of Slide Set 1. Typographical conventions: Italics. Typographical conventions. About these slides Slide Set 1 for ENCM 369 Winter 2014 Lecture Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Winter Term, 2014 ENCM 369 W14 Section

More information

Integer Arithmetic. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

Integer Arithmetic. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University Integer Arithmetic Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu EEE3050: Theory on Computer Architectures, Spring 2017, Jinkyu Jeong (jinkyu@skku.edu)

More information

EE 361 University of Hawaii Fall

EE 361 University of Hawaii Fall C functions Road Map Computation flow Implementation using MIPS instructions Useful new instructions Addressing modes Stack data structure 1 EE 361 University of Hawaii Implementation of C functions and

More information

Chapter 5: Computer Arithmetic. In this chapter you will learn about:

Chapter 5: Computer Arithmetic. In this chapter you will learn about: Slide 1/29 Learning Objectives In this chapter you will learn about: Reasons for using binary instead of decimal numbers Basic arithmetic operations using binary numbers Addition (+) Subtraction (-) Multiplication

More information

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA CISC 662 Graduate Computer Architecture Lecture 4 - ISA Michela Taufer http://www.cis.udel.edu/~taufer/courses Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer Architecture,

More information

Programming the Motorola MC68HC11 Microcontroller

Programming the Motorola MC68HC11 Microcontroller Programming the Motorola MC68HC11 Microcontroller COMMON PROGRAM INSTRUCTIONS WITH EXAMPLES aba Add register B to register A Similar commands are abx aby aba add the value in register B to the value in

More information

CMSC 104 -Lecture 2 John Y. Park, adapted by C Grasso

CMSC 104 -Lecture 2 John Y. Park, adapted by C Grasso CMSC 104 -Lecture 2 John Y. Park, adapted by C Grasso 1 Topics Major Computer Components Bits, Bytes, and Words The Decimal Number System The Binary Number System Converting from Binary to Decimal Converting

More information

... Executing conditional instructions

... Executing conditional instructions 1 2 Executing conditional instructions Our design to this point has been the SISD (single instruction single data) architecture This is fine if we wish to execute in a purely sequential mode We now wish

More information

ECE232: Hardware Organization and Design

ECE232: Hardware Organization and Design ECE232: Hardware Organization and Design Lecture 2: Hardware/Software Interface Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Overview Basic computer components How does a microprocessor

More information

Integer Multiplication and Division

Integer Multiplication and Division Integer Multiplication and Division COE 301 Computer Organization Prof. Muhamed Mudawar College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals Presentation Outline

More information

Computer Architecture and System Software Lecture 02: Overview of Computer Systems & Start of Chapter 2

Computer Architecture and System Software Lecture 02: Overview of Computer Systems & Start of Chapter 2 Computer Architecture and System Software Lecture 02: Overview of Computer Systems & Start of Chapter 2 Instructor: Rob Bergen Applied Computer Science University of Winnipeg Announcements Website is up

More information

Sparse Notes on an MIPS Processor s Architecture and its Assembly Language

Sparse Notes on an MIPS Processor s Architecture and its Assembly Language Sparse Notes on an MIPS Processor s Architecture and its Assembly Language February 6, 2004 1 Introduction In this notes we are not going in details with the architecture of an MIPS processor, but only

More information

Lecture 01: Basic Structure of Computers

Lecture 01: Basic Structure of Computers CSCI2510 Computer Organization Lecture 01: Basic Structure of Computers Ming-Chang YANG mcyang@cse.cuhk.edu.hk Reading: Chap. 1.1~1.3 Outline Computer: Tools for the Information Age Basic Functional Units

More information

Course Administration

Course Administration Fall 2017 EE 3613: Computer Organization Chapter 2: Instruction Set Architecture 2/4 Avinash Kodi Department of Electrical Engineering & Computer Science Ohio University, Athens, Ohio 45701 E-mail: kodi@ohio.edu

More information

Computer Science 61C Spring Friedland and Weaver. Instruction Encoding

Computer Science 61C Spring Friedland and Weaver. Instruction Encoding Instruction Encoding 1 Instruction Formats I-format: used for instructions with immediates, lw and sw (since offset counts as an immediate), and branches (beq and bne) since branches are "relative" to

More information

Computer Systems and Networks

Computer Systems and Networks University of the Pacific LECTURE 15: MIPS (FOR LAB 10) Computer Systems and Networks Dr. Pallipuram (vpallipuramkrishnamani@pacific.edu) Some Deadlines Lab 8 hard deadline 17 th NOV 5 AM Lab 9 due 15

More information

Learning Objectives. Binary over Decimal. In this chapter you will learn about:

Learning Objectives. Binary over Decimal. In this chapter you will learn about: Ref Page Slide 1/29 Learning Objectives In this chapter you will learn about: Reasons for using binary instead of decimal numbers Basic arithmetic operations using binary numbers Addition (+) Subtraction

More information

Computer Systems and Networks

Computer Systems and Networks LECTURE 16: MIPS (11 AND 12) Computer Systems and Networks Dr. Pallipuram (vpallipuramkrishnamani@pacific.edu) University of the Pacific Deadline Lab 11 is open: DUE 1 st NOV 5 AM Lab 12 is open: DUE 8

More information

Components of a Computer System

Components of a Computer System Hardware Outline 1. Hardware Outline 2. What is a Computer?/Components of a Computer System 3. Hardware That Computers Typically Have 4. Hardware Components 5. Central Processing Unit (CPU) 6. Central

More information

Programming at different levels

Programming at different levels CS2214 COMPUTER ARCHITECTURE & ORGANIZATION SPRING 2014 EMY MNEMONIC MACHINE LANGUAGE PROGRAMMING EXAMPLES Programming at different levels CS1114 Mathematical Problem : a = b + c CS2214 CS2214 The C-like

More information

Computer Architecture. The Language of the Machine

Computer Architecture. The Language of the Machine Computer Architecture The Language of the Machine Instruction Sets Basic ISA Classes, Addressing, Format Administrative Matters Operations, Branching, Calling conventions Break Organization All computers

More information

ECE468 Computer Organization & Architecture. MIPS Instruction Set Architecture

ECE468 Computer Organization & Architecture. MIPS Instruction Set Architecture ECE468 Computer Organization & Architecture MIPS Instruction Set Architecture ECE468 Lec4.1 MIPS R2000 / R3000 Registers 32-bit machine --> Programmable storage 2^32 x bytes 31 x 32-bit GPRs (R0 = 0) 32

More information

Assembly language Simple, regular instructions building blocks of C, Java & other languages Typically one-to-one mapping to machine language

Assembly language Simple, regular instructions building blocks of C, Java & other languages Typically one-to-one mapping to machine language Assembly Language Readings: 2.1-2.7, 2.9-2.10, 2.14 Green reference card Assembly language Simple, regular instructions building blocks of C, Java & other languages Typically one-to-one mapping to machine

More information

Chapter 03: Computer Arithmetic. Lesson 09: Arithmetic using floating point numbers

Chapter 03: Computer Arithmetic. Lesson 09: Arithmetic using floating point numbers Chapter 03: Computer Arithmetic Lesson 09: Arithmetic using floating point numbers Objective To understand arithmetic operations in case of floating point numbers 2 Multiplication of Floating Point Numbers

More information

BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1

BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1 BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1 Learning Outcomes At the end of this lecture, you should be able to: tell the purpose of computer programs. describe

More information

HW2 solutions You did this for Lab sbn temp, temp,.+1 # temp = 0; sbn temp, b,.+1 # temp = -b; sbn a, temp,.+1 # a = a (-b) = a + b;

HW2 solutions You did this for Lab sbn temp, temp,.+1 # temp = 0; sbn temp, b,.+1 # temp = -b; sbn a, temp,.+1 # a = a (-b) = a + b; HW2 solutions 3.10 Pseuodinstructions What is accomplished Minimum sequence of Mips Move $t5, $t3 $t5=$t3 Add $t5, $t3, $0 Clear $t5 $t5=0 Xor $t5, $t5, $t5 Li $t5, small $t5=small Addi $t5, $0, small

More information

361 div.1. Computer Architecture EECS 361 Lecture 7: ALU Design : Division

361 div.1. Computer Architecture EECS 361 Lecture 7: ALU Design : Division 361 div.1 Computer Architecture EECS 361 Lecture 7: ALU Design : Division Outline of Today s Lecture Introduction to Today s Lecture Divide Questions and Administrative Matters Introduction to Single cycle

More information

Assembly Language Programming

Assembly Language Programming Assembly Language Programming Remember the programmer shown in our first lecture? Originally, computers were programmed manually. After a while, scientists began to consider ways to accelerate and facilitate

More information

TSK3000A - Generic Instructions

TSK3000A - Generic Instructions TSK3000A - Generic Instructions Frozen Content Modified by Admin on Sep 13, 2017 Using the core set of assembly language instructions for the TSK3000A as building blocks, a number of generic instructions

More information

Q1: /30 Q2: /25 Q3: /45. Total: /100

Q1: /30 Q2: /25 Q3: /45. Total: /100 ECE 2035(A) Programming for Hardware/Software Systems Fall 2013 Exam One September 19 th 2013 This is a closed book, closed note texam. Calculators are not permitted. Please work the exam in pencil and

More information