Download presentation
Presentation is loading. Please wait.
Published byKimberly Riley Modified over 8 years ago
1
52.223 Low Level Programming Lecturer: Duncan Smeed Recap
2
Introduction and Recap 52223_01/20 The Organisation of a Computer Organisation of a computer, showing the five classic components: –input –output –memory –datapath and –control (these last two are sometimes combined and called the processor)
3
Introduction and Recap 52223_01/21 Block Diagram of Typical Computer
4
Introduction and Recap 52223_01/22 Input/Output (I/O) Subsystem
5
Introduction and Recap 52223_01/23 Memory-mapped I/O Structure
6
Introduction and Recap 52223_01/24 Memory Structure Most, if not all, modern day computers incorporate at least two types of main memory device: –Read Only Memory (ROM) and –Random Access Memory (RAM).
7
Introduction and Recap 52223_01/25 Read Only Memory (ROM) The contents of such memory devices are non-volatile –which means that their contents are not lost when the power is switched off. ROM is normally required 'boot' (start from a power off state) a computer as it must get (at least) its first few instructions from such a device. The (rest of the) operating system is then, typically, loaded from a magnetic media such as tape, floppy disk or hard disk. Some computers keep the whole of their operating system in ROM although this has the disadvantage that it cannot be as easily updated as changing the (contents of) magnetic media.
8
Introduction and Recap 52223_01/26 Random Access Memory (RAM) More accurately called Read/Write Memory (RWM) –the contents of which can be written as well as read. Normally volatile in that it loses its contents when power is switched off. Most computers have much more RAM than ROM as most programs, including the operating system, are loaded into this type of memory.
9
Introduction and Recap 52223_01/27 Typical Structure of Main Memory
10
Introduction and Recap 52223_01/28 Memory Organisations 7 0 0 1 2 3 4 5 S6 T7 R8 I9 N10 G11 12 65533 65534 65535 Byte-addressable memory for an 8-bit processor…
11
Introduction and Recap 52223_01/29 Memory Organisations - Little-Endian Byte-addressable memory for a “Little-Endian” 16-bit processor such as the Intel 8086… 15 87 0 10 32 54 7TS6 9IR8 11GN10 6553365532 6553565534
12
Introduction and Recap 52223_01/30 Memory Organisations - Big-Endian Byte-addressable memory for a “Big-Endian” 16-bit processor such as the Motorola 68000… 15 87 0 01 23 45 6ST7 8RI9 10NG11 6553265533 6553465535
13
Introduction and Recap 52223_01/31 CPU Structure and Function The major structural components of a CPU are: –Control Unit: Controls the operation of the CPU –Arithmetic and Logic Unit: Performs the computer’s data processing functions –Registers: Provides storage internal to the CPU –CPU Interconnection: Some means of communication between the CU, ALU, and registers.
14
Introduction and Recap 52223_01/32 …CPU Structure and Function The function of the CPU is to: –Fetch Instructions –Interpret Instructions –Fetch data (if required) –Process data (if required) –Write data (if required)
15
Introduction and Recap 52223_01/33 Register Organisation The registers in the CPU serve two functions: –User-Visible Registers: These enable the programmer to minimise external memory references by optimising usage of registers. –Control and Status Registers: These enable the control unit to control the operation of the CPU.
16
Introduction and Recap 52223_01/34 User-Visible Registers These can be categorised as follows: –General Purpose –Data –Address –Condition Codes In some m/cs General Purpose registers may either be used for Data or Address. In a completely orthogonal instruction set (IS) any GP register can contain the operand(s) for any opcode. Often, however, there are restrictions.
17
Introduction and Recap 52223_01/35 Control and Status Registers These, in general, are not visible to the user. Four registers are essential to instruction execution: –Program Counter (PC): Contains the address of an instruction to be fetched. –Instruction Register (IR): Contains the instruction most recently fetched. –Memory Address Register (MAR): Contains the address of a memory location. –Memory Buffer Register (MBR): Contains a word to be written to memory or the word most recently read. Typical CPU designs include a register often called the Program Status Word (PSW) that contains status information such as condition codes plus other status information.
18
Introduction and Recap 52223_01/36 Instruction Types Any program written in a high-level language (HLL) must be translated into machine language in order to be executed. Thus the set of m/c instructions must be sufficient to express any of the instructions from a HLL. Thus we can categorise the following types: –Data Processing:Arithmetic & Logic –Data Storage:Memory instructions –Data Movement:I/O instructions –Control:Test & Branch instructions
19
Introduction and Recap 52223_01/37 Instruction Repertoire - types of operation The number of different opcodes varies widely from machine to machine. A typical categorisation is: –Data Transfer –Arithmetic –Logical –Conversion –I/O –System Control –Transfer of Control
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.