You are on page 1of 60

Amity School of Engineering & Technology

Introduction to Computers &

Programming in C
(BTC\BTI\BTE\BTM\BTB-105)

by

Mr.Vivek Parashar

Assistant Professor (ASET)


( Email : vparashar@gwa.amity.edu)
1

Amity School of Engineering & Technology

About Myself
I am Vivek Parashar Assistant Professor (ASET) AmityUniversity,Gwalior.

Amity is ranked as number one Private University in India in survey of various Media houses.
Amity is having around 80000 Students. Amity is having more than 1500 Acre of campuses. Nearly 100% placement in all courses

B.Tech (2002) and M.Tech (2006) from NIT Raipur


Having more than 6 years of teaching experience I am also a corporate trainer of Wipro Technologies.
2

Amity School of Engineering & Technology

Unit 1:Introduction to Computer and Number

Course Content

System : 4 Hour
Unit 2: Programming in C and its basics : 6 Hour Unit 3: Fundamental Features in C ( loops , switch, break, storage type & Preprocessor) : 9 Hour Unit 4: Arrays and Functions with recursion: 7 Hour

Unit 5: Advanced features in (Pointers,string ,Structures & file handling): 7 Hour


3

Amity School of Engineering & Technology

Text & References


ANSI C by E Balagurusamy ,TMH Publication,4th Edition,2009 Yashwant Kanetkar, Let us C, BPB Publications, 2nd Edition, 2001. Herbert Schildt, C: The complete reference, Osbourne Mcgraw Hill, 4th Edition, 2002. V. Raja Raman, Computer Programming in C, Prentice Hall of India, 1995.
4

Amity School of Engineering & Technology

References
Kernighan & Ritchie, C Programming Language, The (Ansi C Version), PHI, 2nd Edition. J. B Dixit, Fundamentals of Computers and Programming in C, Laxmi Publication 2nd Edition. P.K. Sinha and Priti Sinha, Computer Fundamentals, BPB publication, 4th Edition,2003.
5

Amity School of Engineering & Technology

Grading Guidelines
S. No Evaluation Component
1. 2. 3. 3. 4. Home Assignment Quiz Class Test Attendance End-Semester Examination Total

Weight (%)
5 5 15 5 70 100
6

Amity School of Engineering & Technology

Course Objective
To acquire the basic knowledge of computer system and its parts(H/W & S/W) To familiarize with various important features of procedure oriented programming language i.e. C

Amity School of Engineering & Technology

Learning Outcome
By the end of this course, students will be able to: Identify & define various types of Computer systems and there parts. Describe the working principal of computer and the data used by computer system and various number systems. Understand the Procedural programming methodology its pros and concerns . Understand how to programme efficiently .
8

Amity School of Engineering & Technology

My Promise to you
I will treat you with respect I will be available for questions (after class, during office hours) I will arrive prepared to teach I will try to be engaging and helpful I will grade you fairly and objectively

Amity School of Engineering & Technology

University Expectations
Come to class on-time (especially during exams) Turn in work on-time Do all work independently (except group work) Follow Rules of Conduct and Academic Behavior Standards as detailed in the Student Regulations. Take responsibility for your own learning!

10

Amity School of Engineering & Technology

My Expectations
Treat each other with respect Work hard Ask if you have questions!

11

Amity School of Engineering & Technology

Unit 1
12

Amity School of Engineering & Technology

Discussion Questions
What defines a computer:
What is the simplest definition of a computer you can come up with?

What was the first computer?


If you dont know, make a guess

13

Amity School of Engineering & Technology

What Is A Computer?
A computer is an electronic device, operating under the control of instructions (software) stored in its own memory unit, that can accept data (input), manipulate data (process), and produce information (output) from the processing. Generally, the term is used to describe a collection of devices that function together as a system.
14

Amity School of Engineering & Technology

What was the first computer?


The first computers were people! "Computer" was originally a job title: it was used to describe those human beings (predominantly women) whose job was to perform the repetitive calculations required to compute such things as navigational tables, tide charts, and planetary positions for astronomical purpose.
15

Amity School of Engineering & Technology

History of Computers
Computer" was originally a job title: it was used to describe those human beings (predominantly women) whose job it was to perform the repetitive calculations required to compute such things as navigational tables, tide charts, and planetary positions for astronomical use.

16

Amity School of Engineering & Technology

A typical computer operation back when computers were people

17

Amity School of Engineering & Technology

Abacus
The abacus was an early aid for mathematical computations which was used in 300 B.C. by the Babylonians A modern abacus consists of rings that slide over rods

18

Amity School of Engineering & Technology

Old & New Abacus

19

Amity School of Engineering & Technology

Napier's Bones
In 1617 an eccentric (some say mad) Scotsman named John Napier invented logarithms, which are a technology that allows multiplication to be performed via addition. The logarithm values were carved on ivory sticks which are now called Napier's Bones.
20

Amity School of Engineering & Technology

An original set of Napier's Bones [photo courtesy IBM]

A more modern set of Napier's Bones

21

Amity School of Engineering & Technology

Slide Rule
The slide rule,(based on Napier fundamental) first built in England in 1632 and still in use in the 1960's by the NASA engineers of the Mercury, Gemini, and Apollo programs which landed men on the moon.

22

Amity School of Engineering & Technology

Gear Driven Calculator


Leonardo da Vinci (1452-1519) made drawings of gear-driven calculating machines but apparently never built any.

23

Amity School of Engineering & Technology

Schickard Calculating Clock


The German professor Wilhelm Schickard in 1623 designed first gear-driven calculating machine Known as Schickard calculating clock

24

Amity School of Engineering & Technology

Pascal's Pascaline
In 1642 Blaise Pascal, at age 19, invented the Pascaline as an aid for his father who was a tax collector. Pascal built 50 of this gear-driven one-function calculator

25

Amity School of Engineering & Technology

Pascal's Pascaline [photo 2002 IEEE]

26

Amity School of Engineering & Technology

A 6-digit model for those who couldn't afford the 8 digit model

27

Amity School of Engineering & Technology

Stepped Reckoner
After a few years after Pascal, the German Gottfried Wilhelm Leibniz (co-inventor with Newton of calculus) managed to build a four-function (addition, subtraction, multiplication, and division) calculator that he called the stepped reckoner

28

Amity School of Engineering & Technology

Punched Cards
In 1801 the Frenchman Joseph Marie Jacquard invented a power loom that could base its weave (and hence the design on the fabric) upon a pattern automatically read from punched wooden cards, held together in a long row by rope. Descendents of these punched cards have been in use ever since
29

Amity School of Engineering & Technology

Jacquard's Loom showing the threads and the punched cards

30

Amity School of Engineering & Technology

Difference Engine
By 1822 the English mathematician Charles Babbage was proposing a steam driven calculating machine the size of a room, which he called the Difference Engine
In 1833 he designed Analytic Engine could store numbers ,calculating mill used punched metal cards for instructions,powered by steam,accurate to six decimal places.
31

Amity School of Engineering & Technology

A small section of the type of mechanism employed in Babbage's Difference Engine [photo 2002 IEEE]

32

Amity School of Engineering & Technology

Mark I
The first computer Mark I built by Harvard and IBM in 1944. This was the first programmable digital computer made in U.S. It was not a purely electronic computer. As it was constructed out of switches, relays, rotating shafts, and clutches. The machine weighed 5 tons, incorporated 500 miles of wire, was 8 feet tall and 51 feet long, and had a 50 ft rotating shaft running its length, turned by a 5 horsepower electric motor.

33

Amity School of Engineering & Technology

The Harvard Mark I: an electro-mechanical computer

34

Amity School of Engineering & Technology

First Computer Bug


Grace Hopper a programmer found the first computer "bug": a dead moth that had gotten into the Mark I and whose wings were blocking the reading of the holes in the paper tape, she is credited for coining the word "debugging" to describe the work to eliminate program faults. Mark I and whose wings were blocking the reading of the holes in the paper tape
35

Amity School of Engineering & Technology

The First Computer Bug [photo 2002 IEEE]

36

Amity School of Engineering & Technology

Generations of Computer
History of computer is divided in to five generations Each generation is characterized by major technological development Fundamental changes in terms of o Size o Cost o Power o Efficiency o Reliability
37

Amity School of Engineering & Technology

First Generation(Vacuum Tube1941-1956)


First Generation Electronic Computers used Vacuum Tubes Vacuum tubes are glass tubes with circuits inside. Vacuum tubes have no air inside of them, which protects the circuitry.
38

Amity School of Engineering & Technology

ENIAC - 1946
Electronic numerical integrator & computing first fully electronic digital computer built in the U.S. Created at the University Of Pennsylvania by J. Presper Eckert (1919 - 1995) and John W. &Mauchly (1907 - 1980) ENIAC weighed 30 tons contained 18,000 vacuum tubes Cost a paltry $487,000
39

Amity School of Engineering & Technology

ENIAC-1946

40

Amity School of Engineering & Technology

First Commercial Computer


1947 - Eckert-Mauchly Computer Corporation UNIVAC I (Universal Automatic Computer) US Bureau of Census 1950 calculations Became part of Sperry-Rand Corporation Late 1950s - UNIVAC II
Faster More memory
41

Amity School of Engineering & Technology

IBM
Punched-card processing equipment 1953 - the 701
IBMs first stored program computer Scientific calculations

1955 - the 702


Business applications

Lead to 700/7000 series


42

Amity School of Engineering & Technology

Second Generation 1955-1964


Transistors were used in the circuits. The input operations were performed using punched cards and magnetic tapes and for output operations, punched cards and papers were used. For external storage magnetic tapes were used. The orientation was towards multiple users i.e. the machine was capable to process multiple tasks concurrently.
43

Amity School of Engineering & Technology

The high level languages like FORTRAN, COBOL, BASIC etc. were used as the languages by the computer. Example of Computers: IBM 1400 and 7000 series, General Electric 635 , PDP 1, NCR & RCA produced small transistor machines.

44

Amity School of Engineering & Technology

First Transistor
Uses Silicon In 1948 John Bardeen, Walter Brattain & William -Shockley discovered the "transfer resistor"; later labeled the transistor. won a Nobel prize

45

Amity School of Engineering & Technology

Third Generation

1965-1974

Integrated circuits replaced transistors. Inspite of their smaller size they were capable to perform better than transistors. For data input and output operations monitors and keyboards replaced the punched cards. For external storage magnetic disks were used. Sophisticated operating systems, which were capable of handling several jobs concurrently were used.
46

Amity School of Engineering & Technology

More advanced high level languages like PASCAL were used. Example of computers:1971 - 4004 First microprocessor All CPU components on a single chip 4 bit

Followed in 1972 by 8008


8 bit Both designed for specific applications

1974 - 8080
Intels first general purpose microprocessor
47

Amity School of Engineering & Technology

Integrated Circuits

Third Generation Computers used Integrated Circuits (chips). Integrated Circuits are transistors, resistors, and capacitors integrated together into a single chip 48

Amity School of Engineering & Technology

Fourth Generation 1975-1989


The circuits used VLSI and microprocessors of virtually microscopic size, which led to drastic cut on the size of computer. The input output devices were the same monitors, keyboard, printer etc. Micro computers have evolved. Magnetic disks were the primary devices used for external storage.
49

Amity School of Engineering & Technology

The use of special software for maintaining large data bases became popular. The application software for micro computer essentially became popular in this generation. Example of computers:1975, 801 minicomputer project (IBM) RISC Berkeley RISC I processor 1986, IBM commercial RISC workstation product, RT PC.
50

Amity School of Engineering & Technology

Fifth Generation 1990-present


The computers of this generation use optic fibre technology to handle Artificial Intelligence. These computers have capacity to think and reason which can be used to solve problems where human intelligence is required. Expert Systems are examples of systems implementing Artificial Intelligence (AI).
51

Amity School of Engineering & Technology

Looking in Future
Grid Computing Nano Technology Quantum Computing DNA Computing Cloud Computing

52

Amity School of Engineering & Technology

Computer History Timeline


Year
1936

Inventors/inventions
Conrad Zuse Z1 Computer

Description of events
First Programmable Computer

1944

H.Aiken & G.Hopper Harvard Mark 1 Computer 1946 J.P.Eckert & J.W.Mauchly ENIAC 1 1947/48 J.Barden,W.Brattain & W. Shokley The Transister

Harvard Architecture
18000 Vacuum tubes This invention greatly Effected the history of computer
53

Amity School of Engineering & Technology

Cont
Year
1951

Inventors/inventions
John Presper Eckert & John W. Mauchly UNIVAC Computer

Description of events
First commercial computer & able to pick presidential winners

1953
1954

International Business Machines IBM 701 EDPM Computer


John Backus & IBM FORTRAN Computer Programming Language The first successful high level programming language.

IBM enters into 'The History of Computers


The first successful high level programming language. The first bank industry computer - also MICR (magnetic ink character recognition) for reading checks

1955 in use 1959

54

Amity School of Engineering & Technology

Cont.
Year
1958 1962 1964

Inventors/inventions
Jack Kilby & Robert Noyce The Integrated Circuit Steve Russell & MIT Spacewar Computer Game Douglas Engelbart Computer Mouse & Windows ARPAnet Intel 1103 Computer Memory

Description of events
Otherwise known as 'The Chip' The first computer game invented. Nicknamed the mouse because the tail came out the end. The original Internet. The world's first available dynamic RAM chip.
55

1969 1970

Amity School of Engineering & Technology

Cont..
Year
1971

Inventors/inventions
Faggin, Hoff & Mazor Intel 4004 Computer Microprocessor

Description of events
The first microprocessor.

1971
1973 1974/75 1976/77

Alan Shugart &IBM The "Floppy" Disk


Robert Metcalfe & Xerox The Ethernet Computer Networking Scelbi & Mark-8 Altair & IBM 5100 Computers Apple I, II & TRS-80 & Commodore Pet Computers

Nicknamed the "Floppy" for its flexibility.


Networking. The first consumer computers. More first consumer computers.
56

Amity School of Engineering & Technology

Cont.
Year
1978

Inventors/inventions
Dan Bricklin & Bob Frankston VisiCalc Spreadsheet Software Seymour Rubenstein & Rob Barnaby WordStar Software IBM The IBM PC - Home Computer Microsoft MS-DOS Computer Operating System

Description of events
Any product that pays for itself in two weeks is a surefire winner. Word Processors.

1979

1981

From an "Acorn" grows a personal computer revolution From "Quick And Dirty" comes the operating system of the century.
57

1981

Amity School of Engineering & Technology

Cont..
Year
1983

Inventors/invent Description of ions events


Apple Lisa Computer The first home computer with a GUI, graphical user interface. The more affordable home computer with a GUI. Microsoft begins the friendly war with Apple. CONTINUED

1984

Apple Macintosh Computer Microsoft Windows TO BE

1985 SERIES

58

Amity School of Engineering & Technology

First Hard Disk


IBM 305 RAMAC First moving head hard disk drive 20 MB in size Rent is 3200 $ P/M Weight 5 Tones

59

Amity School of Engineering & Technology

THANK YOU

60

You might also like