Computer
Programming
CS F111
BITS Pilani
Dubai Campus
Basic information
Text book(s) [TB]
TB1. J.R. Hanly and E.B. Koffman, Problem Solving and Program Design in C.
Fifth Edition, Pearson Education 2007.
Reference book(s) [RB]
RB1. Yale Patt, Sanjay Patel. Introduction to Computing Systems: From bits &
gates to C & beyond, Second Edition, McGraw Hill.
RB2. Behrouz A Forouzan & Richard F Gilberg. Computer science: A structured
programming approach using C. Third Edition, Cengage Learning.
RB3. Brian W. Kernighan, Dennis Ritchie. The C Programming Language. Second
Edition, Prentice Hall.
Evaluation
Sl# Component OB/CB Duration Weight Time
1. Mide Sem CB 50 Minutes 15% 25.10.20 Su8
2. Continuous Lab evaluation OB* During Lab 5% Continuous
& demo (before mid sem) hours
3. Quiz 1 CB 30 Minutes 10% 03.11.20 T3
4. Test 2 OB* 50 Minutes 15% 26.11.20 Th8
Continuous Lab evaluation During Lab
5. OB* 5% Continuous
& demo (after mid sem) hours
6. End semester Lab exam OB* 90 Minutes 15% TBA
7. Comprehensive Exam CB 3 hours 35% 06.01.21 FN
Evaluation
Sl# Component OB/CB Duration Weight/ Marks Time
1. Mid Sem CB 90 Minutes 30% (60M) 04.11.22 FN
2. Continuous Lab evaluation OB* During Lab 5% (10M) Continuous
& demo (before mid sem) hours
3. Surprise Quizzes CB 15 Minutes 5+5=10% (20M) During
(Best 2 out of 3) Lectorials
Continuous Lab evaluation During Lab
4. OB* 5% (10M) Continuous
& demo (after mid sem) hours
5. End semester Lab exam OB* 90 Minutes 15% (30M) TBA
6. Comprehensive Exam CB 3 hours 35% (70M) 12.01.22 FN
* Only prescribed text book(s) and hand-written notes are permitted
What You Will Learn
• What computers consist of
• How computers work
• How Computers are programmed
• How they are organized internally
• How design affects programming and applications
BITS Pilani
Dubai Campus
Introduction
Why learn Programming?
• Computing Devices are all pervasive..
• For non-CS Disciplines (A1/A2/A[38A]/A4/A9)
• How was the design of Burj Khalifa carried out.
•Calculation involving the strength of the materials. Amount of deflection
• How are the wings of an Aircraft designed
• How is modern drug design carried out.
• How does a huge chemical plant work.
• How is stock market prediction done.
• Its humanly very difficult to carry out these tasks manually
• Write computer programs to perform the computations.
• Better Career Opportunities => Higher salary ??
BITS Pilani, Dubai Campus
Why learn Programming?
BITS Pilani, Dubai Campus
Why learn Programming?
BITS Pilani, Dubai Campus
Why learn Programming?
Computer becomes an experimental laboratory, like a
windtunnel, and can be outfitted with diagnostics and imaging
intuitive to windtunnel experimentalists.
BITS Pilani, Dubai Campus
Why learn Programming?
Figure 0.2 Illustrations of the overlapping fields within mixed disciplinary majors.
BITS Pilani, Dubai Campus
What is a computer?
BITS Pilani, Dubai Campus
What is a computer?
•A computer is a general purpose device that can
be programmed to carry out a finite set of arithmetic or logical
operations. Since a sequence of operations can be readily
changed, the computer can solve more than one kind of
problem.
• A device that can
• Takes input
• Process the same
• Store in the information if required
• Output
• What is difference between
calculator & computer
Anything
else?
Computer is just a machine, it does not understand our emotions
BITS Pilani, Dubai Campus
Components of a Computer
• Input / Output
• To accept input and show the result or messages as output
• Memory Unit
• To store information
• Processing Unit
• To process the information
• Control Unit
• To control the overall operation!!!
Anything Else???
BITS Pilani, Dubai Campus
A computer will have
BITS Pilani, Dubai Campus
Program execution
Figure 1.12
Flow of Information During Program Execution
BITS Pilani, Dubai Campus
Block Diagram of a Computer
Computer program +
data
Memory
Input Output
CPU
ALU + CU
Executes the program
BITS Pilani, Dubai Campus
How to Program
BITS Pilani, Dubai Campus
How to Program
BITS Pilani, Dubai Campus
How to Program
BITS Pilani, Dubai Campus
How to Program
BITS Pilani, Dubai Campus
How to Program
BITS Pilani, Dubai Campus
How to Program
Ex: Check if a no is odd or even : Discuss in class
Check if a no is prime : let them think
BITS Pilani, Dubai Campus
How to Program
Ex: Check if a no is odd or even : Discuss in class
Check if a no is prime : let them think
BITS Pilani, Dubai Campus
How to Program
Ex: Check if a no is odd or even : Discuss in class
Check if a no is prime : let them think
BITS Pilani, Dubai Campus
How to Program
BITS Pilani, Dubai Campus
How to Program
Ex: Check if a no is odd or even : Discuss in class
Check if a no is prime : let them think
BITS Pilani, Dubai Campus
Ref, Ack & Credits
• Due Acknowledgements & Credit to faculty/web page from
where some of the material was borrowed.
BITS Pilani, Dubai Campus