LMMS: An 8-bit Microcode Simulation of the Little Man Computer

Size: px
Start display at page:

Download "LMMS: An 8-bit Microcode Simulation of the Little Man Computer"

Transcription

1 LMMS: An 8-bit Microcode Simulation of the Little Man Computer Thad Crews Western Kentucky University 1 Big Red Way (270) thad.crewsii@wku.edu Abstract The Little Man Computer (LMC) is a simplified example of computer architecture containing al l the components of modern computers: memory, a central processing unit (CPU), and input/output capability. The LMC also contains a small instruction set that allows students to write and execute simple programs. This paper describes the Little Man Microcode Simulator (LMMS), a register-transfer-level simulation of the Little Man Computer. LMMS is built on an 8-bit architecture with multiple viewing perspectives (e.g., digital, binary, and mnemonic). LMMS utilizes memory address and memory data registers to demonstrate CPU activity during memory access. LMMS provides detailed microcode implementation of the complete Little Man instruction set. LMMS uses a powerful but intuitive interface, providing an excellent simulation tool for introducing students to computer organization. Introduction The Little Man Computer (LMC) is a simplified example of computer architecture originally presented by Stuart Madnick at MIT in Over 35 years after its introduction, the LMC remains a useful tool for introducing students to computer hardware and software. The LMC contains all the components of modern computers: memory, a central processing unit (CPU), and input/output capability. The LMC also contains a small instruction set that allows students to write and execute simple programs. By writing and executing LMC programs, students gain valuable experience with important ideas including the stored program concept and the fetch-execute cycle.

2 The Original LMC Model There are many perturbations of Madnick s original LMC model, including a 1979 revision by Madnick himself. Madnick s second version of LMC is used in The Architecture of Computer Hardware and Systems Software, 2 nd Edition [Englander, 2000]. A diagram of Englander s LMC appears in Figure 1. Figure 1: Irv Englander s Little Man Computer The LMC model uses common analogies to represent CPU concepts. For example, memory is represented as a series of 100 mailboxes. The ALU is represented as a calculator. I/O activity occurs though an IN basket and an OUT basket. A hand held counter represents the program counter.

3 The LMC model is decimal based. The mailboxes and calculator each contain a three digit decimal number. When a number needs to be interpreted as an instruction, the first digit represents the op code, and the other two digits indicate the appropriate mailbox address associated with that instruction. For example, the instruction 512 would be interpreted as op code 5 (LOAD) and address 12, meaning the value in mailbox 12 would be copied into the calculator. Limitations of the LMC Model The LMC model is valuable as a conceptual tool for introducing students to important computer architecture concepts. However, there are aspects of the model that are problematic from a pedagogic and simulation perspective: 1. The decimal representation creates a problem concerning the number of memory locations. A single digit operand can access only 10 memory locations, which is too few in most cases. A two-digit operand maps to 100 memory locations, far more than necessary to demonstrate the functionality of the LMC model. For a pencil and paper version, the extra memory cells can simply be ignored (see Figure 1). With a simulator each memory location must be visible to the user, and presenting each memory location becomes a challenge. 2. The decimal representation also creates a problem when mapping to a binary equivalent. One digit op codes (10 instructions) and two digit operand (100 memory locations) corresponds to 4 bit op codes (with unused combinations) and 7 bit addresses (with memory addresses 100 to 127 unused). Also, the 11 total required bits is itself an unusual number (one and three-eights bytes).

4 3. The notion of a little man following a strict set of rules is a useful analogy for the control unit of a CPU. However, since there obviously is no real little man inside the PC, students wanting a more accurate understanding of the CPUs internal structure need a depiction that is closer to reality. The LMMS system, discussed in the following section, addresses these problems and provides pedagogical benefits that go beyond the original LMC model. The LMMS system The LMMS (Little Man Microcode Simulator) system is a register-transfer-level simulation of Madnick s LMC model. The LMMS system is built on an 8-bit architecture with multiple viewing perspectives (e.g., digital, binary and mnemonic). LMMS displays memory address and memory data registers to demonstrate CPU behavior when accessing memory. LMMS provides detailed microcode implementation of the complete Little Man instruction set. The LMMS interface is shown in Figure 2.

5 Figure 2: LMMS user interface The LMMS system is built on a binary (8-bit) architecture, although it also allows decimal and mnemonic representations to support multiple student perspectives. Figure 3 shows the binary and decimal representations of an LMC program that inputs two numbers and displays their sum. Notice how the first three bits make up the decimal op code and the last five bits make up the decimal operand. Details of the program itself are discussed later.

6 Figure 3: Multiple representations of an LMC program. LMMS Fetch-Execute Cycle With the LMC model, the behavior of the Little Man (e.g., control unit) is described at a high level for each instruction in the instruction set. For example, Englander explains the fetch-execute activities of the LOAD instruction this way: The Little Man walks over to the mailbox address specified in the instruction. He reads the three-digit number located in that mailbox, and then walks over to the calculator and punches that number into the calculator. The three-digit number in the mailbox is left unchanged, but of course the original number in the calculator is replaced by the new number. [Englander, 2000, p. 149] The above description is sufficient to carry out the desired behavior using pencil and paper. However since the little man is clearly fictitious it does not provide an accurate understanding of the LOAD operation with respect to the internals of the CPU. LMMS addresses this problem by presenting the instruction set at a microcode level. The fetch-execute cycle for each instruction is described as a series of register transactions. LMMS microcode uses the following five registers: The program counter (PC) contains the address of the next instruction.

7 The instruction register (IR) holds the current instruction being executed by the computer. This register is not identified in the traditional LMC model but is essential to the LMMS system as you will see. The memory address register (MAR) holds the address of a memory location. The memory data register (MDR) is a read/write connection to the data stored in memory at the address identified by the MAR. The accumulator (A) is a general purpose register. The fetch microcode is the same for all instructions: access to the memory location holding the next instruction. auto-increment the program counter copy the instruction from memory to the instruction register After the fetch is complete, the instruction is decoded, and the appropriate execute microcode occurs. LMMS Instruction Set LOAD instruction 1xx Loads the contents of mailbox xx into the calculator. IR[add] MAR access the xx memory location MDR A copy the data from memory to the accumulator STORE instruction 2xx Stores the calculator value into mailbox xx. IR[add] MAR access the xx memory location A MDR copy the data in the accumulator to memory

8 ADD instruction 3xx Adds the contents of mailbox xx to the calculator. IR[add] MAR access the xx memory location A + MDR A increase the value in the accumulator by the data in memory SUBTRACT instruction 4xx Subtracts the contents of mailbox xx from the calculator. IR[add] MAR access the xx memory location A MDR A reduce the value in the accumulator by the data in memory BRANCH instruction 5xx Change the program counter to xx. IR[add] PC change the program counter to xx BRANCH IF POSITIVE instruction 6xx If the calculator value is positive (including zero), then change the program counter to xx. If A >= 0 then IR[add] PC change the program counter if A is positive BRANCH IF ZERO instruction 7xx If the calculator value is Zero, then change the program counter to xx. IF A = 0 then IR[add] PC change the program counter if A is zero INPUT instruction 001 Accept a number from the Input stream and put it in the calculator. I/O Stream A store I/O stream to accumulator

9 OUTPUT instruction 002 Display the number in the calculator. A I/O Stream put accumulator value on the I/O stream HALT instruction 003 Stops the program - the Little Man rests. {end program} terminate the program simulation Creating an LMMS Program Consider a simple program that inputs two numbers and displays their sum. This program can be accomplished with the following instructions: Input read the first value, placing it into the calculator Store 20 store the value in mailbox 20 Input read the second value, placing it into the calculator Add 20 add the first value to the second value in the calculator Output display the sum from the calculator LMC instructions are selected from the pull-down list as shown in Figure 4. Figure 4: Selecting an LMC instruction

10 Selected instructions are copied to specified memory locations. Selected instructions in memory may be edited by choosing a new instruction from the pull down list. Selected instructions may also be moved using the floating Up, Down, and Delete command buttons as shown in Figure 5. Figure 5: Floating edit commands for manipulating memory. Running an LMMS Program Figure 5 shows the memory contents when the Add Two Numbers program has been loaded. Programs are executed by selecting the Run Machine Instruction button or the Run Without Pause button under the register trace grid, or pressing F8 or F9 as a shortcut (see Figure 6). Figure 6: The Register Trace Grid

11 Figure 7 shows LMMS behavior when executing the first instruction (INPUT) of the Add Two Numbers program. The Fetch microcode (; ; ) has been executed. The Execute microcode (I/O Stream A) is waiting for the user to enter a value through the Input dialog box. After the user presses OK, the input value will be stored in the Accumulator and the instruction will be complete. Note that the Program Counter has the value of the address of the next instruction to Fetch. Figure 7: Accepting data during INPUT Figure 8 shows the contents of the register trace grid after completing the INPUT instruction. Notice that the input value 7 is successfully stored in the Accumulator register. Also notice how the register trace grid uses the color red to indicate when a register value has changed during the execution of a microinstruction.

12 Figure 8: Register Values after INPUT Figure 9 shows the LMMS interface after executing the second instruction (STORE 20). Like the register trace grid, the memory grid uses the color red to indicate data has been assigned to a memory location. Blue color indicates an executed instruction. Figure 9: LMMS interface after executing two instructions

13 By selecting Run Without Pause, the program executes Fetch Execute cycles for each instruction in sequence until the Halt instruction is executed. The only pause is for I/O Stream activity, such as accepting the second value and displaying the result of the addition as shown in Figures 10 and 11. Figure 10: Second Input Value Figure 11: LMMS displays the result

14 Other LMMS Programs The Add Two Numbers program is a good first program for beginning students. Other programs that may be more challenging include: Biggest of 3: Write a program that will prompt the user to input three values. The output should be the largest of the three input values. Countdown: Write a program that uses a loop to display the values 10 down to 1. Positive Difference: Write a program that will prompt the user to enter two values. The output should be the positive difference of the two values. For example, if the input is 5 and 7, the output should be 2. If the input values are reversed, the output should still be 2. Largest in a Series: Write a program that will prompt the user to enter a series of values. The program will continue to accept values until the sentinel value of zero is entered. The program should then display the largest value in the series. Solutions to each of these problems are stored in the LMMS folder. The programs may be loaded and executed to provide additional experimentation with the LMMS system. Conclusion The Little Man Computer is a valuable model for introducing student to key ideas in computer architecture, including memory, the central processing unit (CPU), and input/output capability. The LMC also contains a small instruction set that allows students to write and execute simple programs. By writing and executing LMC

15 programs, students gain valuable experience with important ideas including the stored program concept and the fetch-execute cycle. LMMS is a simulator that supports the Little Man model while also providing additional pedagogical benefits. LMMS supports decimal, binary, and mnemonic perspectives of data and instructions. LMMS illustrates CPU/memory behavior through memory address and memory data registers. LMMS provides detailed microcode implementation for the complete LMC instruction set. During simulation, the fetch/execute cycle for each instruction is presented as a trace of register-transfer activities. LMMS uses a powerful but intuitive interface, providing an excellent simulation tool for introducing students to computer organization. References Englander, I. (2000). The Architecture of Computer Hardware and Systems Software 2/e. New York: Wiley.

CHAPTER 7: The CPU and Memory

CHAPTER 7: The CPU and Memory CHAPTER 7: The CPU and Memory The Architecture of Computer Hardware, Systems Software & Networking: An Information Technology Approach 4th Edition, Irv Englander John Wiley and Sons 2010 PowerPoint slides

More information

CPU Organisation and Operation

CPU Organisation and Operation CPU Organisation and Operation The Fetch-Execute Cycle The operation of the CPU 1 is usually described in terms of the Fetch-Execute cycle. 2 Fetch-Execute Cycle Fetch the Instruction Increment the Program

More information

Notes on Assembly Language

Notes on Assembly Language Notes on Assembly Language Brief introduction to assembly programming The main components of a computer that take part in the execution of a program written in assembly code are the following: A set of

More information

Chapter 01: Introduction. Lesson 02 Evolution of Computers Part 2 First generation Computers

Chapter 01: Introduction. Lesson 02 Evolution of Computers Part 2 First generation Computers Chapter 01: Introduction Lesson 02 Evolution of Computers Part 2 First generation Computers Objective Understand how electronic computers evolved during the first generation of computers First Generation

More information

MICROPROCESSOR. Exclusive for IACE Students www.iace.co.in iacehyd.blogspot.in Ph: 9700077455/422 Page 1

MICROPROCESSOR. Exclusive for IACE Students www.iace.co.in iacehyd.blogspot.in Ph: 9700077455/422 Page 1 MICROPROCESSOR A microprocessor incorporates the functions of a computer s central processing unit (CPU) on a single Integrated (IC), or at most a few integrated circuit. It is a multipurpose, programmable

More information

(Refer Slide Time: 00:01:16 min)

(Refer Slide Time: 00:01:16 min) Digital Computer Organization Prof. P. K. Biswas Department of Electronic & Electrical Communication Engineering Indian Institute of Technology, Kharagpur Lecture No. # 04 CPU Design: Tirning & Control

More information

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions CS101 Lecture 26: Low Level Programming John Magee 30 July 2013 Some material copyright Jones and Bartlett 1 Overview/Questions What did we do last time? How can we control the computer s circuits? How

More information

Computer organization

Computer organization Computer organization Computer design an application of digital logic design procedures Computer = processing unit + memory system Processing unit = control + datapath Control = finite state machine inputs

More information

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored? Inside the CPU how does the CPU work? what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored? some short, boring programs to illustrate the

More information

Administrative Issues

Administrative Issues CSC 3210 Computer Organization and Programming Introduction and Overview Dr. Anu Bourgeois (modified by Yuan Long) Administrative Issues Required Prerequisites CSc 2010 Intro to CSc CSc 2310 Java Programming

More information

MICROPROCESSOR AND MICROCOMPUTER BASICS

MICROPROCESSOR AND MICROCOMPUTER BASICS Introduction MICROPROCESSOR AND MICROCOMPUTER BASICS At present there are many types and sizes of computers available. These computers are designed and constructed based on digital and Integrated Circuit

More information

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2 Lecture Handout Computer Architecture Lecture No. 2 Reading Material Vincent P. Heuring&Harry F. Jordan Chapter 2,Chapter3 Computer Systems Design and Architecture 2.1, 2.2, 3.2 Summary 1) A taxonomy of

More information

150127-Microprocessor & Assembly Language

150127-Microprocessor & Assembly Language Chapter 3 Z80 Microprocessor Architecture The Z 80 is one of the most talented 8 bit microprocessors, and many microprocessor-based systems are designed around the Z80. The Z80 microprocessor needs an

More information

TIMING DIAGRAM O 8085

TIMING DIAGRAM O 8085 5 TIMING DIAGRAM O 8085 5.1 INTRODUCTION Timing diagram is the display of initiation of read/write and transfer of data operations under the control of 3-status signals IO / M, S 1, and S 0. As the heartbeat

More information

Central Processing Unit Simulation Version v2.5 (July 2005) Charles André University Nice-Sophia Antipolis

Central Processing Unit Simulation Version v2.5 (July 2005) Charles André University Nice-Sophia Antipolis Central Processing Unit Simulation Version v2.5 (July 2005) Charles André University Nice-Sophia Antipolis 1 1 Table of Contents 1 Table of Contents... 3 2 Overview... 5 3 Installation... 7 4 The CPU

More information

TEACHING COMPUTER ARCHITECTURE THROUGH SIMULATION (A BRIEF EVALUATION OF CPU SIMULATORS) *

TEACHING COMPUTER ARCHITECTURE THROUGH SIMULATION (A BRIEF EVALUATION OF CPU SIMULATORS) * TEACHING COMPUTER ARCHITECTURE THROUGH SIMULATION (A BRIEF EVALUATION OF CPU SIMULATORS) * Timothy Stanley, PhD Computer and Network Sciences, Utah Valley University, Orem, Utah 84058, 801 863-8978, TStanley@uvu.edu

More information

Comp 255Q - 1M: Computer Organization Lab #3 - Machine Language Programs for the PDP-8

Comp 255Q - 1M: Computer Organization Lab #3 - Machine Language Programs for the PDP-8 Comp 255Q - 1M: Computer Organization Lab #3 - Machine Language Programs for the PDP-8 January 22, 2013 Name: Grade /10 Introduction: In this lab you will write, test, and execute a number of simple PDP-8

More information

Summary of the MARIE Assembly Language

Summary of the MARIE Assembly Language Supplement for Assignment # (sections.8 -. of the textbook) Summary of the MARIE Assembly Language Type of Instructions Arithmetic Data Transfer I/O Branch Subroutine call and return Mnemonic ADD X SUBT

More information

Let s put together a Manual Processor

Let s put together a Manual Processor Lecture 14 Let s put together a Manual Processor Hardware Lecture 14 Slide 1 The processor Inside every computer there is at least one processor which can take an instruction, some operands and produce

More information

Central Processing Unit (CPU)

Central Processing Unit (CPU) Central Processing Unit (CPU) CPU is the heart and brain It interprets and executes machine level instructions Controls data transfer from/to Main Memory (MM) and CPU Detects any errors In the following

More information

1 Description of The Simpletron

1 Description of The Simpletron Simulating The Simpletron Computer 50 points 1 Description of The Simpletron In this assignment you will write a program to simulate a fictional computer that we will call the Simpletron. As its name implies

More information

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Chapter 2 Basic Structure of Computers Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Outline Functional Units Basic Operational Concepts Bus Structures Software

More information

The Little Man Computer

The Little Man Computer The Little Man Computer The Little Man Computer - an instructional model of von Neuman computer architecture John von Neuman (1903-1957) and Alan Turing (1912-1954) each independently laid foundation for

More information

PROBLEMS. which was discussed in Section 1.6.3.

PROBLEMS. which was discussed in Section 1.6.3. 22 CHAPTER 1 BASIC STRUCTURE OF COMPUTERS (Corrisponde al cap. 1 - Introduzione al calcolatore) PROBLEMS 1.1 List the steps needed to execute the machine instruction LOCA,R0 in terms of transfers between

More information

Computer Organization

Computer Organization Basics Machine, software, and program design JPC and JWD 2002 McGraw-Hill, Inc. Computer Organization CPU - central processing unit Where decisions are made, computations are performed, and input/output

More information

Figure 1: Graphical example of a mergesort 1.

Figure 1: Graphical example of a mergesort 1. CSE 30321 Computer Architecture I Fall 2011 Lab 02: Procedure Calls in MIPS Assembly Programming and Performance Total Points: 100 points due to its complexity, this lab will weight more heavily in your

More information

CPU Organization and Assembly Language

CPU Organization and Assembly Language COS 140 Foundations of Computer Science School of Computing and Information Science University of Maine October 2, 2015 Outline 1 2 3 4 5 6 7 8 Homework and announcements Reading: Chapter 12 Homework:

More information

Instruction Set Architecture (ISA)

Instruction Set Architecture (ISA) Instruction Set Architecture (ISA) * Instruction set architecture of a machine fills the semantic gap between the user and the machine. * ISA serves as the starting point for the design of a new machine

More information

High level code and machine code

High level code and machine code High level code and machine code Teacher s Notes Lesson Plan x Length 60 mins Specification Link 2.1.7/cde Programming languages Learning objective Students should be able to (a) explain the difference

More information

Chapter 2 Logic Gates and Introduction to Computer Architecture

Chapter 2 Logic Gates and Introduction to Computer Architecture Chapter 2 Logic Gates and Introduction to Computer Architecture 2.1 Introduction The basic components of an Integrated Circuit (IC) is logic gates which made of transistors, in digital system there are

More information

PROBLEMS (Cap. 4 - Istruzioni macchina)

PROBLEMS (Cap. 4 - Istruzioni macchina) 98 CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS PROBLEMS (Cap. 4 - Istruzioni macchina) 2.1 Represent the decimal values 5, 2, 14, 10, 26, 19, 51, and 43, as signed, 7-bit numbers in the following binary

More information

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language Chapter 4 Register Transfer and Microoperations Section 4.1 Register Transfer Language Digital systems are composed of modules that are constructed from digital components, such as registers, decoders,

More information

1 Computer hardware. Peripheral Bus device "B" Peripheral device. controller. Memory. Central Processing Unit (CPU)

1 Computer hardware. Peripheral Bus device B Peripheral device. controller. Memory. Central Processing Unit (CPU) 1 1 Computer hardware Most computers are organized as shown in Figure 1.1. A computer contains several major subsystems --- such as the Central Processing Unit (CPU), memory, and peripheral device controllers.

More information

1 Classical Universal Computer 3

1 Classical Universal Computer 3 Chapter 6: Machine Language and Assembler Christian Jacob 1 Classical Universal Computer 3 1.1 Von Neumann Architecture 3 1.2 CPU and RAM 5 1.3 Arithmetic Logical Unit (ALU) 6 1.4 Arithmetic Logical Unit

More information

Lecture N -1- PHYS 3330. Microcontrollers

Lecture N -1- PHYS 3330. Microcontrollers Lecture N -1- PHYS 3330 Microcontrollers If you need more than a handful of logic gates to accomplish the task at hand, you likely should use a microcontroller instead of discrete logic gates 1. Microcontrollers

More information

Traditional IBM Mainframe Operating Principles

Traditional IBM Mainframe Operating Principles C H A P T E R 1 7 Traditional IBM Mainframe Operating Principles WHEN YOU FINISH READING THIS CHAPTER YOU SHOULD BE ABLE TO: Distinguish between an absolute address and a relative address. Briefly explain

More information

Chapter 5 Instructor's Manual

Chapter 5 Instructor's Manual The Essentials of Computer Organization and Architecture Linda Null and Julia Lobur Jones and Bartlett Publishers, 2003 Chapter 5 Instructor's Manual Chapter Objectives Chapter 5, A Closer Look at Instruction

More information

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University cwliu@twins.ee.nctu.edu.

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University cwliu@twins.ee.nctu.edu. Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University cwliu@twins.ee.nctu.edu.tw Review Computers in mid 50 s Hardware was expensive

More information

How It All Works. Other M68000 Updates. Basic Control Signals. Basic Control Signals

How It All Works. Other M68000 Updates. Basic Control Signals. Basic Control Signals CPU Architectures Motorola 68000 Several CPU architectures exist currently: Motorola Intel AMD (Advanced Micro Devices) PowerPC Pick one to study; others will be variations on this. Arbitrary pick: Motorola

More information

CHAPTER 4 MARIE: An Introduction to a Simple Computer

CHAPTER 4 MARIE: An Introduction to a Simple Computer CHAPTER 4 MARIE: An Introduction to a Simple Computer 4.1 Introduction 195 4.2 CPU Basics and Organization 195 4.2.1 The Registers 196 4.2.2 The ALU 197 4.2.3 The Control Unit 197 4.3 The Bus 197 4.4 Clocks

More information

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic Today Binary addition Representing negative numbers 2 Binary Addition Consider the following binary numbers: 0 0 1 0 0 1 1 0 0 0 1 0 1 0 1 1 How do we add these numbers? 3 Binary Addition 0 0 1 0 0 1 1

More information

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory. 1 Topics Machine Architecture and Number Systems Major Computer Components Bits, Bytes, and Words The Decimal Number System The Binary Number System Converting from Decimal to Binary Major Computer Components

More information

Lab 1: Full Adder 0.0

Lab 1: Full Adder 0.0 Lab 1: Full Adder 0.0 Introduction In this lab you will design a simple digital circuit called a full adder. You will then use logic gates to draw a schematic for the circuit. Finally, you will verify

More information

CPU Sim 3.1: A Tool for Simulating Computer Architectures for CS3 classes

CPU Sim 3.1: A Tool for Simulating Computer Architectures for CS3 classes CPU Sim 3.1: A Tool for Simulating Computer Architectures for CS3 classes DALE SKRIEN Colby College CPU Sim 3.1 is an educational software package written in Java for use in CS3 courses. CPU Sim provides

More information

The string of digits 101101 in the binary number system represents the quantity

The string of digits 101101 in the binary number system represents the quantity Data Representation Section 3.1 Data Types Registers contain either data or control information Control information is a bit or group of bits used to specify the sequence of command signals needed for

More information

İSTANBUL AYDIN UNIVERSITY

İSTANBUL AYDIN UNIVERSITY İSTANBUL AYDIN UNIVERSITY FACULTY OF ENGİNEERİNG SOFTWARE ENGINEERING THE PROJECT OF THE INSTRUCTION SET COMPUTER ORGANIZATION GÖZDE ARAS B1205.090015 Instructor: Prof. Dr. HASAN HÜSEYİN BALIK DECEMBER

More information

MACHINE INSTRUCTIONS AND PROGRAMS

MACHINE INSTRUCTIONS AND PROGRAMS CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS CHAPTER OBJECTIVES In this chapter you will learn about: Machine instructions and program execution, including branching and subroutine call and return operations

More information

Levels of Programming Languages. Gerald Penn CSC 324

Levels of Programming Languages. Gerald Penn CSC 324 Levels of Programming Languages Gerald Penn CSC 324 Levels of Programming Language Microcode Machine code Assembly Language Low-level Programming Language High-level Programming Language Levels of Programming

More information

In this Chapter you ll learn:

In this Chapter you ll learn: Now go, write it before them in a table, and note it in a book. Isaiah 30:8 To go beyond is as wrong as to fall short. Confucius Begin at the beginning, and go on till you come to the end: then stop. Lewis

More information

CSCI 4717 Computer Architecture. Function. Data Storage. Data Processing. Data movement to a peripheral. Data Movement

CSCI 4717 Computer Architecture. Function. Data Storage. Data Processing. Data movement to a peripheral. Data Movement CSCI 4717/5717 Computer Architecture Topic: Functional View & History Reading: Sections 1.2, 2.1, & 2.3 Function All computer functions are comprised of four basic operations: Data processing Data storage

More information

Two's Complement Adder/Subtractor Lab L03

Two's Complement Adder/Subtractor Lab L03 Two's Complement Adder/Subtractor Lab L03 Introduction Computers are usually designed to perform indirect subtraction instead of direct subtraction. Adding -B to A is equivalent to subtracting B from A,

More information

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995 UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering EEC180B Lab 7: MISP Processor Design Spring 1995 Objective: In this lab, you will complete the design of the MISP processor,

More information

OAMulator. Online One Address Machine emulator and OAMPL compiler. http://myspiders.biz.uiowa.edu/~fil/oam/

OAMulator. Online One Address Machine emulator and OAMPL compiler. http://myspiders.biz.uiowa.edu/~fil/oam/ OAMulator Online One Address Machine emulator and OAMPL compiler http://myspiders.biz.uiowa.edu/~fil/oam/ OAMulator educational goals OAM emulator concepts Von Neumann architecture Registers, ALU, controller

More information

Chapter 1 Computer System Overview

Chapter 1 Computer System Overview Operating Systems: Internals and Design Principles Chapter 1 Computer System Overview Eighth Edition By William Stallings Operating System Exploits the hardware resources of one or more processors Provides

More information

A s we saw in Chapter 4, a CPU contains three main sections: the register section,

A s we saw in Chapter 4, a CPU contains three main sections: the register section, 6 CPU Design A s we saw in Chapter 4, a CPU contains three main sections: the register section, the arithmetic/logic unit (ALU), and the control unit. These sections work together to perform the sequences

More information

Central Processing Unit

Central Processing Unit Chapter 4 Central Processing Unit 1. CPU organization and operation flowchart 1.1. General concepts The primary function of the Central Processing Unit is to execute sequences of instructions representing

More information

SPSS INSTRUCTION CHAPTER 1

SPSS INSTRUCTION CHAPTER 1 SPSS INSTRUCTION CHAPTER 1 Performing the data manipulations described in Section 1.4 of the chapter require minimal computations, easily handled with a pencil, sheet of paper, and a calculator. However,

More information

Instruction Set Design

Instruction Set Design Instruction Set Design Instruction Set Architecture: to what purpose? ISA provides the level of abstraction between the software and the hardware One of the most important abstraction in CS It s narrow,

More information

Computer Organization. and Instruction Execution. August 22

Computer Organization. and Instruction Execution. August 22 Computer Organization and Instruction Execution August 22 CSC201 Section 002 Fall, 2000 The Main Parts of a Computer CSC201 Section Copyright 2000, Douglas Reeves 2 I/O and Storage Devices (lots of devices,

More information

LSN 2 Computer Processors

LSN 2 Computer Processors LSN 2 Computer Processors Department of Engineering Technology LSN 2 Computer Processors Microprocessors Design Instruction set Processor organization Processor performance Bandwidth Clock speed LSN 2

More information

Programming A PLC. Standard Instructions

Programming A PLC. Standard Instructions Programming A PLC STEP 7-Micro/WIN32 is the program software used with the S7-2 PLC to create the PLC operating program. STEP 7 consists of a number of instructions that must be arranged in a logical order

More information

Learning Outcomes. Simple CPU Operation and Buses. Composition of a CPU. A simple CPU design

Learning Outcomes. Simple CPU Operation and Buses. Composition of a CPU. A simple CPU design Learning Outcomes Simple CPU Operation and Buses Dr Eddie Edwards eddie.edwards@imperial.ac.uk At the end of this lecture you will Understand how a CPU might be put together Be able to name the basic components

More information

8085 INSTRUCTION SET

8085 INSTRUCTION SET DATA TRANSFER INSTRUCTIONS Opcode Operand Description 8085 INSTRUCTION SET INSTRUCTION DETAILS Copy from source to destination OV Rd, Rs This instruction copies the contents of the source, Rs register

More information

Questions 1. half adder sum. x y

Questions 1. half adder sum. x y uestions uestion 4. : (Solution, p 4) raw two truth tales illustrating the outputs of a half-adder, one tale for the output and the other for the output. uestion 4. 2: (Solution, p 4) Fill in the truth

More information

Computer Organization and Architecture

Computer Organization and Architecture Computer Organization and Architecture Chapter 11 Instruction Sets: Addressing Modes and Formats Instruction Set Design One goal of instruction set design is to minimize instruction length Another goal

More information

PART B QUESTIONS AND ANSWERS UNIT I

PART B QUESTIONS AND ANSWERS UNIT I PART B QUESTIONS AND ANSWERS UNIT I 1. Explain the architecture of 8085 microprocessor? Logic pin out of 8085 microprocessor Address bus: unidirectional bus, used as high order bus Data bus: bi-directional

More information

Modbus RTU Communications RX/WX and MRX/MWX

Modbus RTU Communications RX/WX and MRX/MWX 15 Modbus RTU Communications RX/WX and MRX/MWX In This Chapter.... Network Slave Operation Network Master Operation: RX / WX Network Master Operation: DL06 MRX / MWX 5 2 D0 Modbus Network Slave Operation

More information

Exemplar Work for SAMs. Units A452 and A453

Exemplar Work for SAMs. Units A452 and A453 Exemplar Work for SAMs Units A452 and A453 OCR 2012 GCSE Computing Controlled Assessment Unit A452 Practical Investigation Unit Recording Sheet Please read the instructions printed on the other side of

More information

isppac-powr1220at8 I 2 C Hardware Verification Utility User s Guide

isppac-powr1220at8 I 2 C Hardware Verification Utility User s Guide November 2005 Introduction Application Note AN6067 The isppac -POWR1220AT8 device from Lattice is a full-featured second-generation Power Manager chip. As part of its feature set, this device supports

More information

CSE 141L Computer Architecture Lab Fall 2003. Lecture 2

CSE 141L Computer Architecture Lab Fall 2003. Lecture 2 CSE 141L Computer Architecture Lab Fall 2003 Lecture 2 Pramod V. Argade CSE141L: Computer Architecture Lab Instructor: TA: Readers: Pramod V. Argade (p2argade@cs.ucsd.edu) Office Hour: Tue./Thu. 9:30-10:30

More information

STEP 7 MICRO/WIN TUTORIAL. Step-1: How to open Step 7 Micro/WIN

STEP 7 MICRO/WIN TUTORIAL. Step-1: How to open Step 7 Micro/WIN STEP 7 MICRO/WIN TUTORIAL Step7 Micro/WIN makes programming of S7-200 easier. Programming of S7-200 by using Step 7 Micro/WIN will be introduced in a simple example. Inputs will be defined as IX.X, outputs

More information

Parts of a Computer. Preparation. Objectives. Standards. Materials. 1 1999 Micron Technology Foundation, Inc. All Rights Reserved

Parts of a Computer. Preparation. Objectives. Standards. Materials. 1 1999 Micron Technology Foundation, Inc. All Rights Reserved Parts of a Computer Preparation Grade Level: 4-9 Group Size: 20-30 Time: 75-90 Minutes Presenters: 1-3 Objectives This lesson will enable students to: Identify parts of a computer Categorize parts of a

More information

MACHINE ARCHITECTURE & LANGUAGE

MACHINE ARCHITECTURE & LANGUAGE in the name of God the compassionate, the merciful notes on MACHINE ARCHITECTURE & LANGUAGE compiled by Jumong Chap. 9 Microprocessor Fundamentals A system designer should consider a microprocessor-based

More information

Jianjian Song LogicWorks 4 Tutorials (5/15/03) Page 1 of 14

Jianjian Song LogicWorks 4 Tutorials (5/15/03) Page 1 of 14 LogicWorks 4 Tutorials Jianjian Song Department of Electrical and Computer Engineering Rose-Hulman Institute of Technology March 23 Table of Contents LogicWorks 4 Installation and update...2 2 Tutorial

More information

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System? Management Challenge Managing Hardware Assets What computer processing and storage capability does our organization need to handle its information and business transactions? What arrangement of computers

More information

First Bytes Programming Lab 2

First Bytes Programming Lab 2 First Bytes Programming Lab 2 This lab is available online at www.cs.utexas.edu/users/scottm/firstbytes. Introduction: In this lab you will investigate the properties of colors and how they are displayed

More information

Chapter 4 Lecture 5 The Microarchitecture Level Integer JAVA Virtual Machine

Chapter 4 Lecture 5 The Microarchitecture Level Integer JAVA Virtual Machine Chapter 4 Lecture 5 The Microarchitecture Level Integer JAVA Virtual Machine This is a limited version of a hardware implementation to execute the JAVA programming language. 1 of 23 Structured Computer

More information

Computer System: User s View. Computer System Components: High Level View. Input. Output. Computer. Computer System: Motherboard Level

Computer System: User s View. Computer System Components: High Level View. Input. Output. Computer. Computer System: Motherboard Level System: User s View System Components: High Level View Input Output 1 System: Motherboard Level 2 Components: Interconnection I/O MEMORY 3 4 Organization Registers ALU CU 5 6 1 Input/Output I/O MEMORY

More information

Programming Logic controllers

Programming Logic controllers Programming Logic controllers Programmable Logic Controller (PLC) is a microprocessor based system that uses programmable memory to store instructions and implement functions such as logic, sequencing,

More information

The goal is to program the PLC and HMI to count with the following behaviors:

The goal is to program the PLC and HMI to count with the following behaviors: PLC and HMI Counting Lab The goal is to program the PLC and HMI to count with the following behaviors: 1. The counting should be started and stopped from buttons on the HMI 2. The direction of the count

More information

TestManager Administration Guide

TestManager Administration Guide TestManager Administration Guide RedRat Ltd July 2015 For TestManager Version 4.57-1 - Contents 1. Introduction... 3 2. TestManager Setup Overview... 3 3. TestManager Roles... 4 4. Connection to the TestManager

More information

EE361: Digital Computer Organization Course Syllabus

EE361: Digital Computer Organization Course Syllabus EE361: Digital Computer Organization Course Syllabus Dr. Mohammad H. Awedh Spring 2014 Course Objectives Simply, a computer is a set of components (Processor, Memory and Storage, Input/Output Devices)

More information

CPU Sim USER'S MANUAL

CPU Sim USER'S MANUAL 1 CPU Sim USER'S MANUAL Version 3.4 January, 2007 by Dale Skrien assisted by Raymond Mazza III, Joshua Ladieu, Jonathan Weinberg, Andreea Olea, Thomas Cook, Patrick Rodjito, Tim Monahan, Mike Liedtke,

More information

ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER

ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER Pierre A. von Kaenel Mathematics and Computer Science Department Skidmore College Saratoga Springs, NY 12866 (518) 580-5292 pvonk@skidmore.edu ABSTRACT This paper

More information

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX Overview CISC Developments Over Twenty Years Classic CISC design: Digital VAX VAXÕs RISC successor: PRISM/Alpha IntelÕs ubiquitous 80x86 architecture Ð 8086 through the Pentium Pro (P6) RJS 2/3/97 Philosophy

More information

Generating MIF files

Generating MIF files Generating MIF files Introduction In order to load our handwritten (or compiler generated) MIPS assembly problems into our instruction ROM, we need a way to assemble them into machine language and then

More information

BASIC COMPUTER ORGANIZATION AND DESIGN

BASIC COMPUTER ORGANIZATION AND DESIGN 1 BASIC COMPUTER ORGANIZATION AND DESIGN Instruction Codes Computer Registers Computer Instructions Timing and Control Instruction Cycle Memory Reference Instructions Input-Output and Interrupt Complete

More information

Exceptions in MIPS. know the exception mechanism in MIPS be able to write a simple exception handler for a MIPS machine

Exceptions in MIPS. know the exception mechanism in MIPS be able to write a simple exception handler for a MIPS machine 7 Objectives After completing this lab you will: know the exception mechanism in MIPS be able to write a simple exception handler for a MIPS machine Introduction Branches and jumps provide ways to change

More information

Addressing The problem. When & Where do we encounter Data? The concept of addressing data' in computations. The implications for our machine design(s)

Addressing The problem. When & Where do we encounter Data? The concept of addressing data' in computations. The implications for our machine design(s) Addressing The problem Objectives:- When & Where do we encounter Data? The concept of addressing data' in computations The implications for our machine design(s) Introducing the stack-machine concept Slide

More information

Input / Output and I/O Strategies

Input / Output and I/O Strategies The Four Major Input / Output Strategies Preliminary Definitions A Silly Example to Illustrate Basic Definitions Input / Output and I/O Strategies A Context for Advanced I/O Strategies The Four Strategies

More information

1. Convert the following base 10 numbers into 8-bit 2 s complement notation 0, -1, -12

1. Convert the following base 10 numbers into 8-bit 2 s complement notation 0, -1, -12 C5 Solutions 1. Convert the following base 10 numbers into 8-bit 2 s complement notation 0, -1, -12 To Compute 0 0 = 00000000 To Compute 1 Step 1. Convert 1 to binary 00000001 Step 2. Flip the bits 11111110

More information

Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek

Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek Instruction Set Architecture or How to talk to computers if you aren t in Star Trek The Instruction Set Architecture Application Compiler Instr. Set Proc. Operating System I/O system Instruction Set Architecture

More information

Getting Started on the Computer With Mouseaerobics! Windows XP

Getting Started on the Computer With Mouseaerobics! Windows XP This handout was modified from materials supplied by the Bill and Melinda Gates Foundation through a grant to the Manchester City Library. Getting Started on the Computer With Mouseaerobics! Windows XP

More information

Python Programming: An Introduction to Computer Science

Python Programming: An Introduction to Computer Science Python Programming: An Introduction to Computer Science Chapter 1 Computers and Programs 1 Objectives To understand the respective roles of hardware and software in a computing system. To learn what computer

More information

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING UNIT 1 - INTRODUCTION JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ Unit 1.MaNoTaS 1 Definitions (I) Description A computer is: A

More information

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program. Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to

More information

Sync Tool for Clarion NX700/NX509/NP509 Series

Sync Tool for Clarion NX700/NX509/NP509 Series 1 Introduction Sync Tool for Clarion NX700/NX509/NP509 Series User Guide The Sync Tool is a downloadable application that enables you to update the navigation software, maps and other content included

More information

Graded ARM assembly language Examples

Graded ARM assembly language Examples Graded ARM assembly language Examples These examples have been created to help students with the basics of Keil s ARM development system. I am providing a series of examples that demonstrate the ARM s

More information

13 Managing Devices. Your computer is an assembly of many components from different manufacturers. LESSON OBJECTIVES

13 Managing Devices. Your computer is an assembly of many components from different manufacturers. LESSON OBJECTIVES LESSON 13 Managing Devices OBJECTIVES After completing this lesson, you will be able to: 1. Open System Properties. 2. Use Device Manager. 3. Understand hardware profiles. 4. Set performance options. Estimated

More information

Systems I: Computer Organization and Architecture

Systems I: Computer Organization and Architecture Systems I: Computer Organization and Architecture Lecture : Microprogrammed Control Microprogramming The control unit is responsible for initiating the sequence of microoperations that comprise instructions.

More information