Download presentation
Presentation is loading. Please wait.
Published byChrystal Walters Modified over 9 years ago
1
What is a Computer? An, electrical machine, that can be programmed to accept data (input), process it into useful information (output) and store it away for later use.
2
What is a Computer? An, electrical machine, that can be programmed to accept data (input), process it into useful information (output) and store it away for later use. Data Information Process
3
What is Computer Programming? Telling the computer what to do. Giving the computer instructions. Modeling the real world.
4
A person who writes (generates) a computer program. Computer Program A set of step-by-step instructions that tells a computer what to do and produces a desired result. Computer Programmer
5
Computer Consists of the following components: Hardware Software
6
Hardware Consists of the following components: Input devices Output devices Central Processing Unit (CPU) Main memory Secondary Storage Anything you can touch! (Physical Components) Gives the computer it’s five senses.
7
Hardware Definitions (1/2) Input Devices (Keyboard, Mouse) Where the user enters data and programs into the computer. Output Devices (Printer and Monitor) Where the information and programs will be shown to the user. Storage Devices (Floppy and Hard Disk). Where programs and data can be stored and retrieved. When the computer is turned off the information does not go away. Non-volatile.
8
Hardware Definitions (2/2) Memory Locations (places) where programmers can store and retrieve data and instructions temporarily. When you turn the computer off the information is lost. Volatile. CPU: Interprets and executes program instructions. Communicates with all other hardware components. Performs the arithmetic, logical and relational operations The “brain” of the computer.
9
Hardware: Information Flow Input DevicesOutput Devices Secondary Storage CPU Memory Processor
10
Key Concepts Memory Each memory cell has a unique address.Where am I? Each memory cell has some contents. What’s inside? - No cell is ever empty!!! Think of a parking lot, post office box, home, etc... CPU The CPU can only process data and instructions that are in MEMORY!!
11
Software Consists of the following components: Operating System System Development Software Application Software Things you can not touch! (Intangible)
12
Allows the application (program) to talk to the hardware. Manages the hardware for the entire computer system. Unix, Windows 95, MS-DOS, OS/2, MAC-OS, etc. Operating Systems
13
Allows the programmer to write and run (execute instructions) programs. Editor, compiler, interpreters, linkers, loaders, etc. System Development Software
14
Software designed for a specific use. Excel, Word, Access, Powerpoint, Paint, Lotus 1-2-3, Netscape, Outlook, etc. Any program you write for this class. Application Software
15
Hardware A Programmer’s Environment
16
Why do we need Programming Languages? Computers don’t speak the same language as humans. Humans speak natural languages(English, French, Chinese, Russian, etc.). Computers speak in a language called "machine language". Therefore some translation must be done.
17
Machine Language Machine language is the only language understood by a computer. Machine language is based on a number system called the Binary System. Binary System has just two digits - 0 (zero) and 1(one). Machine language programming is very tedious, time- consuming, error-prone and hard to fix. Machine language programs only work on the computer the program was written for.
18
High-level Language Java is considered a High-level language. High-level languages are designed to be less tedious, less time-consuming, less error-prone and easier to fix. High-level language programs can work on different computers. High-level language programs must be translated to machine language. Compilation or Interpretation
19
Text Editor Software used to enter, change and store your computer programs. Has your basic word-processing functions: Search, locate and replace. Copy, Move and Paste commands. Formatting commands. When complete the program is saved and is called the source file.
20
Compiling and Running The Java compiler, javac, takes your source file and translates its text into instructions that the Java Virtual Machine can understand. The instructions contained within this file are known as “bytecodes”. The Java launcher, java, uses the Java Virtual Machine which takes the “bytecodes” and translates them into machine language, and loads the machine language into memory and runs (executes) the program.
21
Programming Errors Syntax Error Violation of C++ grammar rules. Errors are detected by the compiler and displayed. Program will not be translated. Run-time Error Not detected by the compiler. Error occurs after the program begins running. Logic Error Bad instructions. Error can only be detected by the programmer.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.