Professional Documents
Culture Documents
Introduction To Computers and Programming
Introduction To Computers and Programming
programming
Content
Hardware
Information storage
RAM, ROM
HD, DVD
Display
Images
Characters (fonts)
File system/type
Encryption
Compression
Network
Protocols
Packets
Programming
Algorithm
Pseudocode
Flowchart
Languages
Source code
Example
The computer
Internally
The connections
Information storage
1 bit
8 bits
16 bits
32 bits
64 bits
bit (1 or 0)
byte (octet) (28)
word (216)
double (232)
long double
(264)
Encodinginformationonafixedelementoflengthnwitha
basebgivesbnnonredundantpossibilities
Information coding
Binary
0 or 1
Octal
0-7
Hexadecimal
0-9+A-F
Decimal
0-9
How to count
1286432168421
10110101
128+32+16+4+1=
181 (decimal)
265 (octal)
B5 (hexadecimal)
Signed vs unsigned
0 to 255
-127 to +127
Operations on bits
Booleans:
0 = false = no
1 = true = yes
Operators:
AND
OR
XOR
NOT
Example tables
AN
D
OR
XOR
RAM/ROM
Memory mapping
Address
Values
10111001
0000
0001
00001111
0002
11100011
..
..
..
..
FFFF
00100100
Size reminder:
Kilobyte
Megabyte
Gigabyte
Terabyte
Petabyte
Kb
Mb
Gb
Tb
Pb
210 ~103
220 ~106
230 ~109
240 ~1012
250 ~1015
HD/DVD
track
sector
head
QuickTime et un
dcompresseur TIFF (non compress)
sont requis pour visionner cette image.
Display
Fonts
Bitmap
Vectors
TrueType, OpenType,
PostScript
Keyboard/Mouse
Each key (or
combination of keys) of
the keyboard sends a
code to the computer.
The code is interpreted
and converted to the
corresponding ASCII or
Unicode number.
Buttons
Clicked, pressed, rolled
buttons
od -c od -h
Software layers
Files
Data(.doc,.mp3)
Software
Word,scripts,mail,webbrowser
UserInterface
Quartz
CLI,XWindows
OperatingSystem
MacOSX
ROM
Firmware
Hardware
Windows
Windows
Linux
BIOS
CPU,RAM,HD,DVD
File systems
Method the OS uses to store information
Storage unit, directories, subdirectories
(Windows, VMS)
Single arborescence (Linux, MacOSX, all Unix)
Disk 1
Disk 2
C:
DOCS
Disk 2
D:
PROGS
WORD
EXCEL
CONFIG
Directories
DATA
EXPT1
EXPT2
/usr
Disk 1
Subdirectories
bin
local
phil
lib
emacs
Windows
/home
Unix
X11
john
Path
The path is the logical address used
by the system or the user to locate a
file.
Example:
/bd_du_Palais/35/etage/4/appart/12/Dupont_ Jean.txt
path
filename
suffix
File types
Executable
.exe
.app
Unix requires x
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
Networks
Direct
USB 11Mb-480Mb
Ethernet 10Mb-1Gb
Wired
Modem 56Kb
ADSL 600Kb-8Mb
LAN 10Mb-10Gb
Wireless
Bluetooth 1Mb-20Mb
WIFI (AirPort) 11Mb-54Mb
Network (ethernet or
wireless)
Computer talk to
each other via
network protocols
ip, tcp, http, ftp,
Handshaking
Transmission
Ackowledgement
TCP/IP
DNS
transmission control
protocol/internet
protocol
URL
Universal Resource
Locator
IP addess
192.42.197.51
DNS reminder
3
Root DNS
*.org
5
Local DNS
Primary DNS
dns.anywhere.net
www.expasy.org
Client query
client.anywhere.net
www.expasy.org ??
Target server
129.194.8.64
Packets
The data travels
within units called
packets
Packet breakout
UsualTCP/IPpayloadperpacket:512bytes
Introduction to programming
What is a program?
How to cook?
The algorithm
Are you a programmer?
Pseudocode
This is the pseudocode for a game of Monopoly
Flowcharts
Flowcharts details
Languages
Low level (processor dependent)
Machine code, assembler
High level: structured, procedural
Fortran, C, Pascal
High level: object oriented
C++, Java, C#, Perl, Objective-C
Virtual machines
Java, C#
Scripting
Perl, Python, JavaScript
Interpreter
Basic, Perl
Intermediate
Java
Compiler+linker
Fast to execute, but
slow to debug
Interpreter
Slow to execute, but
fast to debug (no need
to recompile)
Intermediate
Slow
Source code
Instructions
Statement, blocks
Affectation
Operators
Loops
Tests
Subroutines
Comments
Data structures
Variable
List
Array
Hash
Pointers
Objects
Affectation
Change to a
variable
Operator
affect one or more
variable
+ * - / AND OR NOT
Variable
A region in memory
that can be modified
Exists in different
types
Scalar, char, numeric,
boolean
List, array
Hash
Combination->data
structure
Tests
Decide what to do
Subroutines
Programs frequently
called (functions)
Comments
The most important
lines of the source
code
Pointers
Reference to region
in memory
(address)
Objects
Combination of data
and code
Gilbert Adair
Result
a=97
b=15
c=26
d=35
f=23
g=32
h=44
i=90
j=1
k=5
l=33
m=17
n=91
o=104
p=15
q=1
r=43
s=59
t=77
u=52
v=4
w=31
x=2
y=13
z=2
Flowchart
Tips
Think about your
problem
Create a flowchart
Create the
pseudocode
Verify the memory
used by your
variables
Write the code
Debug
Tuesday
Intro Perl
Regexp & Perl In-liners
Wednesday
Object Oriented
programming
BioPerl
EMBOSS
Thursday
Database indexing
BLAST
HTML & cgi-bin
Friday
Finish exercises
Users questions
Unix
Next presentation
Vassilios
alias
UnixMan!!
!