18
Chapter 1 09/04/13

Chapter 1 09/04/13. 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

Embed Size (px)

Citation preview

Page 1: Chapter 1 09/04/13. 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

Chapter 1

09/04/13

Page 2: Chapter 1 09/04/13. 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

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

Page 3: Chapter 1 09/04/13. 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

Computer Architecture and Language

Know Basic Computer Architecture Know Basic Software and Languages Identify Types of Programming Errors

3

Page 4: Chapter 1 09/04/13. 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

COMPUTER ARCHITECTURE

4

Page 5: Chapter 1 09/04/13. 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

CPU

Central Processing Unit

5

Page 6: Chapter 1 09/04/13. 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

CPU

"Brain" of the Computer• Executes program instructions• Controls Other Devices• Carries out arithmetic operations• Fetches data from memory and stores

it back

6

Page 7: Chapter 1 09/04/13. 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

Primary Memory

RAM Stores program while it is executed Also stores data the program needs Temporary

7

Page 8: Chapter 1 09/04/13. 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

Secondary Memory

Long term storageDevices

• Hard Drive• Flash Drive• Tapes

8

Page 9: Chapter 1 09/04/13. 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

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

Page 10: Chapter 1 09/04/13. 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

Anatomy of a Computer

10

Page 11: Chapter 1 09/04/13. 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

SOFTWARE

11

Page 12: Chapter 1 09/04/13. 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

SoftwareComputer 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

Page 13: Chapter 1 09/04/13. 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

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

Page 14: Chapter 1 09/04/13. 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

LanguagesThe compiler translates C++ programs into machine code.

The linker combines machine code with library code into an executable program.

C++ for Everyone by Cay HorstmannCopyright © 2012 by John Wiley & Sons. All rights reserved

Will the entire slide show (the Editor and Executable Program screens are ON the edge).
Page 15: Chapter 1 09/04/13. 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

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.

Page 16: Chapter 1 09/04/13. 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

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.

Page 17: Chapter 1 09/04/13. 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

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?

Page 18: Chapter 1 09/04/13. 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

18

Quiz Next Wednesday

Linux and Vim

Chapter 1