Download presentation
Presentation is loading. Please wait.
Published byJeffery Hancock Modified over 9 years ago
1
Computer Systems Organization CS 1428 Foundations of Computer Science
2
2 Objectives In this section, you will: Review binary data representation Put all the pieces together – the Von Neumann architecture Why getting more memory will help your computer run faster Learn how C++ programs are run by the computer
3
Software Programs are stored in a binary format that is specific to the processor (or virtual machine, in the case of Java) High-level language programs must be “compiled” into machine language that is targeted toward a specific processor or operating system 3
4
From a High-level Program to an Executable File Slide 1- 4 Source Code Preprocessor Modified Source Code Compiler Object Code Linker Executable Code
5
5 Representing integers Decimal integers are converted to binary integers Given k bits, the largest unsigned integer is 2 k - 1 Given 4 bits, the largest is 2 4 -1 = 15 Signed integers must also represent the sign (positive or negative) Integers often represented in two’s complement Binary Representation of Numeric and Textual Information
6
6 Characters are mapped onto binary numbers ASCII code set 8 bits per character; 256 character codes What is the numeric code for a capital A? In binary? UNICODE code set 16 bits per character; 65,536 character codes Text strings are sequences of characters in some encoding Binary Representation of Numeric and Textual Information (continued)
7
7 Representing real numbers Approximations Not possible to store all real numbers Real numbers may be put into binary scientific notation: a x 2 b Example: 101.11 x 2 0 Number then normalized so that first significant digit is immediately to the right of the binary point Example:.10111 x 2 3 Mantissa and exponent then stored Binary Representation of Numeric and Textual Information (continued)
8
8 Representing other data Almost any analog information can be “digitized” to store on a computer Sound Pictures Video
9
9 The Components of a Computer System Von Neumann architecture has four functional units: Memory Input/Output Arithmetic/Logic unit Control unit Sequential execution of instructions Stored program concept
10
10 Components of the Von Neumann Architecture Bus Cache
11
11 Memory and Cache RAM (Random Access Memory ) Memory made of addressable 8 bit “cells” Memory address Unsigned binary number N bits long Address space is then 2 N cells Fetch/store controller Fetch: retrieve a value from memory Store: store a value into memory
12
12 Memory and Cache (continued) Memory register Very fast storage location Given a name, not an address Serves some special purpose Modern computers have dozens or hundreds of registers
13
13 Cache Memory Memory access is much slower than processing time Faster memory is too expensive to use for all memory cells Locality principle Once a value is used, it is likely to be used again Small size, fast memory just for values currently in use speeds computing time
14
CPU Control Unit Manages execution Arithmetic and Logic Unit (ALU) Does calculations 14
15
15 The Control Unit Manages stored program execution Task Fetch from memory the next instruction to be executed Decode instruction: determine what is to be done Execute instruction: issue appropriate command to ALU, memory, and I/O controllers Decode Execute Fetch Instruction Cycle
16
16 Control Unit Registers And Circuits Parts of control unit Links to other subsystems Instruction decoder circuit Three special registers: Program Counter (PC) Stores the memory address of the next instruction to be executed Instruction Register (IR) Stores the code for the current instruction Accumulator (ACC) Where the results of all arithmetic operations and loads is stored.
17
17 The Arithmetic/Logic Unit Actual computations are performed Primitive operation circuits Arithmetic (ADD, etc.) Comparison (CE, etc.) Logic (AND, etc.) Data inputs and results stored in registers Multiplexor selects desired output
18
18 Machine Language Instructions Can be decoded and executed by control unit Always in binary!! Parts of instructions Operation code (op code) Unique unsigned-integer code assigned to each machine language operation Address field(s) Memory addresses of the values on which operation will work
19
19 Machine Language Instructions (continued) Operations of machine language Data transfer Move values to and from memory and registers Arithmetic/logic Perform ALU operations that produce numeric values
20
20 Machine Language Instructions (continued) Operations of machine language (continued) Compares Set bits of compare register to hold result Branches Jump to a new memory address to continue processing
21
21 Pippin View Assembly language (Closer to Human Language) Machine Language (Only thing a computer understands.) Copyright Notice Copyright Notice ©2003 PWS Publishing Company, All Rights Reserved.PWS Publishing Company
22
22 Program: LOD #00000011 ADD 10000000 STO 10000011 HLT Note the error in the documentation. The STO op code is really 0000 0101.
23
23 Summary Computer organization examines different subsystems of a computer: memory, input/output, arithmetic/logic unit, and control unit Machine language gives codes for each primitive instruction the computer can perform, and its arguments Von Neumann machine: sequential execution of stored program
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.