cps-1 (2)

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 42

C PROGRAMMING

FOR PROBLEM SOLVING


(18CPS23)
C PROGRAMMING FOR PROBLEM SOLVING(18CPS13/23)
)
 CONT….
 CONT…..
Course Title : C Programming For Problem Solving
Course Code :18CPS13/23
Prerequisites: Mathematics, Physics

Course Learning Objectives:

This course will enable students to:


1. Familiarize with writing of algorithms, fundamentals of C and philosophy of
problem solving.
2. Implement different programming constructs and decomposition of problems
into functions.
3. Use and implement data structures like arrays and structures to obtain
solutions
4. Define and use of pointers with simple applications.
Course Title : C Programming For Problem Solving
Course Code :18CPS13/23
Prerequisites: Mathematics, Physics

Course Outcomes:

The students should be able to:


1. Apply fundamental concepts of C programming to solve given problem.
2. Design and Develop C programs using branching, looping and arrays,
strings.
3. Design and Develop C programs by using functions, structures and
pointers.
4. Design and Develop applications for real time problems.
MODULE 1:
INTRODUCTION TO COMPUTER
HARDWARE AND
SOFTWARE

Prof. Mahalakshmi C V, Assistant Professor, CSE, BIT


Email: mahalakshmicv@gmail.com
Website: https://sites.google.com/site/mahalakshmicvbitcse
CONTENTS
• Generations of Computers
• Computer types
• Bits, bytes and words
• CPU
• Primary and Secondary memory
• Ports and Connection
• Input devices and Output Devices
• Computers in a network
• Network Hardware , Software basics
• Software types
WHAT IS COMPUTER?
• The Term “Computer” is derived from the word
“Compute”.
• A Computer is an electronic device that can read the input
data from the user, processes these data and produces output
using set of instructions.
• The processing is fast, accurate and consistent, and is
generally achieved without significant human intervention.
HISTORY OF COMPUTER
COMPUTER GENERATIONS
Generation Based on Other Features

First. Vacuum tubes Magnetic drums for memory

Magnetic cores, disks, punched cards and


Second Transistors
printouts

Integrated circuits
Third. Keyboard, monitor and operating system
(ICs)

Fourth Microprocessors Networking

ULSI Nano
Fifth Mainly unclear
technology.
VACUUM TUBES
THE FIRST GENERATION (1946-1959)
 Vacuum tubes as circuitry and magnetic drums for memory, very big in
size they were taking entire room, produces more heat like bulbs.
 They also consumed enormous amounts of power and generated a lot of
heat. In spite of housing these computers in air-conditioned enclosures,
frequent breakdowns were common.
 Main Features:
 Vacuum tube technology
 Unreliable and Not portable
 Supported machine language only
 Consumed lot of electricity Hence Cost is high
 Huge size and Generate lot of heat
 Slow Input/Output device
TRANSISTORS
THE SECOND GENERATION (1959–1965)
 Transistors were faster, smaller and consumed less power smaller
magnetic cores also replaced the first- generation magnetic drums.
 Even though transistor generated less heat, second-generation
computers still needed air-conditioning.
 The computers also implemented the stored program concept which
allowed both program and data to reside in memory.
 Main Features:
 Transistor technology
 Support machine language, assembly language
 Reliable, Smaller in size, Generate less heat, consumed less
electricity, fast compared to First generation.
INTEGRATED CIRCUITS
THE THIRD GENERATION (1965 –
1971)
 Transistors were now being miniaturized and put on silicon chips (called
semiconductors).
 This generation adopted a keyboard and monitor to interact with
the user. Memory capacity increased substantially and the magnetic hard
disk was used for secondary storage.
 Third-generation computers also had an operating system, which is
a special program meant to control the resources of the computer.
 Main Features:
 IC used
 Support high level programming languages like FORTRAN, COBAL,
PASCAL, BASIC, ALGOL C, C++ and Java.
 More reliable, smaller size, generate less heat, consumed less
electricity, fast compared to Second generation.
 High cost
THE MICROPROCESSOR
THE FOURTH GENERATION (1971 –
1990)
 Using VLSI (Very Large Scale Integrated circuit) technology, it is
now possible to have the entire CPU, its associated memory and
input/output control circuitry on a single chip.
 Microprocessors have invaded our homes to drive desktops, laptops,
smartphones, microwave ovens and washing machines.
 Laptops and smartphones offer gigabytes (GB) of memory
 Operating systems have moved from MSDOS to a mouse based
Graphical User Interface (GUI) like Windows. More advanced
systems like Linux are now available for desktops and laptops, and
a variant of it (Android) powers most of our smartphones.
 Main Features:
 VLSI Technology
 Very cheap, Portable, reliable, small size
 Networking and Internet
ARTIFICIAL INTELLIGENCE
THE FIFTH GENERATION (1990 TO TILL
DATE)
 The fifth generation represents a vision of the computers of the
future.
 Fifth-generation systems should be capable of producing human-like
behaviour. These systems expected to interact with users in natural
language and learn from experience.
 Speech recognition and speech output should also be possible with
these systems.
 Main Features:
 ULSI (Ultra Large Scale Integrated circuit) technology
 Development of Artificial Intelligence
 Perform parallel processing
 User friendly interface with multimedia features
 Available at very powerful and compact computers at cheaper rate
COMPUTER TYPES

We can Classify Computer based on the following Criteria.


1. Based on the Size and Speed (Computers for Organization)
2. Based on the Purpose (Computers for Individuals)
3. Based on the Function and Operations (Computers for technology)
COMPUTERS FOR ORGANIZATION

Classification of computer
based on size and speed
1. Supercomputers
2. Mainframes
3. Minicomputers
4. Microcomputers
5. Smartphones and
Embedded Computers
SUPER COMPUTERS
 These are huge machines having the most powerful and fastest
processors.
 A supercomputer uses multiple CPUs for parallel data processing.
 Used for weather forecasting, analysis of geological data, nuclear
simulation and space exploration.
 They are also used to solve complex scientific problems.
 Supercomputers have enormous storage, with huge amounts of
power and generate a lot of heat.
 Because of their exorbitant cost, they are mainly used by
government agencies
MAINFRAMES COMPUTERS
 These are multi-user machines that can support hundreds or thousands
of users.
 Users interact with this system using a terminal and keyboard.
 Mainframes can concurrently run multiple programs even with a
single CPU.
 The processor speed in a mainframe is measured in mips (million
instructions per second).
 Mainframes are generally used to handle data and applications related to
the organization as whole.
 The mainframes are employed to handle online transactions (stock
exchange transactions, for instance).
 The capability to handle large amounts of data makes the mainframe
suitable for use in government, banks and financial institutions, and large
corporations.
MINI COMPUTERS
 Minicomputers or midrange computers as they can be considered
as downsized mainframes since they have the essential features
of mainframes.
 Minicomputers can serve hundreds of users and are small enough
to partially occupy a room. But they are not affordable enough to
be used in the home.
 The minicomputer, which Digital Equipment Corporation (DEC)
introduced in the 1970s.
 Minicomputers are used in smaller organizations by running
specialized software.
MICRO COMPUTERS OR PERSONAL
COMPUTERS
 This computer is a single-user machine powered by a single microprocessor;
Today's PCs are very powerful machines having gigabytes of memory and a
terabyte or two of disk storage.
 They are used both in the standalone mode (at home) and in a network (in
office).
 A microcomputer takes the form of a desktop, notebook (laptop) or a
netbook (smaller Laptop).
 PCs today are powered by three types of operating systems: Windows, Mac
OS and Linux.
 Businesses and individuals use the PC for word processing, spread sheet
handling and desktop publishing.
 PCs also support Internet browsing software like Firefox and Google Chrome.
 All PCs are multimedia ready, they can handle images, audio and video files.
 PC is also an entertainment device.
 A variant of the microcomputer is the workstation which essentially a
microcomputer with a more powerful processor, high resolution terminal and
high quality graphic capabilities (like CAD/CAM).
COMPUTERS FOR INDIVIDUALS

Classification of computer
based on purpose
1. Desktop
2. Laptop
3. Tablets
4. Handheld (PDA)
5. Smartphones and
Embedded Computers
COMPUTERS BASED ON FUNCTIONING

Classification of computer
based on its operation and
function
1. Analog Computer
2. Digital Computer
3. Hybrid Computer
BITS, BYTES AND WORDS
 Bit (Abbreviated as Binary Digit) is defined as a smallest unit of
data on a binary computer or digital system. It can hold either 0 or
1.
 Bytes is defined as a group of 8 bits is called byte. Bits in a byte are
represented from 0 to 7.
 Bit 0 is the low order bit or least significant bit.
 Bit 7 is the high order bit or most significant bit.
 Word is a group of 16 bits, bits in a word are numbered starting
from 1 to 15.
BITS, BYTES AND WORDS
Unit Equivalent to Remarks

1 kilobyte (KB) 1024 bytes Space used by 10 lines of text.

I megabyte (MB) 1024 kilobytes Memory of the earliest PCs

1 gigabyte (GB) 1024 megabytes Storage capacity of a CD-ROM

I terabyte (TB) 1024 gigabytes Capacity of today's hard disks.

1 petabyte (PB) 1024 terabytes Space used for rendering of film Avatar
THE CENTRAL PROCESSING UNIT
(CPU)

 CPU is considered as the brain of the computer.


 CPU performs all types of data processing operations.
 It stores data, intermediate results, and instructions (program).
 It controls the operation of all parts of the computer.
 CPU itself has following three components.
 Memory or Storage Unit
 Control Unit
 ALU(Arithmetic Logic Unit)
FUNCTIONAL COMPONENTS OF
COMPUTER
PRIMARY MEMORY
The primary memory which includes the following types:
 Random Access Memory (RAM-SRAM and DRAM)
 Read Only Memory (ROM, PROM, EPROM,
EEPROM)
 Cache Memory (L1,L2 and L3)
 CPU Registers
SECONDARY MEMORY
The last couple of decades have seen the emergence of multiple
types of storage devices.
 Hard disk including the portable disk (500 GB to 4 TB).
 Magnetic tape (20 TB).
 CD-ROM (700 MB-less than 1 GB).
 DVD-ROM (4.7 GB and 8.5 GB).
 Blu-ray disk (27 GB and 50 GB).
 Flash memory (1 GB to 128 GB).
 The obsoleted floppy disk (1.2 MB and 1.44 MB).
INPUT DEVICES
1. The Keyboard
2. Pointing Devices
3. The Scanner
OUTPUT DEVICES
1. The Monitor
2. Impact Printers
▫ Dot-matrix Printer
▫ Daisy-wheel Printer
▫ Line Printer
3. Non-Impact Printers
Laser Printer
Ink-jet Printer
4. Plotters
COMPUTERS IN A NETWORK
• Interconnection of computer is called a computer network.
• Different ways of connecting computers in network is called
as network topology.
PORTS AND CONNECTORS
1. Universal Serial Bits (USB)
2. Serial port
3. Parallel port
4. Video Graphics Array (VGA) port
5. digital video interface (DVI)
6. RJ45(Registered Jack) port
7. PS(Personal System)/2 port
8. High Definition Multimedia Interface (HDMI)
NETWORK TYPES

• Local Area Network (LAN)


• Wide Area Network (WAN)
• Metropolitan Area Network (MAN)
NETWORK HARDWARE
• Network Interface Card
• Hub and Switch
• Bridge and Router
WHY COMPUTERS NEED SOFTWARE
Software is a collection of code that drives a computer to
perform a related group of tasks.
SOFTWARE TYPES
• System software
▫ Basic Input Output System (BIOS)
▫ Operating system
▫ Device driver
▫ Compilers and associated programs
• Application software
▫ Office software
▫ Database software
▫ Communications software
▫ Entertainment software

You might also like