You are on page 1of 15

Introduction to computers and programming

Content
Hardware Information storage
RAM, ROM HD, DVD

Network
Protocols Packets

Programming
Algorithm Pseudocode Flowchart

Display
Images Characters (fonts)

File system/type
Encryption Compression

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)

Encoding information on a fixed element of length n with a base b gives bn non-redundant possibilities

Information coding
Binary
0 or 1

How to count
128 64 32 16 8 4 2 1 1 0 1 1 0 1 0 1

Octal
0-7

Hexadecimal
0-9+A-F

128+32+16+4+1=
181 (decimal) 265 (octal) B5 (hexadecimal)

Decimal
0-9

Signed vs unsigned
0 to 255 -127 to +127

Operations on bits
Booleans:
0 = false = no 1 = true = yes

Example tables
AND 0 1 OR 0 1 XOR 0 1 0 0 0 0 0 1 0 0 1 1 0 1 1 1 1 1 1 0

Operators:
AND OR XOR NOT

RAM/ROM
Memory mapping Address Values 10111001 0000 00001111 0001 11100011 0002 .. .. ..

Size reminder:
Kilobyte Megabyte Gigabyte Terabyte Petabyte Kb Mb Gb Tb Pb 210 ~103 220 ~106 230 ~109 240 ~1012 250 ~1015

.. FFFF

00100100

HD/DVD
track
sector head

QuickTime et un dcompresseur TIFF (non compress) sont requis p our vision ner cette image.

Display
Fonts
Bitmap Vectors
TrueType, OpenType, PostScript

Screen pixel or dots Color coding: 32 bits 1 pixel = 3 bytes of color (RGB)+1 byte alpha channel (transparency) 1600x1200x4bytes=7,5 Mb!

Keyboard/Mouse
Each key (or combination The mouse movements of keys) of the keyboard 1 to 4 bytes (vertical & horizontal) sends a code to the computer. Buttons Clicked, pressed, rolled The code is interpreted and converted to the buttons corresponding ASCII or Unicode number.

Introduction to programming

What is a program?
How to cook? The algorithm Are you a programmer?

Flowcharts

You might also like