Intro To Programming PDF
Intro To Programming PDF
INTRODUCTION TO
PROGRAMMING
Prepared for:
CSC 402 – Programming 1
Do you think
computers are
dumb or intelligent?
© Najwa Abd Ghafar – UiTM Johor
© Rose Hafsah Ab, Rauf - UiTM Shah Alam
Hardware:
Consists of all the physical devices
Get a glass
Add water
Add a lemon
Add sugar
Computer Program
Taste it
Programmer
© Najwa Abd Ghafar – UiTM Johor
© Rose Hafsah Ab, Rauf - UiTM Shah Alam
COMPUTER
COMPUTER SYSTEM
COMPUTER SYSTEM
Input:
Are data that is entered into the computer using an input device
Input Devices:
Are used to send or enter data into a computer
For example:
Keyboard
Mouse
© Najwa Abd Ghafar – UiTM Johor
© Rose Hafsah Ab, Rauf - UiTM Shah Alam
COMPUTER SYSTEM
Processing:
Are the task of performing operations inside the computer system and this
is carried out by the CPU
COMPUTER SYSTEM
Storage:
Is the process of saving data and instructions inside the computer system
There are 2 types of storage:
1. Main Memory / Primary Storage
2. Secondary Storage
Main Memory:
Also known as Random Access Memory (RAM)
Will hold data and program instructions for data processing
Will hold processed information before it is displayed as output
Is a temporary storage because its content will be lost once the computer is
turned off
© Najwa Abd Ghafar – UiTM Johor
© Rose Hafsah Ab, Rauf - UiTM Shah Alam
COMPUTER SYSTEM
Secondary Storage:
Is the device that stores information permanently
For example:
Hard disks
Floppy disks
CD-ROMs
Thumb Drive
© Najwa Abd Ghafar – UiTM Johor
© Rose Hafsah Ab, Rauf - UiTM Shah Alam
COMPUTER SYSTEM
Output:
Are any information or results produced by the computer system and are
displayed using output devices
Output Devices:
Are used to display data which has been processed or has been stored on
the computer
For example:
Monitor
Printer
© Najwa Abd Ghafar – UiTM Johor
© Rose Hafsah Ab, Rauf - UiTM Shah Alam
COMPUTER SYSTEM
Software:
Is a computer program, which will direct the computer to do the tasks
you want it to do and to produce the results you want
For example: To code wages = rates x hours in Machine Language will be:
For example:
For example: To code wages = rates x hours in Assembly Language will be:
For example: To code wages = rates x hours in High Level Language will be:
Interpreter Compiler
Translates program one statement at Scans the entire program and
a time. translates it as a whole into machine
code.
It takes less amount of time to It takes large amount of time to
analyze the source code but the analyze the source code but the
overall execution time is slower. overall execution time is
comparatively faster.
No intermediate object code is Generates intermediate object code
generated, hence are memory which further requires linking, hence
efficient. requires more memory.