Introduction To Computing
Introduction To Computing
www.ch.embnet.org/CoursEMBnet/Pages05/slides/IntroCompute.ppt
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
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)
Human Computers
Napier’s logs
Analytical Engine
Jacquard Loom
Inside a Computer
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.
od -c od -h
Software Layers
Files Data (.doc, .mp3)
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_ Jean.txt
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.