Introduction To Computer and Programming
Introduction To Computer and Programming
PROGRAMMING
1
3
What Is Computer?
• An electronic device, operating under the control of
instructions stored in its own memory
• Two major components
Computer
Hardware Software
4
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
Game consoles
Servers
Mainframes
Supercomputers
Embedded computers 6
Computer’s Component
Main Component (Hardware) of computer;
8
Computer’s Component (cont…)
• The architecture of a typical computer, usually consists of;
– System Unit (CPU)
• power of the computers. Consist of ALU and control unit.
– Main Memory (RAM & ROM)
• stores information to be processed or instructions on how to process
information.+ 2nd Storage (mass storage - tapes, optical discs, magnetic
disc, etc.)
– Peripherals devices
• 2 types;
1. Input Devices – keyboards, mouse, laser pointer, digital pen, etc.
2. Output Devices – monitors, LCD screen, printers, speakers, etc.
– Communication Devices
• Enables a computer to send and receive data, instructions, and information
Note:
Some references books show the basic components of typical computer system is CPU, Main
memory, secondary memory/storage devices, input devices and output devices.
9
Computer Architecture (Cont…)
• Basic Hardware Components
System unit
Communication
devices
10
Computer Architecture
• The Organization of CPU
CPU
Control
Unit
Result
(Output)
Communication
devices
Input Devices
11
Computer Architecture (cont…)
System Unit (CPU)
• Comprised of:
• Control Unit
• Retrieves and decodes program instructions
• Coordinates activities of all other parts of computer
In Figure 1-3, the number 149 is stored in the byte with the address 16, and the
number 72 is stored at address 23.
Computer Architecture (cont…)
Secondary storage
Software
System Application
Software Software
Computer Software (Cont..)
SYSTEM SOFTWARE APPLICATION SOFTWARE
20
Computer Software (Cont..)
Where are the application and system software?
Application Software
• users can directly understand and
use the software.
• communicate in human language
• eg. Micr. Office, notepad, prog.
lang. such C, C++, VB,Python etc.
Interpreter
• use to interpret high-level
language to low level lang.
and so on. System Software
• user will communicate with • operating system
system easily. • manage and control by
machine language
• eg. i-Mac, windows, Unix,
Linux,machine lang.
21
Programs & Programming
Languages
• A program is a set of instructions that the computer follows to
perform a task
1011010000000101
Preprocessor Linker
Compiler