Download presentation
Presentation is loading. Please wait.
Published byOwen Ryan Modified over 9 years ago
1
Chapter 1 09/04/13
2
Change Your Password The command is: passwd In the lab first do : ssh -Y onyx You will have to see me to change it, if you forget it. Change it to something you can remember
3
Computer Architecture and Language Know Basic Computer Architecture Know Basic Software and Languages Identify Types of Programming Errors 3
4
COMPUTER ARCHITECTURE 4
5
CPU Central Processing Unit 5
6
CPU "Brain" of the Computer Executes program instructions Controls Other Devices Carries out arithmetic operations Fetches data from memory and stores it back 6
7
Primary Memory RAM Stores program while it is executed Also stores data the program needs Temporary 7
8
Secondary Memory Long term storage Devices Hard Drive Flash Drive Tapes 8
9
Input and Output Devices Input Devices Let user enter data Mouse, Keyboard, Camera Output Devices Let user access data in system Display Screen, Printer, Speaker 9
10
Anatomy of a Computer 10
11
SOFTWARE 11
12
Software Computer software refers to programs that reside and execute electronically on the hardware. Compilers Translate source code Operating systems Provide the HCI (Human Computer Interface) Application programs Provide problem solutions 12
13
Languages Machine Code Only code computer understands Numeric(binary) Code 161 40000 45 100 127 11280 Extremely primitive High Level Languages More like English Instructions more powerful C++, Java, VB, Python Must be translated with a Compiler 13
14
Languages The compiler translates C++ programs into machine code. The linker combines machine code with library code into an executable program. C++ for Everyone by Cay Horstmann Copyright © 2012 by John Wiley & Sons. All rights reserved
15
Engineering Problem Solving with C++ second edition, J. ingber 15 Executing a C++ Program Source File printable/Readable Program file Created with vi or other editor Object File nonprintable machine readable file Created by compiler Executable Program nonprintable executable code Linker links libraries with object code to create it.
16
Engineering Problem Solving with C++ second edition, J. ingber 16 Errors Syntax errors Reported by the compiler Error in language rules, such as leaving out a ";" Execution/Run-time errors Reported by the operating system Cause program to stop abnormally e.g. Zero divide Logic errors Not reported Just cause bad program results e.g. Program converts 24 inches to 7 feet.
17
17 Questions What is the purpose of the CPU? How does it know what to do? Give an example of an input device. Where is a program stored while it is executing? What linux command is used to translate a C++ program into machine code? A program to convert fahrenheit to celsius asks the user for a fahrenheit temperature then stops abnormally. What kind of error is this? Another temperature conversion program gets a fahrenheit temperature of 32 then outputs 50 degrees celsius. What kind of error is this one?
18
18 Quiz Next Wednesday Linux and Vim Chapter 1
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.