Professional Documents
Culture Documents
New Unit-1
New Unit-1
IN C
B.SC(MATHS)-
CA102
Prepared by : Ms.Pooja Gupta 1
INTRODUCTION TO COMPUTER
PROGRAMMING
Computer
A computer is an electronic device operating under the control of
instructions stored in its
memory. It has the following characteristics:
A computer has input and output circuitry
A computer has a central processing unit for carrying out arithmetical and
logical operations
A computer has memory for the storage of programs and data
A computer can execute sequences of instructions.
Arithmetic/Logical Unit (ALU) is the component of the CPU that performs arithmetic and
logical operations.
Memory Unit is used for internal data storage in a computer. The memory is comprised of a
large number of individual cells, each with a unique number, known as its address, associated with
it.
Each memory cell is made up of a set number of binary digits (bits). A Bit can store one of two
values, denoted by a 1 or 0.The Memory Unit stores several different types of data:
Peripheral Devices are the equipment attached to a computer and include the
following:
Input Devices - Instruments for entering data into a computer.
Keyboard
Mouse
Microphone
Scanners
CD-ROM Drive
Web-Cam etc.
Joystick
Touch screen
Output Devices - Components for displaying or presenting data to users.
Monitor
Printer
Speaker
CD-ROM Burner etc. Prepared by : Ms.Pooja Gupta 5
Storage Devices - Components for long-term storage of data.
Floppy Disk
Hard Disk
Rewritable Optical Disk
Flash drive
Memory Card etc.
is thus a sequence of computational steps that transform the input into the
output.
2. Plug the kettle into the power point and switch it on.
Step 1 − START
Step 2 − declare three integers a, b & c
Step 3 − define values of a & b
Step 4 − add values of a & b
Step 5 − store output of Step 4 to c
Step 6 − print c
Step 7 − STOP
Step 3 − c ← a + b
Step 4 − display c
Step 5 − STOP
Each function is design to do a specific task with its own data and logic. Information can be
passed from one function to another function through parameters. A function can have local
data that cannot be accessed outside the function’s scope. The result of this process is that all
the other different functions are synthesized in an another function. This function is known as
main function. Many of the high level languages supported structure programming.