CSC 101: Lab Manual#9 Machine Language and the CPU (largely based on the work of Prof. William Turkett) Lab due date: 5:00pm, day after lab session
|
|
- Darrell Weaver
- 5 years ago
- Views:
Transcription
1 CSC 101: Lab Manual#9 Machine Language and the CPU (largely based on the work of Prof. William Turkett) Lab due date: 5:00pm, day after lab session Purpose: The purpose of this lab is to gain additional hands-on experience in working with different number systems, to gain insight into how a CPU executes low-level (machine and assembly) language instructions, and to gain insight into how CPU instructions are represented on the CPU. Lab Instructions If you had trouble with the software in the pre-lab (no window popped up), please let one of the instructors know early in the lab session. Hexadecimal Representations: As was discussed in the pre-lab, ultimately everything in a computer is represented in binary notation (strings of 0s and 1s). However, for humans this notation can sometimes get unwieldy for example, reading 32 binary digits (a common size used for representing information in a computer) can make your eyes go googly: 32 bits (binary digits): Accordingly, it is often easier to read and work with numbers in hexadecimal, the number system that is based on powers of 16 (instead of powers of 10 like we are used to or powers of 2 like binary). Continuing with some of the examples from the pre-lab, here is the setup for a 3-digit hexadecimal number. 256s place 16s place 1s place Powers: Remember that we are able to write into each position any numbers from 0 up to our (number system base-1): In binary (base 2) we can write 0s and 1s (base of 2-1) in the positions. In decimal (base 10), we can write the values 0 through 9 (base of 10-1) in the positions. In hexadecimal (base 16), we can write the values 0 through 15 (base of 16-1). However, we will write the numbers 10, 11, 12, 13, 14, and 15 as A, B, C, D, E, and F respectively so that they only take up one physical position. Given that we have a 3-digit hexadecimal number, the smallest number we can then represent is using a 0 in each position, leading to 0* *16 + 0* , while the largest number we can represent is using a F (equivalent to 15) in each position, leading to F*256 + F*16 + F*1 15* * * Why do we want to use hexadecimal in place of long binary numbers? Remember that there is a nice relationship between hexadecimal and binary. You should remember from previous math classes and the prelab that 2 4 is the number 16 - that means one hexadecimal digit is the same as four binary digits. So, our long binary number from above: 32 bits (binary digits): can be broken apart into eight different 4-bit chunks: which in hexadecimal is the value: 5 0 C 5 D 2 D 8
2 which is a lot more compact and easier on the eyes. A table with these 4-binary digit to 1-hexadecimal digit translations was shown in lecture and is included at the back of this lab. Answer Questions 1 and 2 on the Lab Report document. Low-level (Assembly and Machine) Language Instructions: As discussed in lecture, low level computer instructions are very simple instructions which are understood and executed by a computer. An example of such an operation is addition. A computer might be instructed to perform the addition operation on two values; let s say the numbers 8 and 16. If we were to write this process down, we would commonly write: However, for a computer it would more likely be written as ADD 8 16 That is, the operator (ADD for addition) is written first, followed by the two operands (the values to be added). As another example, computing 5-2 would be written for the computer as: SUB 5 2 The operators that are available to be used provide the functionality for the computer, and thus make up the set of potential instructions. The above two examples suggest ADD (addition) and SUB (subtraction) as potential low level instructions, but there are others as well. Remember that the internals of a computer break down similar to the picture shown at right. If there is information stored in RAM (the memory of your computer), sometimes it may need to be brought to the CPU over the BUS to be worked on, and other times the CPU may need to write information back out to the RAM memory. This suggests it could be useful to have instructions such as LOAD (get information from RAM onto the CPU) and STORE (save information from the CPU to RAM). In addition to addition and subtraction, we could expect our low-level language to support math operations such as multiplication (MUL); division (DIV); the AND, OR, NOT, and XOR Boolean operations we saw in lab #3; and comparison operations (LESS THAN, GREATER THAN, EQUAL TO). While there are more operations that modern low-level languages support than just these, the list above should give you an idea of the basics. All of these instructions would be written in the operator operand operand format, as shown in the examples below: ADD 8 16 equivalent to 8+16, answer is 24 SUB 4 2 equivalent to 4-2, answer is 2 GREATERTHAN equivalent to 12 > 10, answer is true AND true false answer is false (remember the AND truth table from Lab #5?) LOAD load information from memory location 1024 onto the CPU at a location 12
3 Answer Question 3 on the Lab Report document. All information understood by the computer, including the instructions, has to eventually be encoded in binary. That means we have to be able to encode the operator and both operands listed above all as binary numbers. So, taking one example from above: SUB 4 2 might be encoded as OPERATOR OPERAND1 OPERAND in binary (which in decimal is the 4 and 2 should make sense as they are the operands; the first 1 is an arbitrary number I decided to associate with the SUB subtraction operator). Let s assume that all of our instructions are to be encoded in a total of 12 binary digits (like the one above). We could divide up the bits to describe the instruction in a number of ways: 4 bits for the operator 4 bits for operand1 4 bits for operand2 6 bits for the operator 3 bits for operand1 3 bits for operand2 2 bits for the operator 5 bits for operand1 5 bits for operand2 any other combination that adds up to 12 total bits. The number of binary digits we allow for the operator constrains the number of different instructions we can encode, as each different available binary number would be associated with an operator (ie ADD would be assigned the binary version of the number 0, SUB would be assigned the binary version of the number 1, MUL would be assigned the binary version of the number 2, and so on). Answer Question 4 on the Lab Report document. Question 5: Let s assume that a STORE instruction (one of our example instructions on the previous page) has the following format: STORE VALUE LOCATION operator operand1 operand2 Answer the question 5 on the Lab Report document. Compilation As you discussed in lecture, computer software is initially written in high level languages languages whose instructions are similar to English and are human-readable. A tool (either a compiler or an interpreter) converts the English-like instructions to machine language instructions to be executed by the CPU. Answer Question 6 on the Lab Report document.
4 CPU Simulator: Navigate to the following page in your web-browser: This should open a web-page that contains a CPU simulator, similar to what is shown below: This simulator was demonstrated in the video you were requested to watch before lab. Using the New Prgm button will open a text entry window similar to the one at right. In that window, enter the following program: lod-c 0 sto 12 lod 12 inc inc sto 12 jmp 2 and hit the Translate button on that window. If you typed everything correctly, it should close and your program will show up in the positions labeled 0-6 in the right of the large window. If you made an error, then it should recognize that as well.
5 Question 7 (7 points): When the program was translated successfully (we can think of this as compilation of the program), what are the 7 encoded instructions shown in memory positions 0-6? Make sure the drop-down box above the memory box says Integers. RECORD YOUR ANSWERS ON THE LAB9 REPORT. This program works as shown below: lod-c 0 // load the number 0 onto the CPU sto 12 // store that number (0) out to position 12 in memory lod 12 // load the value in memory position 12 onto the CPU inc // increment (add 1 to) that value(ie 0 has one added to become 1) inc // increment (add 1 to) that value (ie 1 has one added to become 2) sto 12 // store the resulting value in memory at location 12 jmp 2 // go back to instruction 2 (lod 12) and start over We now want to execute this program. Read the rest of this paragraph, and then repeatedly click the Step button, which will start the fetch-execute cycle. Watch the PC (Program Counter) field, the field which says what the next instruction to execute is. Every time it changes (which may be after multiple hits of the Step button), record the following information as your answer to Question 8. After recording the values above, you should have seen the memory in position 12 change values from 0 to 2. Now, press the Set PC=0 button, which will prepare to restart our program from the beginning. The questions on the next page should be answered based on what you are about to see, so you may want to go ahead and read the questions and then come back to this page to read the final instruction of what to press in the simulator. If you have read the questions on the next page and are back here, now instead of pressing Step, press Run (which automates execution of the program) and watch Memory position 12 (the values counting up from 0). Answer Question 9 on the Lab Report document. CPU Speed: As you saw in the pre-lab, CPUs maintain an internal clock that ticks many times a second. For my laptop, the CPU ticked at a frequency of 2.4 GHz, or 2.4 billion (2,400,000,000) ticks in a second. We will assume that the computer can execute 1 machine language instruction per tick, so that s 2.4 billion machine language instructions a second! Answer Question 10 on the Lab Report document. Note: Nothing needs to be uploaded into Sakai for this lab.
Functional Units of a Modern Computer
Functional Units of a Modern Computer We begin this lecture by repeating a figure from a previous lecture. Logically speaking a computer has four components. Connecting the Components Early schemes for
More informationCSC 101: Lab #5 Boolean Logic Practice Due Date: 5:00pm, day after lab session
Name: Email Username: Lab Date and Time: CSC 101: Lab #5 Boolean Logic Practice Due Date: 5:00pm, day after lab session Lab Report: Answer the questions within this document as you encounter them. Also,
More informationUser. Application program. Interfaces. Operating system. Hardware
Operating Systems Introduction to Operating Systems and Computer Hardware Introduction and Overview The operating system is a set of system software routines that interface between an application program
More informationCSC 220: Computer Organization Unit 12 CPU programming
College of Computer and Information Sciences Department of Computer Science CSC 220: Computer Organization Unit 12 CPU programming 1 Instruction set architectures Last time we built a simple, but complete,
More informationCOMPUTER ORGANIZATION & ARCHITECTURE
COMPUTER ORGANIZATION & ARCHITECTURE Instructions Sets Architecture Lesson 5a 1 What are Instruction Sets The complete collection of instructions that are understood by a CPU Can be considered as a functional
More informationMicroprocessors and Microcontrollers Prof. Santanu Chattopadhyay Department of E & EC Engineering Indian Institute of Technology, Kharagpur
Microprocessors and Microcontrollers Prof. Santanu Chattopadhyay Department of E & EC Engineering Indian Institute of Technology, Kharagpur Lecture - 09 8085 Microprocessors (Contd.) (Refer Slide Time:
More informationComputer 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 informationLaboratory. Low-Level. Languages. Objective. References. Study simple machine language and assembly language programs.
Laboratory Low-Level 7 Languages Objective Study simple machine language and assembly language programs. References Software needed: 1) A web browser (Internet Explorer or Netscape) 2) Applet from the
More informationCSC 101: Lab #5 Prelab Boolean Logic Practice Due Date: 5:00pm, day after lab session
Name: Email Username: Lab Date and Time: CSC 101: Lab #5 Prelab Boolean Logic Practice Due Date: 5:00pm, day after lab session Purpose: The purpose of this pre-lab is to provide you with hands-on experience
More information(Refer Slide Time: 1:40)
Computer Architecture Prof. Anshul Kumar Department of Computer Science and Engineering, Indian Institute of Technology, Delhi Lecture - 3 Instruction Set Architecture - 1 Today I will start discussion
More informationLecture 1: What is a computer?
02-201, Fall 2015, Carl Kingsford Lecture 1: What is a computer? 0. Today's Topics Basic computer architecture How the computer represents data 1. What is a computer? A modern computer is a collection
More informationComputer 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 informationComputer 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 informationThe CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram:
The CPU and Memory How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram: 1 Registers A register is a permanent storage location within
More informationLaboratory. Computer Cycling. Objective. References. Learn about the fetch-execute cycle of computers.
Laboratory Computer Cycling 5 Objective Learn about the fetch-execute cycle of computers. References Software needed: 1) A web browser (Internet Explorer or Netscape) 2) Applet from the CD-ROM: a) Super
More informationUnit 2: Data Storage CS 101, Fall 2018
Unit 2: Data Storage CS 101, Fall 2018 Learning Objectives After completing this unit, you should be able to: Evaluate digital circuits that use AND, OR, XOR, and NOT. Convert binary integers to/from decimal,
More informationComputer Organization and Levels of Abstraction
Computer Organization and Levels of Abstraction Announcements Today: PS 7 Lab 8: Sound Lab tonight bring machines and headphones! PA 7 Tomorrow: Lab 9 Friday: PS8 Today (Short) Floating point review Boolean
More informationMemory Addressing, Binary, and Hexadecimal Review
C++ By A EXAMPLE Memory Addressing, Binary, and Hexadecimal Review You do not have to understand the concepts in this appendix to become well-versed in C++. You can master C++, however, only if you spend
More informationProgramming with Python
Programming with Python Dr Ben Dudson Department of Physics, University of York 21st January 2011 http://www-users.york.ac.uk/ bd512/teaching.shtml Dr Ben Dudson Introduction to Programming - Lecture 2
More informationVon Neumann Architecture
Von Neumann Architecture Assist lecturer Donya A. Khalid Lecture 2 2/29/27 Computer Organization Introduction In 945, just after the World War, Jon Von Neumann proposed to build a more flexible computer.
More informationDec Hex Bin ORG ; ZERO. Introduction To Computing
Dec Hex Bin 0 0 00000000 ORG ; ZERO Introduction To Computing OBJECTIVES this chapter enables the student to: Convert any number from base 2, base 10, or base 16 to any of the other two bases. Add and
More informationProblem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur
Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture - 04 Introduction to Programming Language Concepts
More informatione-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Introduction to Computing Module No: CS/ES/1 Quadrant 1 e-text
e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Introduction to Computing Module No: CS/ES/1 Quadrant 1 e-text About the course : In this digital world, embedded systems are more
More informationAssembly Language for Intel-Based Computers, 4 th Edition. Chapter 1: Basic Concepts. Chapter Overview. Welcome to Assembly Language
Assembly Language for Intel-Based Computers, 4 th Edition Kip R. Irvine Chapter 1: Basic Concepts Slides prepared by Kip R. Irvine Revision date: 09/15/2002 Chapter corrections (Web) Printing a slide show
More informationCOSC 122 Computer Fluency. Computer Organization. Dr. Ramon Lawrence University of British Columbia Okanagan
COSC 122 Computer Fluency Computer Organization Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Key Points 1) The standard computer (von Neumann) architecture consists
More information538 Lecture Notes Week 1
538 Clowes Lecture Notes Week 1 (Sept. 6, 2017) 1/10 538 Lecture Notes Week 1 Announcements No labs this week. Labs begin the week of September 11, 2017. My email: kclowes@ryerson.ca Counselling hours:
More informationMonday, January 27, 2014
Monday, January 27, 2014 Topics for today History of Computing (brief) Encoding data in binary Unsigned integers Signed integers Arithmetic operations and status bits Number conversion: binary to/from
More informationFundamentals of Programming Session 2
Fundamentals of Programming Session 2 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Fall 2013 Sharif University of Technology Outlines Programming Language Binary numbers Addition Subtraction
More informationECOM 2325 Computer Organization and Assembly Language. Instructor: Ruba A.Salamah INTRODUCTION
ECOM 2325 Computer Organization and Assembly Language Instructor: Ruba A.Salamah INTRODUCTION Overview Welcome to ECOM 2325 Assembly-, Machine-, and High-Level Languages Assembly Language Programming Tools
More informationTopics. Hardware and Software. Introduction. Main Memory. The CPU 9/21/2014. Introduction to Computers and Programming
Topics C H A P T E R 1 Introduction to Computers and Programming Introduction Hardware and Software How Computers Store Data Using Python Introduction Computers can be programmed Designed to do any job
More informationComputer Organization and Assembly Language. Lab Session 01
Objective: Lab Session 01 Introduction to Assembly Language Tools and Familiarization with Emu8086 environment To be able to understand Data Representation and perform conversions from one system to another
More informationCOMP 102: Computers and Computing
COMP 102: Computers and Computing Lecture 2: Bits&bytes, Switches, and Boolean Logic Instructor: Kaleem Siddiqi (siddiqi@cim.mcgill.ca) Class web page: www.cim.mcgill.ca/~siddiqi/102.html The Lowly Bit
More informationCourse Schedule. CS 221 Computer Architecture. Week 3: Plan. I. Hexadecimals and Character Representations. Hexadecimal Representation
Course Schedule CS 221 Computer Architecture Week 3: Information Representation (2) Fall 2001 W1 Sep 11- Sep 14 Introduction W2 Sep 18- Sep 21 Information Representation (1) (Chapter 3) W3 Sep 25- Sep
More informationPractical Malware Analysis
Practical Malware Analysis Ch 4: A Crash Course in x86 Disassembly Revised 1-16-7 Basic Techniques Basic static analysis Looks at malware from the outside Basic dynamic analysis Only shows you how the
More informationMicrocontroller Systems
µcontroller systems 1 / 43 Microcontroller Systems Engineering Science 2nd year A2 Lectures Prof David Murray david.murray@eng.ox.ac.uk www.robots.ox.ac.uk/ dwm/courses/2co Michaelmas 2014 µcontroller
More informationCSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch
CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch Purpose: We will take a look at programming this week using a language called Scratch. Scratch is a programming language that was developed
More informationOutline. elements and behavior executing programs. developing programs use as a calculator converting strings to numbers
Outline 1 The von Neumann Machine elements and behavior executing programs 2 Python Programming developing programs use as a calculator converting strings to numbers 3 Summary + Assignments MCS 260 Lecture
More informationBits, Words, and Integers
Computer Science 52 Bits, Words, and Integers Spring Semester, 2017 In this document, we look at how bits are organized into meaningful data. In particular, we will see the details of how integers are
More informationSKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)
SKILL AREA 304: Review Programming Language Concept Computer Programming (YPG) 304.1 Demonstrate an Understanding of Basic of Programming Language 304.1.1 Explain the purpose of computer program 304.1.2
More informationCMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 01, SPRING 2013
CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 01, SPRING 2013 TOPICS TODAY Course overview Levels of machines Machine models: von Neumann & System Bus Fetch-Execute Cycle Base
More informationRepresentation of Information
Representation of Information CS61, Lecture 2 Prof. Stephen Chong September 6, 2011 Announcements Assignment 1 released Posted on http://cs61.seas.harvard.edu/ Due one week from today, Tuesday 13 Sept
More information9/3/2015. Data Representation II. 2.4 Signed Integer Representation. 2.4 Signed Integer Representation
Data Representation II CMSC 313 Sections 01, 02 The conversions we have so far presented have involved only unsigned numbers. To represent signed integers, computer systems allocate the high-order bit
More informationCPU. Fall 2003 CSE 207 Digital Design Project #4 R0 R1 R2 R3 R4 R5 R6 R7 PC STATUS IR. Control Logic RAM MAR MDR. Internal Processor Bus
http://www.engr.uconn.edu/~barry/cse207/fa03/project4.pdf Page 1 of 16 Fall 2003 CSE 207 Digital Design Project #4 Background Microprocessors are increasingly common in every day devices. Desktop computers
More informationIntroduction to MiniSim A Simple von Neumann Machine
Math 121: Introduction to Computing Handout #19 Introduction to MiniSim A Simple von Neumann Machine Programming languages like C, C++, Java, or even Karel are called high-level languages because they
More informationCC411: Introduction To Microprocessors
CC411: Introduction To Microprocessors OBJECTIVES this chapter enables the student to: Use number { base 2, base 10, or base 16 }. Add and subtract binary/hex numbers. Represent any binary number in 2
More informationArithmetic and Bitwise Operations on Binary Data
Arithmetic and Bitwise Operations on Binary Data CSCI 2400: Computer Architecture ECE 3217: Computer Architecture and Organization Instructor: David Ferry Slides adapted from Bryant & O Hallaron s slides
More informationModule 5 - CPU Design
Module 5 - CPU Design Lecture 1 - Introduction to CPU The operation or task that must perform by CPU is: Fetch Instruction: The CPU reads an instruction from memory. Interpret Instruction: The instruction
More informationExpectations. Why learn Assembly Language? Administrative Issues. Assignments. CSC 3210 Computer Organization and Programming
CSC 3210 Computer Organization and Programming Introduction and Overview Dr. Anu Bourgeois (modified by Michael Weeks) Expectations Writing code with loops Base conversions Especially involving decimal
More informationHardware Revision. AQA Computing AS-Level COMP2. 63 minutes. 60 marks. Page 1 of 24
Hardware Revision AQA Computing AS-Level COMP2 204 63 minutes 60 marks Page of 24 Q. The diagram below shows some of the components of a computer system. (a) Suggest names for the components numbered to
More informationSoftware and Hardware
Software and Hardware Numbers At the most fundamental level, a computer manipulates electricity according to specific rules To make those rules produce something useful, we need to associate the electrical
More informationETGG1801 Game Programming Foundations I Andrew Holbrook Fall Lecture 0 - Introduction to Computers 1
ETGG1801 Game Programming Foundations I Andrew Holbrook Fall 2013 Lecture 0 - Introduction to Computers 1 Introduction to Computers Vacuum Tubes and Transistors Electrically-controlled switches Logic Gates
More informationBits. Binary Digits. 0 or 1
Data Representation Bits Binary Digits 0 or 1 Everything stored in a computer is stored as bits. Bits can mean different things depending on how the software or hardware interpret the bits Bits are usually
More informationProgramming Model 2 A. Introduction
Programming Model 2 A. Introduction Objectives At the end of this lab you should be able to: Use direct and indirect addressing modes of accessing data in memory Create an iterative loop of instructions
More information8/16/12. Computer Organization. Architecture. Computer Organization. Computer Basics
Computer Organization Computer Basics TOPICS Computer Organization Data Representation Program Execution Computer Languages 1 2 Architecture Computer Organization n central-processing unit n performs the
More informationExplanation of PIC 16F84A processor data sheet Part 2: More on the PIC
Explanation of PIC 16F84A processor data sheet Part 2: More on the PIC This is the second of the three part overview of the PIC processor. We will first discuss the timer module and prescalar. We will
More informationComputer Architecture and Assembly Language. Spring
Computer Architecture and Assembly Language Spring 2014-2015 What is a computer? A computer is a sophisticated electronic calculating machine that: Accepts input information, Processes the information
More informationIt is possible to define a number using a character or multiple numbers (see instruction DB) by using a string.
1 od 5 17. 12. 2017 23:53 (https://github.com/schweigi/assembler-simulator) Introduction This simulator provides a simplified assembler syntax (based on NASM (http://www.nasm.us)) and is simulating a x86
More informationAgenda EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 1: Introduction. Go over the syllabus 3/31/2010
// EE : INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN Lecture : Introduction /9/ Avinash Kodi, kodi@ohio.edu Agenda Go over the syllabus Introduction ti to Digital it Systems // Why Digital Systems?
More informationIntro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming
Intro to Programming Unit 7 Intro to Programming 1 What is Programming? 1. Programming Languages 2. Markup vs. Programming 1. Introduction 2. Print Statement 3. Strings 4. Types and Values 5. Math Externals
More informationUnderstand the factors involved in instruction set
A Closer Look at Instruction Set Architectures Objectives Understand the factors involved in instruction set architecture design. Look at different instruction formats, operand types, and memory access
More informationCS101 Lecture 04: Binary Arithmetic
CS101 Lecture 04: Binary Arithmetic Binary Number Addition Two s complement encoding Briefly: real number representation Aaron Stevens (azs@bu.edu) 25 January 2013 What You ll Learn Today Counting in binary
More informationASSEMBLY LANGUAGE MACHINE ORGANIZATION
ASSEMBLY LANGUAGE MACHINE ORGANIZATION CHAPTER 3 1 Sub-topics The topic will cover: Microprocessor architecture CPU processing methods Pipelining Superscalar RISC Multiprocessing Instruction Cycle Instruction
More informationBasic data types. Building blocks of computation
Basic data types Building blocks of computation Goals By the end of this lesson you will be able to: Understand the commonly used basic data types of C++ including Characters Integers Floating-point values
More informationComputer Organization and Levels of Abstraction
Computer Organization and Levels of Abstraction Announcements PS8 Due today PS9 Due July 22 Sound Lab tonight bring machines and headphones! Binary Search Today Review of binary floating point notation
More informationHistory of Computing. Ahmed Sallam 11/28/2014 1
History of Computing Ahmed Sallam 11/28/2014 1 Outline Blast from the past Layered Perspective of Computing Why Assembly? Data Representation Base 2, 8, 10, 16 Number systems Boolean operations and algebra
More informationECE 20B, Winter Purpose of Course. Introduction to Electrical Engineering, II. Administration
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II Instructor: Andrew B Kahng (lecture) Email: abk@eceucsdedu Telephone: 858-822-4884 office, 858-353-0550 cell Office: 3802 AP&M Lecture: TuThu
More informationContents. 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 informationCO Computer Architecture and Programming Languages CAPL. Lecture 15
CO20-320241 Computer Architecture and Programming Languages CAPL Lecture 15 Dr. Kinga Lipskoch Fall 2017 How to Compute a Binary Float Decimal fraction: 8.703125 Integral part: 8 1000 Fraction part: 0.703125
More information378: Machine Organization and Assembly Language
378: Machine Organization and Assembly Language Spring 2010 Luis Ceze Slides adapted from: UIUC, Luis Ceze, Larry Snyder, Hal Perkins 1 What is computer architecture about? Computer architecture is the
More informationChapter 4. Operations on Data
Chapter 4 Operations on Data 1 OBJECTIVES After reading this chapter, the reader should be able to: List the three categories of operations performed on data. Perform unary and binary logic operations
More informationWeek - 04 Lecture - 01 Merge Sort. (Refer Slide Time: 00:02)
Programming, Data Structures and Algorithms in Python Prof. Madhavan Mukund Department of Computer Science and Engineering Indian Institute of Technology, Madras Week - 04 Lecture - 01 Merge Sort (Refer
More informationComputer Organization and Programming
Sep 2006 Prof. Antônio Augusto Fröhlich (http://www.lisha.ufsc.br) 8 Computer Organization and Programming Prof. Dr. Antônio Augusto Fröhlich guto@lisha.ufsc.br http://www.lisha.ufsc.br/~guto Sep 2006
More informationRui Wang, Assistant professor Dept. of Information and Communication Tongji University.
Instructions: ti Language of the Computer Rui Wang, Assistant professor Dept. of Information and Communication Tongji University it Email: ruiwang@tongji.edu.cn Computer Hierarchy Levels Language understood
More informationFinal Labs and Tutors
ICT106 Fundamentals of Computer Systems - Topic 2 REPRESENTATION AND STORAGE OF INFORMATION Reading: Linux Assembly Programming Language, Ch 2.4-2.9 and 3.6-3.8 Final Labs and Tutors Venue and time South
More informationCOMP3221: Microprocessors and. and Embedded Systems. Instruction Set Architecture (ISA) What makes an ISA? #1: Memory Models. What makes an ISA?
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) http://www.cse.unsw.edu.au/~cs3221 Lecturer: Hui Wu Session 2, 2005 Instruction Set Architecture (ISA) ISA is
More informationHARDWARE. There are a number of factors that effect the speed of the processor. Explain how these factors affect the speed of the computer s CPU.
HARDWARE hardware ˈhɑːdwɛː noun [ mass noun ] the machines, wiring, and other physical components of a computer or other electronic system. select a software package that suits your requirements and buy
More informationComputer Architecture Review. ICS332 - Spring 2016 Operating Systems
Computer Architecture Review ICS332 - Spring 2016 Operating Systems ENIAC (1946) Electronic Numerical Integrator and Calculator Stored-Program Computer (instead of Fixed-Program) Vacuum tubes, punch cards
More informationSlide Set 1 (corrected)
Slide Set 1 (corrected) for ENCM 369 Winter 2018 Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary January 2018 ENCM 369 Winter 2018
More informationaddress ALU the operation opcode ACC Acc memory address
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 which we will examine how a microprocessor actually works
More informationReview of Data Representation & Binary Operations Dhananjai M. Rao CSA Department Miami University
Review of Data Representation & Binary Operations Dhananjai M. Rao () CSA Department Miami University 1. Introduction In digital computers all data including numbers, characters, and strings are ultimately
More informationComputer Organisation CS303
Computer Organisation CS303 Module Period Assignments 1 Day 1 to Day 6 1. Write a program to evaluate the arithmetic statement: X=(A-B + C * (D * E-F))/G + H*K a. Using a general register computer with
More informationOutline. policies. with some potential answers... MCS 260 Lecture 19 Introduction to Computer Science Jan Verschelde, 24 February 2016
Outline 1 midterm exam on Friday 26 February 2016 policies 2 questions with some potential answers... MCS 260 Lecture 19 Introduction to Computer Science Jan Verschelde, 24 February 2016 Intro to Computer
More information4 Operations On Data 4.1. Foundations of Computer Science Cengage Learning
4 Operations On Data 4.1 Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: List the three categories of operations performed on data.
More information17. Instruction Sets: Characteristics and Functions
17. Instruction Sets: Characteristics and Functions Chapter 12 Spring 2016 CS430 - Computer Architecture 1 Introduction Section 12.1, 12.2, and 12.3 pp. 406-418 Computer Designer: Machine instruction set
More informationZheng-Liang Lu Java Programming 45 / 79
1 class Lecture2 { 2 3 "Elementray Programming" 4 5 } 6 7 / References 8 [1] Ch. 2 in YDL 9 [2] Ch. 2 and 3 in Sharan 10 [3] Ch. 2 in HS 11 / Zheng-Liang Lu Java Programming 45 / 79 Example Given a radius
More informationOperations On Data CHAPTER 4. (Solutions to Odd-Numbered Problems) Review Questions
CHAPTER 4 Operations On Data (Solutions to Odd-Numbered Problems) Review Questions 1. Arithmetic operations interpret bit patterns as numbers. Logical operations interpret each bit as a logical values
More information11. A Computing Machine
COMPUTER SCIENCE S E D G E W I C K / W A Y N E Computer Science Including Programming in Java 11. A Computing Machine Section 5.1 http://introcs.cs.princeton.edu COMPUTER SCIENCE S E D G E W I C K / W
More informationComputer 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 informationDr. Scheme evaluates expressions so we will start by using the interactions window and asking Dr. Scheme to evaluate some expressions.
1.0 Expressions Dr. Scheme evaluates expressions so we will start by using the interactions window and asking Dr. Scheme to evaluate some expressions. Numbers are examples of primitive expressions, meaning
More informationMaciej Sobieraj. Lecture 1
Maciej Sobieraj Lecture 1 Outline 1. Introduction to computer programming 2. Advanced flow control and data aggregates Your first program First we need to define our expectations for the program. They
More informationWelcome to Computer Organization and Design Logic CS 64: Computer Organization and Design Logic Lecture #1 Winter 2018
Welcome to Computer Organization and Design Logic CS 64: Computer Organization and Design Logic Lecture #1 Winter 2018 Ziad Matni Dept. of Computer Science, UCSB A Word About Registration for CS64 FOR
More informationWednesday, January 28, 2018
Wednesday, January 28, 2018 Topics for today History of Computing (brief) Encoding data in binary Unsigned integers Signed integers Arithmetic operations and status bits Number conversion: binary to/from
More informationComputer Organization and Assembly Language. Lab Session 3
Lab Session 3 Objective: To be familiar with Basic Elements of Assembly Language Understanding Constants, Identifiers, Directives and Instructions. Theory: Integer Constants An integer constant (or integer
More informationCOUNTING AND CONVERTING
COUNTING AND CONVERTING The base of each number system is also called the radix. The radix of a decimal number is ten, and the radix of binary is two. The radix determines how many different symbols are
More informationIn 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
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 which we will examine how a microprocessor actually works
More informationThis is the basis for the programming concept called a loop statement
Chapter 4 Think back to any very difficult quantitative problem that you had to solve in some science class How long did it take? How many times did you solve it? What if you had millions of data points
More informationCHW 261: Logic Design
CHW 261: Logic Design Instructors: Prof. Hala Zayed Dr. Ahmed Shalaby http://www.bu.edu.eg/staff/halazayed14 http://bu.edu.eg/staff/ahmedshalaby14# Slide 1 Slide 2 Slide 3 Digital Fundamentals CHAPTER
More information4 Operations On Data 4.1. Foundations of Computer Science Cengage Learning
4 Operations On Data 4.1 Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: List the three categories of operations performed on data.
More informationUNIT-II. Part-2: CENTRAL PROCESSING UNIT
Page1 UNIT-II Part-2: CENTRAL PROCESSING UNIT Stack Organization Instruction Formats Addressing Modes Data Transfer And Manipulation Program Control Reduced Instruction Set Computer (RISC) Introduction:
More informationDC57 COMPUTER ORGANIZATION JUNE 2013
Q2 (a) How do various factors like Hardware design, Instruction set, Compiler related to the performance of a computer? The most important measure of a computer is how quickly it can execute programs.
More information