330 likes | 450 Views
Lecture 2 Computer Workings. Computer. A Machine which Continuously Executes a Series of Instructions Called a Program Functions or Operates Using Electricity Must Rely Upon an Electrical Source for Proper Operation. Electricity. Two States: On and Off Represented By ( 1) + / -
E N D
Lecture 2 Computer Workings
Computer • A Machine which Continuously Executes a Series of Instructions Called a Program • Functions or Operates Using Electricity • Must Rely Upon an Electrical Source for Proper Operation
Electricity • Two States: On and Off • Represented By • (1) + / - • (2) on / off • (3) < / > • red / black • light on / light off
Intelligence Derived • Very Limited -- Two Items of Intelligence • Something Is There or Not There • Something Exists or Does Not Exist • A Middle State Cannot Exist
Mathematical Machines First Computers Were Created for Mathematical Calculations Compute – er Easily Represent Numbers in a Number System Problems Arise when Representing Letters of the Alphabet with Numbers
Number Systems Decimal System Known as Base 10 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 First Count the Units (or Ones), then the Tens, the Hundreds, the Thousands, etc. Represented In Exponential Terms 100, 101, 102, 103, etc.
Base2 • Convenient for Programmers • Only Two Representations: 0 and 1 • Computers Function with Electrical Impulses; Electricity Has Two States • Many Precedents upon which to Rely • Morse Code (Samuel Morse) • Created in the 1830s
Binary System • Bit Binary Digit • A Bit Has Only Two Options: 0 or 1 • Bits Must Be Combined to Represent Letters of the Alphabet • 26 Letters in the Standard American English Alphabet • How Many Binary Digit Combinations • Are Needed to Include All Letters • of the English Alphabet?
Binary Representations • If One Were to Desire Uppercase and Lowercase Letters, there Must Be at Least 52 Different Representations: • 26 Uppercase / 26 Lowercase Letters • If Numbers Are Desired, an Additional 10 Representations Must Be Included • 62 Unique Combinations Are Needed • (Punctuation is not Included)
Binary Coding Schemes • Minimum Necessary: Seven Binary Digits • Six Binary Digits Would Not Allow Punctuation or Other Symbols • Codified by the American Standards Institute for Use in All Computers • ASCII American Standard Code for Information Interchange
ASCII Total of 128 Different Representations Can Be Made Lowercase Letters Uppercase Letters Control Characters (CTRL) Alternate Control Characters (ALT) Numbers, Punctuation, and Symbols
EBDIC • ASCII Not Sufficient to Represent All Necessary Characters • Foreign Letters and Symbols • Early 1960s, IBM Created the Extended Binary-coded Decimal Interchange Code Utilizing Eight Binary Digits • Eight Bits Equal One Byte • Each Character Typed Is One Byte
Essential Hardware Devices Input Device to Input Data Output Device for Results Central Processing Unit (CPU) to Process Input Into Output Memory for the Data Being Processed By the CPU Secondary Storage Device to Save Data for Later Use
System Unit • Central Processing Unit • Memory • Peripheral Devices • Buses • Motherboard
Motherboard • Circuit Board Containing • Computer Chips • Crucial to Operate the System • Connectors • Expansion Boards or Chips • Peripheral Devices
Power Supply - Drive Bays Power Supply Delivers Power to System Transformer – 17 volts Drive Bays to Hold Disk Drives Hard-disk Drives Optical Drives DVD Drive
Central Processing Unit The Brains of the Computer Complex Set of Electronic Circuitry that Executes Program Instructions Consists of Control Unit Arithmetic/Logic Unit Registers Bus Interface Unit Prefetch Unit Decode Unit Internal Cache Memory
Control Unit • Signals, Directs, and Coordinates the Entire Computer System • Determines which Command Will Be Executed • Executes Program Commands • Supervisory Control • Directional Control • Discretionary control
Arithmetic/Logic Unit • A Separate Function • Integral in the Functioning of the CPU • Executes All Arithmetic and Logical Operations • Performs Mathematical Operations on Data • Performs Comparison Operations on Data
Arithmetic/Logic Unit • Manipulates Data Being Processed • (1) Mathematically (+, -, *, /) • (2) Logically (And, Or, Not) • Relationally (>, ≥, <, ≤, =, ≠) • Floating Point Unit • Used with Calculations Containing Decimals
Registers High Speed Memory within the CPU Store Data During Processing Intermediary Calculations Temporary Results of Processing Program Counters Memory Addresses
The Bus Interface Electronic Path Over which Data Travels Bus Width – Number of Bits on Bus Bus Speed – Speed of Data Transfer Bandwidth Amount of Data Transferred Over Bus in a Given Period Also Known as Throughput
Machine Cycle • Each Cycle Processes One Instruction • Fetch – Instruction is Fetched • Decode – Convert Code to Binary for CPU, A/LU, and FPU • Execute – Carry Out Instruction • Store – Add Data to CPU Register
Processing Considerations Clock Speed – Measured in GHz The Number of Instructions per Second Word Size – Measured in Number of Bits The Number of Bytes (8 Bits) which are Processed at One Time Cache Memory – Identified by Level The Memory Storing CPU Instructions Often Internal in CPU
Memory Primary Storage Location for All Commands and Data for the Operation of the Computer and Execution of Commands Two Types Of Memory Read-only Memory (ROM) Random Access Memory (RAM)
Read-only Memory • Can Only Be Read by the Computer • Computer Cannot Write to ROM • Internal to Computer • Understood as Being Permanent and Non-Erasable • Boot-strap Loader • Most Common Application of ROM • Those Commands Necessary to Startup – to Boot – the Computer
Random Access Memory • Memory Registers Read from and Written to by the Computer • Provides Temporary Storage for Data and Commands Needed by the Processor • Is Erasable and Non-permanent • If Users Desire to Keep the Contents of RAM, Additional Secondary Storage Mediums Must Be Utilized
Improving Performance • Add Additional Memory • Preform Systems Maintenance • Increase Secondary Storage • Upgrade Internet Connection • Upgrade Video Graphics Card
Strategies for Improvement Improve Basic Computer Architecture New Motherboard, CPU Components Improve Materials Results in Higher Speed Transfer Pipelining Execute Next Instruction when Current Instruction Is at Next Stage Multiprocessing – Parallel Processing Having More than One CPU Processing the Same or Different Tasks
Lecture 2 Computer Workings