CMPS 101 Computer Literacy. Dr. Cong-Cong Xing Dept of Math and Computer Science. Part I Introduction to Computers and MS Windows. Introduction to Computer Software and Hardware. What is a computer?. This is it! Or…?. What is a computer?. An electronic device that can manipulate data.
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation
Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement.Téléchargez la présentation en cliquant sur ce lien.Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.
What is a computer? • An electronic device that can manipulate data. • (ok) • A programmable electronic device that can store, retrieve, and process data. • (good) • An electronic device which, under programmers’ direction and control, performs input/output, processing, and storage. • (better)
What is a (computer) program? • A list of instructions telling computers what to do. (ok) • An implementation of an algorithm (what?)in a programming language. (good) • Examples? • MS Word • MS Excel • Firefox • <your own>
What is an algorithm? • A precise, step-by-step procedure designed to solve certain kind of problems. • examples • Sort the following sets of numbers {2, 3, 1, 45, 23, 67, 23, 21, 6} {2, 3, 56, 444, 33, 666, 777,66,5, 390, 34, 34, 56, 66, 55, 78, 34, 232, 342, 446, ……}
Hardware Components of a Computer CPU Output devices Input devices Storage devices John von Neumann architecture (important diagram)
Cont’d • Storage Devices • RAM (Random Access Memory) • This is the primary type, main type, 1st type memory • Hard disk, floppy disk • optical disk (CDs, DVDs) • jump drive, flash memory • (Note: in most cases in the literature, the word “memory” means RAM) They are the 2nd type memory
KB, MB, GB, Hz,…. • 1 bit = 1 or 0 • 1 byte = 8 bits • 1 K (kilo) = 1000 (roughly) • 1 M (mega) = 1000K (roughly) • 1 G (giga) = 1000M (roughly) • So, 2 GB = 2 x 1000 x 1000 x 1000 bytes 200 MB = 200 x 1000 x 1000 bytes • 1 Hz = number of operations per second
Can you understand the spec? Gateway M-7351u Laptop Computer - Intel Pentium Dual-Core T4200 2.0GHz, 4GB DDR2 RAM, 320GB HDD, DVDRW, 15.4" WXGA, Vista Home Premium 64-bit
Computer Science Areas (partial list) • Operating systems • Windows XP, Mac OS, Unix, Linux • Database management systems • Oracle • Algorithms • sorting • Software engineering • How to program “better” • Programming languages • Java, C++ • Theory • Math foundations • Architecture • Hardware • Artificial intelligence • Chess, robot
Programming Languages • public class Lab2 • { • public static void main(String args[]) • { • // declaration of variables • double a; // first number, input • double b; // second number, input • double c; // the sum of 1st and 2nd number, output • String astr; // string for a • String bstr; // string for b • // read in the 1st number • astr = JOptionPane.showInputDialog("Enter the 1st number"); • a = Double.parseDouble(astr); • // echo • System.out.println("You have entered "+a); • // read in the 2nd number • bstr = JOptionPane.showInputDialog("Enter the 2nd number");
Computing Theory • Domain theory • Category theory • Computability theory • Lambda calculus • Pi-calculus • Object-calculus • ……. • Turing Machine *(Alan Turing) (Computer Science Turing Award)
Review • What is a computer? • What is a computer program? • What is a programming language?? • Give an example of programming languages • What are the 4 components of a computer system? • What does “Pentium 4 3.0 Ghz” mean? • Are hard drive and memory the same thing? Why? • Give an example of computer science research areas • Give two examples of operating systems
Processing and Memory • Processing • Data representation • Sequence of 0’s and 1’s • ASCII (American Standard Code for Info Interchange) (e.g. A -> 65) • http://www.neurophys.wisc.edu/www/comp/docs/ascii.html • http://www.cplusplus.com/doc/papers/ascii.html
Cont’d • CPU • Control unit (CU): sets the order of tasks • ALU (arithmetic-logic unit): carry out computation CU & ALU write fetch RAM
Cont’d • Compatibility: • different CPUs have different instruction sets • Data bus: • Connects CPU and RAM and peripherals • Bus width measured by bits • Address bus: • Connects CPU and RAM • Width of address bus determines the max # of RAM locations. (why?) • CISC vs. RISC • CISC (complex instruction set computer), expensive, complex, high speed.
Cont’d • RISC (reduced instruction set computer), inexpensive, simple, satisfactory speed • Typical CPU chips • Pentium, • AMD • Power PC series • Alpha series • Memory • RAM (Random-access Memory): • the main memory of computers • Cache Memory: • faster, more expensive • ROM (Read-Only Memory): • Stores system info, not writable
Cont’d • Motherboard • The baseboard housing every hardware component (except I/O) for computation.
How Computers Store Data • Storage Media • All storage materials described here are non-volatile (RAM is volatile). • Magnetic tape • Hold large amount of data • Inexpensive • Slow access • Sequential access • Backup
Cont’d • Magnetic disk: random access, read/write head. • Floppy disk, 1.44 mb (obsolete) • Hard disk • Faster • Holds large amount of data • Pack of disks • Sealed and encased
Optical disc: holds huge amount of data • CD-ROM • CD-R (Recordable) • CD-RW (Rewritable) • DVD (Digital Video Disk) • DVD-ROM • DVD-R • DVD+R • DVD-RW • DVD+RW
Storing Data in Files • File: a collection of data stored as an individual entity. • Types of files: • Program file – executable, e.g., MS Word. In Windows, an executable file typically has .exe extension. • Data file – data used by programs, e.g., text files, graphics • Naming files name extension