Binary! Objectives Recap what a instruction is Look at how binary can be used to store – Opcode – data.

Slides:



Advertisements
Similar presentations
GCSE Computing Lesson 5.
Advertisements

Computer Architecture and the Fetch-Execute Cycle
Microprocessors Typical microprocessor controlled devices: Camera, mobile phone, stereo, mp3 player, electronic toys… High-level microprocessor controlled.
The Little man computer
The CPU Revision Typical machine code instructions Using op-codes and operands Symbolic addressing. Conditional and unconditional branches.
19-1 Programming… The Pencil and Paper Computer The Pencil & Paper Instruction Set: (table on p148) The Operand specifies a memory location.
Snick  snack A Working Computer Slides based on work by Bob Woodham and others.
Room: E-3-31 Phone: Dr Masri Ayob TK 2123 COMPUTER ORGANISATION & ARCHITECTURE Lecture 5: CPU and Memory.
LMC Little Moron Computer
Computer Hardware What goes on inside?. Deeper.
1 Lecture-2 CS-120 Fall 2000 Revision of Lecture-1 Introducing Computer Architecture The FOUR Main Elements Fetch-Execute Cycle A Look Under the Hood.
Overview The von Neumann Machine - the programmable digital computer Introducing the LC-3 Computer - A “toy” computer for us to learn from Computer machine.
Basic Computer Organization, CPU L1 Prof. Sin-Min Lee Department of Computer Science.
Dale & Lewis Chapter 5 Computing components. Let’s design a computer Generic CPU with registers −Program counter (PC) – 5 bits (size of addresses) −Instruction.
The Little Man Computer
An Interactive Web-Based Simulation of a General Computer Architecture
LMC Assembly Making Programming Friendlier. Machine Code Issues Have to remember numeric opcodes Have to think about physical memory locations – What.
Introduction to Computer Architecture and System
Computer Science 210 Computer Organization The von Neumann Architecture.
Computer Systems Organization CS 1428 Foundations of Computer Science.
Week 2.  Understand what the processor is and what it does.  Execute basic LMC programs.  Understand how CPU characteristics affect performance.
Topic 1Topic 2Topic 3Topic 4Topic
The Central Processing Unit (CPU) and the Machine Cycle.
Model Computer CPU Arithmetic Logic Unit Control Unit Memory Unit
CS 111 – Sept. 15 Chapter 2 – Manipulating data by performing instructions “What is going on in the CPU?” Commitment: –Please read through section 2.3.
Computer Architecture Memory, Math and Logic. Basic Building Blocks Seen: – Memory – Logic & Math.
COMPUTER ORGANISATION I HIGHER STILL Computing Computer Systems Higher Marr College Computing Department 2002.
© GCSE Computing Candidates should be able to:  describe the characteristics of an assembler Slide 1.
Represents different voltage levels High: 5 Volts Low: 0 Volts At this raw level a digital computer is instructed to carry out instructions.
1.4 Representation of data in computer systems Instructions.
The Little-Man Computer Damian Gordon. The Little-Man Computer Most computer architectures conform to the so-called von Neuman Architecture. This means.
Computer Systems Organization
Electronic Analog Computer Dr. Amin Danial Asham by.
Dale & Lewis Chapter 5 Computing components
Computer Organization and Assembly Languages Yung-Yu Chuang 2005/09/29
Central Processing Unit (CPU) MATTHEW BOWEN. Function  The function of the CPU is to execute all of the commands and calculations or “processes” that.
Computer Systems – Machine & Assembly code. Objectives Machine Code Assembly Language Op-code Operand Instruction Set.
This is where you can reset and run your program. If your program has an “INP” (input) command, you will type it in this box here. Using the LMC These.
M211 – Central Processing Unit
Central Processing Unit Decode Cycle. Central Processing Unit Current Instruction Register (CIR) I1 The fetch cycle has transferred an instruction from.
Representation of Data Binary Representation of Instructions teachwithict.weebly.com.
Mastering LMC Coding Part #1 Introduction to Low Level Languages Introduction to Little Man computer Simple examples (demos) with video tutorials included.
Von Neumann Architecture Stored-Program Architecture.
F453 Module 8: Low Level Languages 8.1: Use of Computer Architecture.
Chapter I: Introduction to Computer Science. Computer: is a machine that accepts input data, processes the data and creates output data. This is a specific-purpose.
Instruction Memory value Description ADD1xx Add the value stored at memory address xx to the value in the accumulator register SUB2xx Subtract the value.
1. 2 TimeActivity 9:45Welcome and introductions 10:00What is a computer? 10:15What’s inside? 10:45Activity: A simple view of how computers work 11:15Coffee/tea.
OCR GCSE Computer Science Teaching and Learning Resources
The Little man computer
CHAPTER 6: The Little Man Computer
Chapter 10: Computer systems (1)
CHAPTER 6: The Little Man Computer
Computer Science 210 Computer Organization
Lesson Objectives A note about notes: Aims
Computer Architecture
Starter Read the Feedback Click on Add new Feedback Open Realsmart
System Architecture 1 Chapter 2.
Making Programming Friendlier
Do it now – PAGE 10 You will find your do it now task in your workbook – look for the start button! Tuesday, 15 January 2019.
Computer Architecture
Computer Architecture
MARIE: An Introduction to a Simple Computer
MARIE: An Introduction to a Simple Computer
DO IT NOW The LMC has the following instruction set:
GCSE OCR 1 The CPU Computer Science J276 Unit 1
Computer Organization and Assembly Languages Yung-Yu Chuang 2005/09/29
World’s first programmable computer – Colossus
A Level Computer Science Topic 5: Computer Architecture and Assembly
COMPUTER ARCHITECTURE
Little Man Computer.
Presentation transcript:

Binary! Objectives Recap what a instruction is Look at how binary can be used to store – Opcode – data

What are computer instructions? Computers are very efficient data processing machines. First ones literally wired to carry of 1 task – code breaking or a calculation etc If needed to do another task – engineers spend days re-wiring the machine. Had to be a better way WWII – American Scientist John Von Neumann – atomic bomb – idea – digital data & digital instructions are the same. His approach allowed a computer to be re-programmed by changing the instructions rather than re-wiring it. What we have today. The instructions are called software

Binary instructions Software is run on the micro-processor by sending instructions from memory to the micro-processor. It is then decoded and executed. Instructions are run one at a time sequentially. Micro-processors use registers, which are inside the CPU, in order to perform calculations. Some instructions include – ADD SUB JMP DAT You are encouraged to look at the LMC simulator to refresh your memory.

Binary Encoding instructions Instructions have two parts to them. Opcode - a binary value which represents the instruction Data – Could be null or will contain the data needed for the instruction. When a instruction is passed to a micro-processor the first thing which happens is the opcode is decoded. This means the micro-processor will look the binary code up in a table. Once the instruction is found it will execute it.

Binary Encoding instructions NameNumberBinary valueComment ADD Add a register to the ACC SUB Subtract a register to the ACC INP Get a value from the user OUT Display a value LDA Load a register to the ACC STA Store the ACC to a register DAT Set a value to the ACC Note – the binary values are in BCD

Binary Data The second part of an instruction is the data. The program below will add 2 numbers together – DAT 12 STA 1 DAT 4 ADD 1 OUT The highlighted parts are the data parts of the instruction. These are numeric values so are encoded using normal binary.

Binary Encoded Data InstructionOpcodeDataData in binary DAT STA DAT ADD OUT xx

Binary Activity InstructionopcodeDataData in binary INPx STA4 INPx STA3 DAT10 ADD3 SUB4 OUTx Fill out the opcode and binary values for the program below

Binary Activity Make revision notes on opcode and instruction data. You do not need to memorise the codes! You just need to understand how they are stored in binary.