Algorithmic Concepts: Understanding Hardware, Software, and Programming Principles
E N D
Presentation Transcript
Algorithmic ConceptsINFSY 307Class Notes School of Business Administration Penn State Harrisburg Spring 2003
INTRODUCTION • Course Syllabus • Found on Angel at cms.psu.edu • Instructor
Computer Systems • Hardware • physical machines • Software • collection of programs • Program • a set of instructions for a computer to follow
Hardware • Classes of computers • Microcomputers • Mainframes • Network - any number of computers connected to share resources
Hardware • Main Memory/RAM • numbered location (P.O. boxes) called address • where computer places instructions or data during operation • information is stored in binary (1’s and 0’s) • one digit with a value of 1 or 0 is called a binary digitor a bit • eight bits in memory is called a byte
Review • Information is represented as __’s and __’s? • Associated with the above is a memory location or ________? • Each memory location is further divided into ________? • Characters are represented in ________ format.
Hardware • Secondary Memory • used to keep permanent records • a.k.a. secondary storage, auxiliary memory, auxiliary storage, external memory, external storage • files • hard disks, diskettes, tape drives, CD-ROM
Hardware • Central Processing Unit (CPU) • coordinates computer operations • executes instructions in a program • add, subtract, multiply, divide accomplished by the Arithmetic and logic unit (ALU) • move items from one memory location to another
Software • Operating System • directs computer’s resources to different tasks • UNIX, Linux, MacOS, MVS, Solaris, Microsoft XP • Program • set of instructions for computer
High-Level Languages • Resemble human languages, i.e. easy for humans to read • C++, COBOL, FORTRAN, Lisp • contain complicated instructions • Low-level Languages • Assembler • one instruction causes one action • Machine Language - ones and zeros
Compilers • Program that translates high-level language into machine-language • Input program written by programmer = Source Program or Source Code • Output program translated by the compiler = Object Program or Object Code
Review • What program is in charge of the system environment? • What program integrates object code with system software resources? • What program is data to the compiler program?
Software Development Method • Specify the problem requirements. • Analyze the problem. • Design the algorithm to solve the problem. • Implement the algorithm. • Test and verify the completed program. • Maintain and update the program.
Algorithms • A sequence of precise instructions which leads to a solution • Most difficult part of solving a problem on a computer is discovering “the method of solution” • A computer program is simply an algorithm expressed in a language the computer understands.
Algorithm that determines how many apples are in an orchard. • Determine how many apple trees are in the orchard approximately. • Estimate the number of apples growing on each tree. • Multiply the number of apple trees times the number of apples on each tree. • Display the answer.
Program Design Understand the program requirements What are the inputs/outputs? Write and test your algorithm Write and test your program
Ethics for Computer Programmers • Privacy and misuse of data • Computer hacking • Plagiarism and software piracy • Misuse of a computer resource