0% found this document useful (0 votes)
8 views27 pages

C-Module 1 Non CSE

The document provides an introduction to computer hardware and software, detailing components such as the CPU, memory types, and input/output devices. It also introduces the C programming language and problem-solving methodologies, including algorithms and flowcharts. Practical sessions are included to enhance understanding through tracing exercises.

Uploaded by

garvagl1105
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views27 pages

C-Module 1 Non CSE

The document provides an introduction to computer hardware and software, detailing components such as the CPU, memory types, and input/output devices. It also introduces the C programming language and problem-solving methodologies, including algorithms and flowcharts. Practical sessions are included to enhance understanding through tracing exercises.

Uploaded by

garvagl1105
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

PROBLEM SOLVING WITH C

Module 1
Introduction

Shobha N
Asst. Prof, Dept. Of CSE

1
SYLLABUS

Module 1
Introduction to Computer Hardware and Software:
Computer types, CPU, Primary and Secondary
Memory, Input and Output Devices, Software types.

Introduction to C Language and Problem Solving


Methodology:
Introduction to C language, Algorithm and Flowchart,
structure of C program, C Tokens and Data types,
Formatted and Unformatted Input and Output
statements.

Practical session:
Tracing Exercises
2
WHAT IS COMPUTER ?
A Computer is an electronic machine that accepts
information, processes it according to specific
instructions, and provides the result.
The term computer is derived from the Latin term
'computer', this means to calculate or programmable
machine.

3
WHAT IS COMPUTER ?

Charles Babbage in 1822 invented the computer. The


First mechanical computer designed by Charles
Babbage was called Analytical Engine.

Computer is an advanced electronic device that takes


raw data as input from the user and processes these
data under the control of set of instructions (called
program) and gives the result (output) and saves output
for the future use It can process both numerical and
non-numerical (arithmetic and logical) calculations.

4
WHAT IS COMPUTER ?
The basic components of a modern digital computer are:
Input Device, Output Device,
Central Processor Unit (CPU), mass storage device and
memory.

5
BLOCK DIAGRAM OF COMPUTER

6
BLOCK DIAGRAM OF COMPUTER
1. Input: This is the process of entering data and
programs in to the computer system. It takes as inputs
raw data and performs some processing giving out
processed data.
2. Storage: the process of saving data and instructions
permanently is known as storage. Data has to be fed
into the system before the actual processing starts,
because the processing speed of central processing unit
(CPU) is so fast that data has to be provided to CPU
with the same speed. Therefore the data is first stored
in the storage unit for faster access and processing.
the storage unit performs following functions
1. All data and instructions are stored before and after
processing.
2. Intermediate results of processing are also stored.
7
BLOCK DIAGRAM OF COMPUTER
3. Processing: The task of performing operations like
arithmetic and logical operations is called
processing. The central processing unit(CPU) takes
data and instructions from the storage unit and
makes calculation based on the instructions and data
given, then sent back result to the storage unit.

8
BLOCK DIAGRAM OF COMPUTER
Functional Units
The computer system is divided into three units for its
operations, they are
1. Arithmetic Logic Unit: the actual processing of the data
and instruction are performed by ALU. The major
operations performed by the ALU are addition, subtraction,
multiplication, division, logic and comparison. Data is
transferred to ALU from storage unit when required, after
processing the output is returned back to storage unit for
further processing.
2. Control Unit(CU): CU is responsible for coordinating
various operations using time signal. The control unit
determines the sequence in which computer programs and
instructions are executed, like processing of programs
stored in the main memory, interpretation of the
instructions and issuing of signals for other units to execute
them.
9
BLOCK DIAGRAM OF COMPUTER
3. Central Processing Unit (CPU):
The ALU and the CU of a computer system are
jointly known as central processing unit. CPU is
called as brain of computer system. It is just like
brain that takes all major decisions, makes all sorts of
calculations.
The CPU performs the following operations:
 Tells the input when to read information into
memory unit.
 Tells the ALU when information from memory unit
should be used in calculation and
 Tells the output unit when to send information from
memory unit to certain output devices.

10
BLOCK DIAGRAM OF COMPUTER

4. Output: this is the process of producing results


from the data. The output is also stored inside the
computer before given to human readable form and
also for further processing.

11
PARTS OF COMPUTER SYSTEM

12
COMPUTER MEMORY
Memory
It is used to store data and instructions. Computer
memory is the storage space in computer where data is to
be processed and instructions required for processing are
stored.
the memory is divided into large number of small parts.
Each part is called cell. Each location or cell has unique
address, varies from 0 to memory size minus one.
Ex: computer has 64k words, memory unit has 64 * 1024
= 65536 memory locations, address of these locations
varies from 0 to 65535.
memory is primarily of three types
1. Cache Memory,
2. Primary Memory/ Main Memory, and
3. Secondary Memory.
13
CLASSIFICATION OF MEMORY

14
COMPUTER MEMORY
Memory
1. Cache Memory,
2. Primary Memory/ Main Memory, and
3. Secondary Memory.

15
COMPUTER MEMORY
Cache Memory
Cache memory is a very high speed
semiconductor memory, which can speed up
CPU. It act as a buffer between the CPU and
main memory. It is used to hold data and
programs which are most frequently used by
CPU. The data and programs are transferred
from disk to cache memory by operating system,
from where CPU can access them.
Advantage: faster than main memory, consumes less
access time compared to main memory.
Disadvantage: Cache memory has limited capacity, it
is very expensive.
16
COMPUTER MEMORY
Primary Memory (Main memory)
 primary memory holds only those data and
instructions on which computer is currently
working.
 It has limited capacity and data gets lost when
power is switched off.
 It is generally made up of semiconductor device.
These memories are not as fast as registers.
 The data and instructions required to be
processed reside in main memory.
 It is divided into two categories RAM and ROM.

17
COMPUTER MEMORY
Secondary Memory
 Secondary memory is also known as external
memory or non volatile.
 It is slower than main memory.
 These are used for storing data/information
permanently.
 Contents of secondary memories are first
transferred to main memory and then CPU can
access it.
 Ex: disk, CD-ROM, DVD

18
COMPUTER MEMORY
Random Access Memory (RAM)
 A RAM constitutes the internal memory of the
CPU for storing data, program and program
result.
 It is read/write memory.
 extremely fast, also expensive.
 RAM is volatile, i.e data stored in it is lost when
we switch off the computer.
 RAM is of two types Static RAM (SRAM),
Dynamic RAM (DRAM)

19
COMPUTER MEMORY
Static RAM (SRAM)
 The word static indicates that the memory retains its
contents as long as power remains applied.
 SRAM chips use a matrix of 6 transistors and no
capacitors.
 SRAM can be used as cache memory
 Very expensive and require high power.
Dynamic RAM (DRAM)
 DRAM must be refreshed(rewrites the data several
hundred times per second) frequently.
 DRAMs are made up of memory cells, these cells
are composed of one capacitor and one transistors
lesser in size.
 Slower than SRAM, less expensive.
20
COMPUTER MEMORY
Read Only Memory (ROM)
 The memory from which we can only read but
cannot write on it.
 Memory is non volatile
 ROM stores instructions that are required to start
computer when electricity is first turned on, this
is known as bootstrap.
 ROM chip is also used in washing machine and
micro oven.
 Various types of ROM

MROM, PROM, EPROM, EEPROM

21
COMPUTER MEMORY
PROM(Programmable Read Only Memory)
PROM is read only memory that can be modified only once by a
user. Inside the PROM chip there are small fuses which are burnt
during programming, it can be programmed only once and is not
erasable.
EPROM (Erasable and Programmable Read Only Memory)
The EPROM can be erased by exposing it to ultra violet light for
duration of 40 minutes.
EEPROM (Electrically Erasable and Programmable Read Only
Memory)
The EEPROM is programmed and erased electrically. It can be
erased and reprogrammed about ten thousand times. Both erasing
and programming take about 4 to 10 milli second.

22
INPUT DEVICES
Input Devices are used in a computer
Keyboard, Mouse, Joy Stick, Light pen, Track Ball, Scanner,
Graphic Tablet, Microphone, Magnetic Ink Card reader
(MICR), Optical Character reader(OCR), Bar Code Reader,
Optical Mark reader (OMR)

23
OUTPUT DEVICES

24
COMPUTER SOFTWARE
Software is a set of programs that are used
to carry out certain tasks. It is the set of
programs which makes the computer useful.
So both software and hardware are
necessary for doing any job using a
computer.
The software are written using the
various languages such as C, C++, COBOL,
assembly language etc.
The software is classified into two
groups
 System software
 Application software

25
COMPUTER SOFTWARE
 System software
System software helps in controlling ,
integrating and managing the individual
hardware components of a computer
system

 Application software
The set of programs which are developed
only for the specific need from the customer
are called application software.

26
COMPUTER SOFTWARE
System software Application software

Collection of programs that help the Collection of programs written for


user to Interact with hardware specific application such as payroll,
components efficiently banking etc

System software control and manage Application software uses the services
the hardware of the system software to interact with
hardware components
To write system software the To write application software the
programmer needs to understand programmer need not to worry about
the architecture and hardware details the architecture and hardware details

Development of system software is Development of application software


complex task is Relatively easier.

Ex: Compiler, Assembler, OS Ex: Payroll, ticket reservation

27

You might also like