CO 101 Introductory Computing CO 102 Computing Lab
CO 101 Introductory Computing CO 102 Computing Lab
Instructor : Siddhartha S. Satapathy, Dr. Utpal Sharma and Bidyut Kr. Patra, Dept. CSE.
01/18/11
Objectives
To give basic programming skills. To give conceptual understanding of computers and their working. At the end of the course the student is expected to write a moderately complex C program.
01/18/11
Text books
ANSI C - Programming Language --Kernighan and Richie Mastering C -- Venugopal and Prasad You may follow any other standard ANSI C book.
01/18/11
Lab. Part
Use only Linux Operating System. [ Do not use Microsoft windows ! ] Use ANSI C (Standard C). Use vi editor for creating your files. A brief about the 1st exercise will be given towards the end of this class.
01/18/11
Introduction: Computer
A device basically meant to do computations. A machine that can follow a sequence of instructions. Parts which physically does the execution are called Hardware. The sequence of steps (instructions) can be called as Software.
01/18/11
Interface between hardware & user. Translates from high level language to machine Language.
Compiler:
01/18/11
Computer (Conceptually)
01/18/11
An Example
Work to be done: Buy 1 kg Alu. Sequence of Steps:
1. 2. 3. 4. 5. 6.
Take Bag, Money. Go to Market. Search for good Alu. Buy 1kg Alu. Go home. Stop.
01/18/11
A Model ( Human)
01/18/11
Early Computers
Fixed-program computer: Can do specific task(s) which is wired (fixed) into the hardware. E.g.: A Calculator. Drawback: No flexibility Stored-program computer: By creating an instruction set architecture and detailing the computation as a series of instructions (the program), the machine becomes much more flexible.
10
01/18/11
Stored-Program Computers
Program is also seen as data. Program is also stored in memory as data. The ability to treat instructions as data is what makes assemblers, compilers and other automated programming tools possible. One can write programs which write programs
01/18/11
11
01/18/11
12
Harvard architecture Stores program in a separate memory and data in a separate memory. But, these are rarely used in general purpose computers.
01/18/11
13
Learn basic commands to work with the linux operating system. Learn vi editor. (This is a software tool which is used to create files).
01/18/11
14
This will find sum of two integers. Extend this to find their difference, product and division.
01/18/11 15
Linux commands
After you create the file whose name is first.c you need to compile this file to get executable file. At the command prompt do
$ cc first.c
$ ./a.out
01/18/11
Homework
01/18/11
17