120 likes | 126 Vues
CS1005. Become familiar with the software life cycle. Be able to design algorithms to solve problems, using the top-down design method. Demonstrate the ability to implement algorithms in C++. Be able to write appropriate program documentation, and to adhere to a documentation standard.
E N D
CS1005 • Become familiar with the software life cycle. • Be able to design algorithms to solve problems, using the top-down design method. • Demonstrate the ability to implement algorithms in C++. • Be able to write appropriate program documentation, and to adhere to a documentation standard. • Gain experience with Unix
Homework • Get the textbook • Know how to log on/off WPI system • Learn how to use an editor • Read chapters 0 and 1 • Look at website for this course • Put all due dates in your planner
Main memory • Volatile (lost when computer turned off) • Limited in size (costly) • Provides fast transfer (CPU – memory, memory – CPU) • Only data in main memory can be processed by the CPU
Secondary memory • Data permanent until you change it • Unlimited size • Portable • Slow transfer rate compared to main memory
Central Processing Unit • Brings info (data and instructions) from secondary memory to main memory • Processes (transforms) data • Stores results in secondary or main memory
Instruction Set • Arithmetic operations • Comparisons • Transfer of control (jumps) • Transfer of info from one place to another • I/O operations
Register R1 Register R2 Add the contents of R1 to R2 and Leave the result in R1 Each instruction is 2 bytes in length. The first byte is the opcode, the second byte contains data which varies according to the opcode Opcode = 10111011 Data = 0001 0010
Assembly Language • Is different for each type of computer • Requires that the programmer think like a computer • Is tedious and detailed • Very cryptic
A = B + C R1 66 00000011 C contains 3 65 00000010 B contains 2 64 00000000 A contains 0 R2 7 01000000 Program Counter (PC) 6 10111101 STORE (A), R1 5 00010010 4 10111011 ADD R1, R2 3 01000010 2 10110110 LOAD R2, (C) 1 01000001 0 10110101 LOAD R1, (B) Instruction Register (IR)