Excuses Don't get results
--Your friends at LectureNotes

Note for Programming in C - C By C.N. Janardhan

  • Programming in C - C
  • Note
  • 109 Offline Downloads
  • Uploaded 9 months ago
0 User(s)
Order Printed Copy

Share it with your friends

Leave your Comments

Text from page-1

C PROGRAMMING FOR PROBLEM SOLVING 18CPS13 MODULE-I INTRODUCTION TO COMPUTER HARDWARE AND SOFTWARE 1. Introduction to Computers  “A computer is an electronic device that accepts the data, stores the data in its memory, processes the data and gives the desired information to the user in the understandable format”.  The term computer is derived from a Latin word “computare” which means to calculate.  The first mechanical computer was designed by CHARLES BABBAGE and it was called as Analytical Engine which used read-only memory in the form of punch cards.  CHARLES BABBAGE is called as the “Grandfather” of the computer.  The various activities are performed based on the instructions that are stored in the memory of the computer at tremendous speed with very high accuracy.  For example, calculators, PCs, laptops, PDA (Personal Digital Assistant) etc., are all computers.  Computers are being used everywhere- in homes, offices, automobiles, schools and colleges, shops and so on.  Four functions about computers are: o Input: input is the raw information entered into a computer from the input devices. o Process: process is the operation of data as per given instruction. o Output: output is the processed data given by the computer after data processing. Accepts Data Input Processes Data Processing Produces output Output Stores Results Storage 1.1 Generation of Computer Generation in computer terminology is a change in technology of a computer being used. There are totally five computer generations known till date.  First generation computers (1942-1954) • Used vacuum tubes. • Magnetic drums were the mode of memory. • Batch processing operating system was used. • Punch cards, paper tape, magnetic tapes as input and output devices. • Consumes enormous amount of power and generated lot of heat. • Programmed using low level language or binaries. • Huge size and very costly. • Used scientifically but never used commercially. Prof. Janardhan C N, Dept. of CS&E-JIT DVG 1

Text from page-2

C PROGRAMMING FOR PROBLEM SOLVING 18CPS13  Second generation computers (1952-1964) • Used transistors. • Compared to vacuum tubes transistors used less power they were small and generated less heat. • Magnetic drums were replaced by magnetic cores. • Batch processing and Multiprogramming operating system were used. • Programmed using middle/symbolic/assembly level language. • Assembly and high level programming language like FORTRAN, COBOL were used. • Used stored program concept in which both data and program could reside in the memory. • Less power, more compact size.  Third generation computers(1964-1972) • Used integrated circuits. (Texas instruments integrated transistor, resistor, capacitor and a diode on a single chip). • Small in size, efficient and cost effective. • Were commercially used in medium sized organizations. • Used keyboard and monitor to interact with the user. • Memory capacity increased by magnetic hard disk which were used as secondary storage. • First use of operating system to control resources of computer. • Time sharing and multiuser concepts were introduced. • Programmed using C, C++, JAVA.  Fourth generation computers (1972-1990) • Used microprocessors and it is the current commercial used generation of computer. • Uses LSI (Large Scale Integration) and VLSI (Very Large Scale Integration) Technology. • Laptops and smart phones belongs to this generation and they have the memory capacity in GBs. • Operating systems used are from MSDOS, WINDOWS, ANDROID etc. • Graphical User Interface (GUI) like mouse were introduced. • Technologies like internet, TCP, UDP, etc. were used for communications.  Fifth generation computers (1990-till date) • The fifth generation computers uses Artificial Intelligence (AI). • They are capable to provide human like behavior. • VLSI becomes ULSI (Ultra Large scale Integration) technology. • They have to be exponentially faster than the available machines and are called quantum computers. • GOOGLE‟s D-Wave 2X Quantum computer is 100 million times faster than today‟s computer. • The processors should be parallel processing. Prof. Janardhan C N, Dept. of CS&E-JIT DVG 2

Text from page-3

C PROGRAMMING FOR PROBLEM SOLVING 18CPS13 1.2 Types of Computer Computers are classified based on the following criteria: 1. According to purpose 2. According to technology 3. According to size and storage capacity 1. According to purpose: According to purpose, computers are classified into two types. a. General Purpose computer: Computers that follow instructions for general requirements such as sales analysis, financial accounting, and management information are called general purpose computers. All computers used in office for commercial and educational applications. b. Special Purpose Computer: Computers that are designed to perform special tasks like scientific applications and research, weather forecasting, space applications are called special purpose computers. 2. According to technology used: There are 3 types of computers based on technology a. Analog computer: These are special purpose computers that represents and store data in continuously varying physical quantities such as current, voltage or Frequency. These computers are used for measuring physical quantities like pressure, temperature and speed. b. Digital Computer: These are mainly used to represent and store data in discrete quantities and numbers (binary digits). c. Hybrid Computer: These computers incorporate both the technologies to store and process analog signals which have been converted into discrete numbers using analog to digital converter. They also covert digital numbers into analog signals using digital-to-analog converters. (Mainly used in artificial Intelligence) 3. According to size and storage capacity: Based on size and storage capacity computers are classified into four categories: a. Super computers • Huge in size and has multiple powerful and fast processors. • Supports parallel processing. • Speed of the processor is measured in FLOPS (Floating point operations per second). Prof. Janardhan C N, Dept. of CS&E-JIT DVG 3

Text from page-4

C PROGRAMMING FOR PROBLEM SOLVING 18CPS13 • The fastest super computer (Thiane-2) operates at a speed of 34 peta flops. Where 1 peta= 1000 tera=1000000 giga . • Used in weather forecasting, analysis of geological data, nuclear simulation and space exploration. • Uses huge amount of power and produces large amount of heat. • Highly expensive. Examples: CRAY3,CRAY-XMP-14, NEC-500, PARAM 9000 AND PARAM 10000. b. Mainframe computers • Supports multi user, time sharing and works with LINUX. • Processing speed in mainframe is measured in MIPS (Million Instruction per Second) • Mainframes are used for online transactions such as railway and airline reservations, banking applications and commercial applications of large industries. • The super computer is used to run one program as fast as possible. While mainframe is used serve large number of users. Examples: IBM 3090, IBM 4381, IBM 4300, IBM ES-9000. c. Minicomputers • Mini computers or midrange computers and inherit the features of mainframe. • They are small in size but are not affordable to use at home. • They can be used in small organization. • They are multi-user systems and the emergence of Local Area Network (LAN) technology led to the decline of mini computers. Examples: PDD-1, DEC Micro VAX and IBM AS/400. d. Microcomputers • They are also called as Personal computers (PC). • Single user machine with the single chip of processor. • Today‟s PCs have gigabytes of memory and tera bytes of disk storage. • The microcomputers can takes the form of laptop, desktop, notebook, netbook. • Can support high end processors like Intel core i5, Core i7. • Pcs today are supported by Windows 7, 8 , 10, MAC OS, and LINUX. • Supports internet browsing. • Workstation is a variant of microcomputer which has a better processor, high resolution terminal and high quality graphic capabilities. Prof. Janardhan C N, Dept. of CS&E-JIT DVG 4

Lecture Notes