Professional Documents
Culture Documents
BITS Pilani
Hyderabad Campus
Todays Agenda
Course Logistics
Course Motivation
Course Outline
Basics
CS F111
Course Logistics
Total
Marks =
300
Make-Up Policy :
Makeup for other components is granted on
prior permissions and valid document of illness.
CS F111
Course Logistics
Lab (Practicals)
Once in a week of 2 hours.
Focus on practical aspects of programming and complex problem solving
Online Judge : Mooshak
Course Notices:
Our Team
Mr. Sanjeev Singh : Instructor in Charge
Dr. Aruna Malapati : Instructor
Mr. Gokul Kannan : Instructor
Research Scholars : Mr. Pavan, Mr. Sanket , Ms. Rajita
Teaching Assistants : TBA
CS F111
Text Books
CS F111
Course Motivation
Programming is the core of everything to do with
computers.
Application areas :
CS F111
Ticket Reservation
CS F111
Buying Online
CS F111
Washing Machine
CS F111
Mars Mission
CS F111
Why Learn C?
C is very quick.
C is easy to Learn
CS F111
CS F111
Fundamentals
Decision making
Looping
Data-Types, variables
Standard Input / Output
Programming Constructs
Overview of C programming
Arrays
Pointers
Strings
Structures
Modular Programming
Bit-Level Manipulations
File Handling
Linked List and operation on it.
CS F111
What is a Computer ?
CS F111
Things that we
cannot touch
CS F111
Basic Definitions
Bit(Binary Digit) : 0s and 1s
Low Voltage : 0 (off)
High Voltage : 1 (on)
ADD
SUB
MUL
DIV
MOV etc
CS F111
Basic Definitions
Program
task
Application software
CS F111
Computer Software
System Software
Programs that manage the hardware resources
Operating System, Compilers, Linkers, Loaders, Debuggers, Disk
formatters, etc.
Application Software
Helps users solve their problems
VLC player, Office, web browsers, DBMS, Banking application,
Reservation systems etc.
CS F111
Anatomy of a Computer
System
User
Application
Software
System
Software
Hardware
CS F111
Computer Hardware
Input Device
Output Device
Memory
Primary Memory
Secondary Memory
Processing Elements
CS F111
Input Device
Input: Getting Data into the Computer
CS F111
Output Device
Output: Displaying Information
CS F111
Primary Memory
Random Access Memory RAM
CS F111
Flash Drive
Compact Disc
SD Memory Card
CS F111
Megabytes, Gigabytes,
Terabytes... What Are They ?
1 Bit = Binary Digit
8 Bits = 1 Byte
word 4 bytes = 32 bits (word size is processor specific)
CS F111
Processing Element
Processing : Working on the input data to
produce output
Central Processing
Unit
CS F111
CS F111
Programming Languages
1. Machine Language
2. Assembly Language
3. High-Level Language
CS F111
Machine Language
Expressed in binary.
Directly understood by the computer.
Not portable; varies from one machine type to
another.
Program written for one type of machine will not run on
another type of machine.
CS F111
Assembly Language
Mnemonic form of machine language.
Easier to use as compared to machine language.
- For example, use ADD instead of 10110100.
Assembler
CS F111
Machine
language
program
Contd.
Assembly language is also difficult to use in writing programs.
Requires many instructions to solve a problem.
A,X
A,Y
; A=X
; A=A+Y
ADD
DIV
MOV
A,Z
A,3
RES,A
; A=A+Z
; A=A/3
; RES = A
In C,
RES = (X + Y + Z) / 3
CS F111
High-Level Language
Requires a translator.
Using a software called compiler.
CS F111
CS F111
#include <stdio.h>
#include <stdio.h>
int main (void)
int main (void)
{
{
}
}
Compiler
Compiler
Linker
Linker
Library
Loader
Source
00110 110
11001
110
Object
00110 110
110
11001
11001 000
-- - - - - 110
01010
-- - - - -- - - -- - - -
Executabl
e
Results
CS F111
Preprocessor
#include <stdio.h>
CS F111
Summary
Course related information
Basics
Component of Computer
3 types of Languages
Compilation & First C Program
CS F111
THANK YOU
CS F111