18-12-2012, 12:11 PM
Introduction to Computers and Programming
1Introduction to Computers.ppt (Size: 1.05 MB / Downloads: 22)
Why Program?
Computer – programmable machine designed to follow instructions
Program – instructions in computer memory to make it do something
Programmer – person who writes instructions (programs) to make computer perform a task
SO, without programmers, no programs; without programs, a computer cannot do anything
Central Processing Unit (CPU)
Comprised of:
Control Unit
Retrieves and decodes program instructions
Coordinates activities of all other parts of computer
Arithmetic & Logic Unit
Hardware optimized for high-speed numeric calculation
Hardware designed for true/false, yes/no decisions
Main Memory
It is volatile. Main memory is erased when program terminates or computer is turned off
Also called Random Access Memory (RAM)
Organized as follows:
bit: smallest piece of memory. Has values 0 (off, false) or 1 (on, true)
byte: 8 consecutive bits. Bytes have addresses.
Secondary Storage
Non-volatile: data retained when program is not running or computer is turned off
Comes in a variety of media:
magnetic: floppy disk, hard drive
optical: CD-ROM, DVD
Flash drives, connected to the USB port
Input Devices
Devices that send information to the computer from outside
Many devices can provide input:
Keyboard, mouse, scanner, digital camera, microphone
Disk drives, CD drives, and DVD drives
Output Devices
Output is information sent from a computer program to the outside world.
The output is sent to an output device
Many devices can be used for output:
Computer monitor and printer
Disk drives
Writable CD and DVD drives
Software – Programs That Run on a Computer
Categories of software:
Operating system: programs that manage the computer hardware and the programs that run on them. Examples: Windows, UNIX, Linux
Application software: programs that provide services to the user. Examples : word processing, games, programs to solve specific problems
Variables
A variable is a named storage location in the computer’s memory for holding a piece of data.
In Program 1-1 we used three variables:
The hours variable was used to hold the hours worked
The rate variable was used to hold the pay rate
The pay variable was used to hold the gross pay