0% found this document useful (0 votes)
330 views45 pages

Introduction To Computing

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
330 views45 pages

Introduction To Computing

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
  • Course Introduction
  • Computation
  • Course Outline
  • Timings and Evaluation
  • Instructions and Resources
  • Code of Conduct
  • Historical Context
  • Computer Systems

Slide Credits: General Introduction to computing

[Link]/CoursEMBnet/Pages05/slides/[Link]

Slides Credits: Bireswar Das, Shivakumar Jolad


Jolad,, Anirban Dasgupta
Dasgupta,,
Shanmuganathan Raman, Souradyuti Paul, Dinesh Garg
Garg,, Neeldhara Misra
Misra,, KPM

ES102 Introduction to
Computing
Krishna Prasad Miyapuram
& Supratim Shit
Fall 2018
Which Course?
What is Computation?
 A technology for information processing.
 Any goal-
goal-oriented activity requiring, benefitting
from, or creating computers.
What will I learn?

 Focus is on understanding
the problem solving aspect
on programming
Course Outline
Week

1 basics of computers, operating system,


27-Aug-18 languages, compilers and interpreter
2
03-Sep-18 Expressions, conditionals
10-Sep-18 3 Iterations
17-Sep-18 4 Exercises
24-Sep-18 5 Strings, Lists
01-Oct-18
08-Oct-18

1
Functions, return values,
15-Oct-18 Recursion
22-Oct-18 2 Searching
29-Oct-18 3 Sorting-1
05-Nov-18 4 Sorting-2
12-Nov-18 5 Files
19-Nov-18 6 Tuples, Dictionaries
26-Nov-18 7 Revision
Timings
 Lectures
 Monday, Thursday 10 – 11 am (1/002)
 Lab
 Thursday 2 to 4 pm
 Two sections: even (7/108) & odd numbers (7/109)

 Office Hours (TAs)


 check course WEBSITE
 Academic Discussion Hours
Evaluation
Weightage
Daily Quiz 20%
Daily
MidSem 20% Lab Quiz
Quiz - 2 20%
30%
EndSem 30%
Midsem
20%
Lab Tests – 2 30%
Endsem
30%
Reference Material
Some Links
Think Python 2nd Edition by Allen B. Downey
[Link]
Problem Solving with Algorithms and Data Structures using Python
[Link]
How to Solve it by Computer" by Dromey.
Automate the Boring Stuff with Python
[Link]
Guttag, John. Introduction to Computation and Programming Using Python: With
Application to Understanding Data Second Edition. MIT Press, 2016
[Link]
introduction-to-computer-science-and-programming-in-python-fall-2016/[Link]
Computer Science With Python (Textbooks for Class 11 and 12 by CBSE)
Head First Programming
Head First Python
More online resources
[Link]
[Link]
yter/3.%20Python%[Link]
[Link]
[Link]
[Link]
Rules
 First, please check out the Honor Code at IIT
Gandhinagar ([Link]
([Link]
[Link]
honor [Link]).). In this class, we will define
academic integrity in terms of the following
aspects.
 1. We start by assuming that everyone who is in
class is here to learn the material. If you behaviour
is not consistent with this, then the instructors
have the right to not engage with you either.
Rules: collaboration
 2. The homework will tell you on which
problems it is ok to collaborate. Collaborating
with someone does not mean copying their
solution---
solution--- it means you brainstorm together
with this person and then you write down the
solution yourself.
 3. When you collaborate you have to write down
the names of all your collaborators. Attribution
is an important part of academic collaboration.
 4. We will take any cases of copying extremely
seriously.
Rules: attendance
 5. You have to be on time to lecture and lab sessions.
Coming late is disruptive and disrespectful.
 6. If you do not attend class, your chances of success
decrease dramatically. Also, the instructor can at his
discretion, put you on a self-
self-learning mode, in which
case, you cannot ask for any help with the course
materials and will only be judged based on the final
examination.
HELP !!!
 Academic Discussion Hours
 You learn programming by practice
 Ask Questions in class if you don’t understand anything
 Ask instructor to repeat the explanation
 Ask for an additional example if you want more clarity
 Ask TA s in lab for help to navigate
 Ask Google for error messages (not TA s)
 Programming is NOT magic, if you type in wrong, the
output will not match your expectations
 Office hours / doubt clarification sessions, JUST ASK
FOR HELP, so that we know.
Instructions for daily Quiz
 Write your Name and Roll Number
 Write your left and right neighbour’s names
(Write None if nobody)
 You cannot consult your notes or your friends
 No internet/ mobile /laptop usage during any
quiz / test
 Bring a sheet of Paper to your class for Quiz
 No proxies, No cheating. Any suspicion will be
silently reported to instructor, which will be
investigated seriously & Reported to SSAC
[Link]
Computers
Abacus Vs Calculators Difference Engine

Human Computers

Napier’s logs

Analytical Engine

Jacquard Loom
Inside a Computer

Von Neumann architecture

Stored
Programs
+ Data
Computer Architecture
 CPU central processing
unit/microprocessor: Fetches and
executes instructions.
 Arithmetic Logic Unit (ALU).
 Control Unit.
 Internal clock-
clock- Timing, synchronization
 Main memory: Holds instructions and
data.
 RAM: Random Access Memory. Volatile.
 ROM: Read Only Memory.
 Input/Output Devices: Keyboard,
Monitor, Hard disk, USB.
Memory
 Memory (both RAM and
ROM) can be view as a
sequence of cells.
 Each cell has a unique
address.
 Addresses are consecutive.
 Each variable, array gets
certain number of memory
cells to store the respective
values.
 BUS: Carrier of information
 A 32-
32-bit machine uses 32 bits to store the
address of a cell. Each cell is 1 byte. How many
different cells are possible?
 How many cells are required to store a floating
point variable?
Information coding
 Binary  How to count
 0 or 1
128 64 32 16 8 4 2 1
 Octal 1 0 1 1 0 1 0 1
 0- 7  128+32+16+4+1=
 Hexadecimal  181 (decimal
(decimal))
 265 (octal)
 0-9+A
9+A--F
 B5 (hexadecimal
(hexadecimal))
 Decimal
 0- 9  Signed vs unsigned
 0 to 255
 -127 to +127
Operations on bits
 Booleans:  Example tables
 0 = false = no
AND 0 1
 1 = true = yes 0 0 0

 Operators: 1 0 1

 AND OR 0 1

 OR 0 0 1
1 1 1
 XOR
XOR 0 1
 NOT
0 0 1
1 1 0
RAM/ROM
Memory mapping
Address Values  Size reminder
reminder::
0000
 Kilobyte Kb 210 ~103
0001
0002  Megabyte Mb 220 ~106
..  Gigabyte Gb 230 ~109
..  Terabyte Tb 240 ~1012
..
 Petabyte Pb 250 ~1015
 …

..
FFFF
HD/DVD

track

sector

head
QuickTime™ et un
décompresseur TIFF (non compressé)

Display
sont requis pour visionner cette image.

Screen pixel or dots



 Fonts
 Color coding: 32 bits
 1 pixel = 3 bytes of color (R
(RGB)+1  Bitmap
byte alpha channel (transparency)  Vectors
 1600x1200x4bytes=7,5 Mb!
 TrueType, OpenType,
PostScript
Keyboard/Mouse

 Each key (or combination of  The mouse movements


keys) of the keyboard sends a  1 to 4 bytes (vertical &
code to the computer. horizontal)
 The code is interpreted and  Buttons
converted to the corresponding  Clicked, pressed, rolled
ASCII or Unicode number.
buttons
ASCII & Unicode
 ASCII 7/8 bits
 Unicode 
 UTF-8/16/32 bits
UTF-
 ISO--8859 (Latin)
ISO

 od -c od -h
Software Layers
Files Data (.doc, .mp3)

Software Word, scripts, mail, web browser…

User Interface Quartz CLI, X-Windows Windows

Operating System MacOSX Linux Windows

ROM Firmware BIOS

Hardware CPU, RAM, HD, DVD


Operating System
 Operating System: A bunch of programs that
make it easy for us to use the computer.
 Windows, Linux (Ubuntu
(Ubuntu),
), Mac OS X.
File systems
 Method the OS uses to store information
 Storage unit, directories, subdirectories (Windows, VMS)
 Single arborescence (Linux, MacOSX, all Unix)
 What exactly is a file?
 a piece of information (text, graphic, data, music program,
script)
 it is identified by a name and an logical address (or path)
 other informations: date, size, type, creator, ownership,
physical address…
File system organisation

Disk 1 Disk 2 Disk 2


C: D: /

DOCS PROGS CONFIG DATA Directories /usr /home


Disk 1
WORD EXCEL EXPT1 EXPT2 Subdirectories local phil john

bin lib

emacs X11

Windows Unix
Path
 The path is the logical address used by the
system or the user to locate a file.
 Example::
Example
/bd_du_Palais
bd_du_Palais/35/
/35/etage
etage/4/appart/12/
/4/appart/12/Dupont_
Dupont_ [Link]

suffix
filename
path
File types
 Executable  Special cases in Unix
 .exe  STDIN
 .app  STDOUT
 Unix requires « x »  STDERR

 Data
 Text (.txt)
 Music (.mp3)
 Image (.jpg, .gif)
 Movie (.mpg, .mov)
 Binary (.bin)
Encryption / compression
 Compression
 Reducing the size of files
 E.g., .mp3, .gz, .jpg, .zip

 Encryption
 Protecting your privacy
 E.g., .pgp

 Packing
 Grouping the files
 E.g., .tar
Programming Language
 Programming Language A language to
communicate with the computer. Instructions
are building blocks of a programming language.
 Program A set of instruction to perform a job.
 Let x = 1000 and y = 729
 Let z = x + y

 Output z
Programming Languages
 Low level (processor dependent)
 Machine code, assembler
 High level: structured, procedural
 Fortran, C, Pascal
 High level: object oriented
 C++, Java, C#, Perl, Objective-
Objective-C
 Scripting
 Perl, Python , JavaScript
Applications of Computers (aka
programming)
 Data Compression.  Engineering (Mechanical,
 Cryptography. Signal processing, Fluid
 Physics simulations (Particle Dynamics ,
Physics, Condensed Matter  Structures, Process
and Engineering ....)
 Statistical Physics).  Finance and Economics.
 Computational Biology  Learning and Pattern
(Mathematical Biology, System recognition.
Biology,  Weather Forecasting.
 Bioinformatics).  Cognitive Science.
Human - Computer
Communication
 A language that computers can understand.
 Programming language.

 The language should be very precise and without


ambiguity.
 Amit is happy that he visited Lothal
Lothal..
 I want good marks.

 He kicked the bucket.

 Sar par aasman gir gaya


gaya!!
 What is a program?
 The algorithm
 Are you a
programmer?
Monopoly
Flowcharts
Turtle Graphics
Tips
 Think about your  Test the code
problem  For all the possible
 Create a flowchart functions or cases (if
possible)
 Create the pseudocode  Give it to users as a beta
 Verify the memory used (if not possibe)
by your variables  Sell it (if you work for
 Write the code Microsoft©… ;- ;-)
 Debug

ES102 Introduction to 
ES102 Introduction to 
Computing
Computing 
Krishna Prasad 
Krishna Prasad Miyapuram
Miyapuram 
& 
& S
Which Course?
Which Course?
What is Computation?
What is Computation? 
A technology for information processing.
A technology for information processing.
What will I learn?
What will I learn? 
Focus is on understanding 
Focus is on understanding 
the 
the problem solving 
probl
Course Outline
Course Outline 
Week 
27-Aug-18 
1 
basics of computers, operating system, 
languages, compilers and interpret
Timings
Timings 
Lectures
Lectures 
Monday, Thursday 10 
Monday, Thursday 10 – 11 am (1/002)
11 am (1/002) 
Lab
Lab 
Thur
Evaluation
Evaluation 
Daily Quiz 
20% 
MidSem 
20% 
EndSem 
30% 
Lab Tests – 2 
30% 
Daily 
Quiz 
20% 
Midsem 
20% 
Endsem
Reference Material
Reference Material
Some Links
Some Links 
Think Python 2nd Edition by Allen B. Downey 
http://greenteapress.com/wp/think-python-2e/ 
Problem Sol
More online resources
More online resources 
http://interactivepython.org/runestone/default/user/login?_next=/runestone/defau

You might also like