Ues103 L1
Ues103 L1
2. Mob: 9322317570
MST 40*
EST 40*
▪ Office Hours :
▪ Monday – 3:30 PM → 5:10 PM
▪ Tuesday – Tuesday 2:40 PM → 5:10 PM
Lecture (1A27-- 31)
▪ Monday :-- 2:40 PM – 3:30 PM → LP102
▪ Wednesday :-- 4:20 PM – 5:10 PM → LP102
▪ Friday :-- 8:00 AM – 8:50 AM → LP102
▪ Office Hours :
▪ Monday – 3:30 PM → 5:10 PM
▪ Tuesday – 2:40 PM → 5:10 PM
Lecture
Keeping the class interesting
Humor breaks
○ Actually helps with attention span!
○ Not surprisingly, most of it will be computer humor!
Lecture etiquette
○ Please don’t use electronic devices during lectures
○ Plus no earbuds
Books
Text Books
1. C Programming Language, Brian W. Kernighan Dennis
M. Ritchie, 2nd ed, 2012.
2. Programming in ANSI C, Balagurusamy G., 8th ed.,
2019
Reference Books
1. Let Us C, Kanetkar Y., 16th ed., 2017
2. Programming with C, Byron S Gottfried, McGraw Hill
Education, Forth edition, 2018
Let Cook some codes
Programming ? why
Why Do we Write codes ?
Computer Memory
Memory is the electronic holding place for the
instructions and data a computer needs to reach
quickly.
Two types of memory - primary and secondary
Need for memory hierarchy – To minimize the memory
access time
Memory hierarchy
Register – Memory that is built directly into the CPU
Cache – Chip based memory closest to CPU
RAM – Random access memory (main memory for
computer calculations or temporary storage
ROM – Read only memory; permanent memory;
stores booting instructions for smooth computer
operations
Removable memory - pen drive or external hard
drive)
Memory
classification
The C Programming Language
Who? Dennis Ritchie
When? ~1972
Where? Bell Labs
Why? Develop the Unix OS
C: Details
Types of Errors
There are five different types of errors in C.
1.Syntax Error
2.Run Time Error
3.Logical Error
4.Semantic Error
5.Linker Error
Computer Software
The instructions that control what a computer does;
computer programs. For example:
Operating system (System software)
C compiler (application software)
MS office – (which type of software)
Python (Anaconda, Pycharm, Jupiter) - ?
WhatsApp - ?
MAC - ?
Why !!
Number Systems
Finite representation of unsigned integers
Finite representation of signed integers
Finite representation of rational numbers (if time)
The Decimal Number System
Name
“decem” (Latin) => ten
Characteristics •
Ten symbols • 0 1 2 3 4 5 6 7 8 9
Positional
2945 ≠ 2495
2945 = (2*103) + (9*102) + (4*101) + (5*100)
(Most) people use the decimal number system
The Binary Number System
Positional
1010B ≠ 1100B
1111 = -7
1000 = -0
0000 = +0
0111 = 7
Second type of notation – 2’s complement