Computers

Transcription

Computers
M150A
Data, computing and information
Summary from Unit 1 To Unit 8
By
Majed Nawaf AlHilaisi – ‫ماجد بن نواف الحليسي‬
1/11/2011
ArabOU - M150 - AbuNawaf
1
- M150A (part 1) The course has three blocks:
Block one:- Learning about data
Unit 1: Data and information
Unit 2: Representation
Unit 3: Crossing the boundary: analogue universe, digital worlds.
Unit 4: Integrating data
Unit 5 : Storing, getting and sending your data
Block two:- The Computer: processing data
Unit 6: The structure of hardware and software
Unit 7: An introduction to programming using JavaScript
Unit 8: Programs and data
1/11/2011
ArabOU – M150 - AbuNawaf
2
DATA COMPUTING AND
INFORMATION … What’s in a title?
• DATA
(such as a person’s name, or the number of a bus route)
• COMPUTING
computers and how they can be made to work with data (e.g. storing
it, changing it, and displaying it)
• INFORMATION
(which is generated by linking items of data to answer questions of
interest).
1/11/2011
ArabOU – M150 - AbuNawaf
3
Data, Information and Computers
• Data: A discrete (separate or distinct) item such as a number,
character, symbol…etc.
Must be interpreted, by
a human or machine,
to derive meaning
The word ‘data’ is the plural of the Latin word
‘datum’ but it is generally used as a singular
word in English.
• Information:
The item of knowledge created by linking
together two or more items of data. Information is interpreted data.
• Computers:
Used to manipulate, analyse and store data and
turn it into information.
A computer system is the combination of:
– the computer (with its processor and storage);
– other equipment (peripherals – input/output devices);
– the software programs that make it all work.
1/11/2011
ArabOU – M150 - AbuNawaf
4
Sensing data and turning it into something
usable (Making sensation make sense)
• Perceptual Data: What we perceive with our senses (the
most primitive form of data).
• human beings don’t just react instinctively; they respond reflectively,
using thought. In other words, we seek to name, to classify and finally to
understand and communicate what we perceive.
• A sign or symbol is a way of representing data. For
example, the word ‘blue’ is a sign of a particular color
sensation.
• A sign (or symbol) can be defined as something that
conveys some information by means other than direct
representation.
• Types of signs:
• visual
• Audible
• Tactile (e.g. The Braille System – Louis Braille)
1/11/2011
ArabOU – M150 - AbuNawaf
5
Computers as tools
Computers as tools for finding
Geographical Locations (Maps, GPS…).
Information (WWW, Internet, Search engines,
browsers…).
Computers as tools for working with data
DNA
The human genome …. etc
1/11/2011
ArabOU - M150 - AbuNawaf
6
Communication, convention and
representation
• Communication is the act of imparting
information.
• Communication
relies
on
agreed
representations (conventions) which associate a
symbol with a meaning.
1/11/2011
ArabOU - M150 - AbuNawaf
7
We use computers to:
• communicate with each other.
(chat, e-mail…etc.)
• solve problems.
This implies that:
– we need to communicate with computers;
– computers need to communicate with us;
– computers need to communicate with each other
1/11/2011
ArabOU - M150 - AbuNawaf
8
E-m
il
• Netiquette
• Emotions
• Pros:
immediate . global . cheap . multimedia
• Cons:
– less time for reflection;
– the risk of sending mail to the wrong person(s) is high (BCC and
Reply);
– short informal communication (which is not always appropriate);
– easily misunderstood.
1/11/2011
ArabOU - M150 - AbuNawaf
9
Communication, conventions and protocols
Communication between two (or more) parties
requires a common ground, an agreement that all can
follow and understand.
Such an agreement would be known as a
convention or a protocol.
The main convention for
communication is the language.
1/11/2011
ArabOU - M150 - AbuNawaf
human/human
10
- Important Internet Protocols Some protocols for communication with
computers:
TCP/IP (Transmission Control Protocol/Internet Protocol) ;
it is the internet protocol.
HTTP (Hyper Text Transfer Protocol) for web pages
addresses.
FTP (File Transfer Protocol) for downloading files from the
Internet.
SMTP (Simple Mail Transfer Protocol) for sending and
receiving emails.
Handshake Protocol:
conventions that enable computers and other machines such
as faxes to identify each other.
1/11/2011
ArabOU - M150 - AbuNawaf
11
Representations have to be perceivable
Examples of (or mode) representations:
Auditory perceived as sound (ex: spoken
language).
Visual perceived as sight (ex: flags, traffic
signs, etc…).
Tactile perceived by touch (ex: Braille
alphabet).
1/11/2011
ArabOU - M150 - AbuNawaf
12
Picking representations
Choosing representations
The choice of a representation is crucial for achieving a
certain task.
Fit-for-purpose representations
The fit-for-purpose criteria is essential, a representation
must include sufficient information while stripping out
irrelevant detail. (Ex: professional maps vs hand made)
Abstraction
The process of minimizing information for a fit-forpurpose representation is called abstraction. (Ex: underground maps)
1/11/2011
ArabOU - M150 - AbuNawaf
13
Complex representation systems
Very few representations are independent, most
of them belong to complex representation systems
which have two characteristics:
The form of a representation is made out of basic
parts.
The meaning of the representation is constructed from
the meanings of its basic parts.
For Examples: the cards, traffic signs….
1/11/2011
ArabOU - M150 - AbuNawaf
14
Sharing and Formats
Computer languages facilitate communication
with and between computers.
Why do we need formats?
Formats are a type of computer languages:
They represent the detail of the input and output
associated with specific applications.
They ensure consistency, a document is displayed the
same way every time it is opened by a user.
They enable sharing, a document is understood by
output devices such as printers.
1/11/2011
ArabOU - M150 - AbuNawaf
15
The power of formats
There are two types of formats:
Proprietary formats protected by copyright laws,
usually associated with popular applications for a large
user public (ex: Microsoft Word).
Public formats are free, they encourage the
development of new applications based on such formats
(ex: HTML).
1/11/2011
ArabOU - M150 - AbuNawaf
16
Standardization
Definition: large collection of people agreed to use.
Advantages of standardization:
Compatibility ensured between a lot of applications as long as the
standard is respected.
New formats and standards can evolve together.
Users don’t worry about sharing and communicating.
The responsibility of ensuring compatibility can be delegated to
programmers and doesn’t lie on the user.
Drawbacks:
Reduction of the number of formats.
A new format evolves slowly into a standard.
Adding new features to an existing standard is expensive and time
consuming.
1/11/2011
ArabOU - M150 - AbuNawaf
17
Conversion
Definition: means one format can always be translated into another.
Advantages of conversion:
Very beneficial between two standards each respected by a large
group of applications.
Ability to translate documents from an obsolete format to a current
format.
Drawbacks:
Inability to map all features of a certain format with another.
Difficulty in coping with the evolution of standards and formats as
the conversion programs also need to keep track of the evolution.
Many standards are currently in use, it is not realistic to develop
conversion programs between all of them, gaps will always exist.
1/11/2011
ArabOU - M150 - AbuNawaf
18
File extensions and what they mean
Some extensions:
1/11/2011
ArabOU - M150 - AbuNawaf
19
Crossing the Boundary
• We live in an analogue world. The world of the computer is
digital.
• The boundary between the analogue world and the digital world
needs to be crossed to enable human-computer communication.
transform to
digital world
Computer World
transform to
analogue world
1/11/2011
ArabOU - M150 - AbuNawaf
0101101000101011
101001010100010
0101000111010101
0110101001101010
001000101010
20
Analogue and digital
Analogue and digital
This is the main difference between analogue and digital: analogue
signals are continuous, they can take any value within their limits,
whereas digital ones can only take set values within their range. Digital
signals are said to be 'discrete', which means 'separate' or 'distinct'.
What are the benefits of being digital?
Digital devices are often faster and more efficient than analogue
equivalents.
There are two main reasons why digital systems are often superior:
reliability and manipulation.
1/11/2011
ArabOU - M150 - AbuNawaf
21
A world of numbers.
After 9 there is 10, it is one group of ten plus zero, this
number is written in two columns.
37 is three groups of ten plus seven.
345 requires three columns, it is three groups of hundred
plus four groups of ten plus five.
Each additional column to the left will count as ten times
bigger than the one on its right.
This is a base 10 arithmetic or a decimal system.
1/11/2011
ArabOU - M150 - AbuNawaf
22
A world of numbers.
A computer only uses two digits 0 and 1, they correspond
to tiny voltages in the computer’s memory.
1 represents 1.
10 is not ten, it represents one group of two plus zero.
100 is one group of four plus zero group of two plus zero.
Each additional column to the left will count as two times
the column on its right.
This is a base 2 arithmetic, or a binary system.
1/11/2011
ArabOU - M150 - AbuNawaf
23
A world of numbers.
A digit 0 or 1 is also called a bit (binary digit).
A byte consists of 8 bits, if we want to represent it pictorially it will
look like this:
If a bit can only be 0 or 1 then the largest number stored in a byte
would be: (255)
And the smallest would be: (0)
A word is a group of 4 bytes (32 bits).
1/11/2011
ArabOU - M150 - AbuNawaf
24
A world of numbers.
1 KB (Kilo Byte) consists of 1024 bytes (210 bytes).
1 MB (Mega Byte) consists of 1024 KB (220 bytes).
1 GB (Gega Byte) consists of 1024 MB (230 bytes).
1 TB (Tera Byte) consists of 1024 GB (240 bytes).
1 PT (Peta Byte) consists of 1024 TB (250 bytes).
Examples of other arithmetic (numbers) systems:
Octal system or base 8.
Hexadecimal system or base 16 (0,1,2,…9, A, B....F).
1/11/2011
ArabOU - M150 - AbuNawaf
25
Crossing the boundary
Text
A computer handles everything in a binary form, when
taking a feature and passing it on to a computer it will
endure a sort of transformation into numbers.
Word processors enable us to enter text into the computer,
what we see as letters on the screen is in fact a series of
numbers inside the computer.
Each character (alphabets, parentheses, accents, spaces,
etc..) has its numerical representation in the computer.
1/11/2011
ArabOU - M150 - AbuNawaf
26
Standards
Representations need to follow certain standards:
ASCII standard (American Standard Code for
Information Interchange) which represent characters
by a series of 7 bits (128 characters including
uppercase and lowercase, punctuation marks,
spaces, tabs, return carriage, etc…).
Unicode standard which represent characters on 2
bytes (16 bits) a total of 63 536 characters covering
a much wider range than the ASCII standard.
1/11/2011
ArabOU - M150 - AbuNawaf
27
Keyboards
When typing on a keyboard a program called BIOS
(Basic Input/Output System) will transform the signal from
the pressed button to its appropriate numerical code, other
software will store it in memory.
Graphics and video
Images
Vision is the most dominant sense for a human being, a
visual field includes light, colors, shade, form, etc…
Such features need to be transformed into numbers in
order to cross the boundary and enter the computer world.
1/11/2011
ArabOU - M150 - AbuNawaf
28
Graphics and video
In the resulting image, the number 0 will be assigned if the square
is white and the number 1 will be assigned if the square is black.
We obtain a binary image, each mapped square is called pixel
(picture element), such image transformation is called bitmap
encoding. (Also called raster graphics).
Increasing the number of pixels increases
resolution and improves quality.
1/11/2011
ArabOU - M150 - AbuNawaf
29
Graphics and video
Colors are represented in a different way.
Any color can be made out of a mixture of three basic
shades Red, Green and Blue (R, G, B) – RGB Model.
Each shade is represented by a byte (8 bits), giving values
ranging from 0 to 255.
As a total we have 256 x 256 x 256 shades of color.
1/11/2011
ArabOU - M150 - AbuNawaf
30
Graphics and video
Red is (255, 0, 0) since it is all Red and 0 Green and 0
Blue.
Green is (0, 255, 255).
Blue is (0, 0, 255).
White is (255, 255, 255), all the color spectrum.
Black is (0, 0, 0), no color what so ever.
1/11/2011
ArabOU - M150 - AbuNawaf
31
Graphics and video
Interlude – diagrams
Shapes, line thickness, coordinates, all have their numerical
representations in a computer.
In this picture the rectangle, the circle, the arrow, the line and the
text area each has a number to define its type.
This sort of encoding is usually known as vector graphics, and its
obvious advantage is that it is very compact.
A circle is defined by its radius and
y
the coordinates of its center.
A rectangle by the coordinates of its
upper left and lower right corners.
Lines and arrows by their starting and
ending points.
x The text area by the coordinates of its
o
top left corner
1/11/2011
ArabOU - M150 - AbuNawaf
32
Drawing and Painting Packages
• Programs that allow us to draw and display
vector graphics are generally referred to as
drawing packages.
• Systems for constructing and displaying raster
graphics are usually called painting packages.
1/11/2011
ArabOU - M150 - AbuNawaf
33
Graphics and video
Making it move
A Video or a movie, is a series of images that slightly
differ one from another, passing them one after the other at
a certain speed will give the illusion of movement.
A picture would be called a frame.
The speed of flipping the frames one after the other is
called frame rate.
1/11/2011
ArabOU - M150 - AbuNawaf
34
Graphics and video
The process of digitizing an image consists into breaking
it into squares.
The smaller the squares, the more accurate our
representation of the analogue image will be.
Smaller squares will mean, more squares and therefore
more bits to map them, which means more storage space.
Several formats exist for image digitizing, depending on
the allowed loss of precision (ex: bmp, png, jpg, gif, etc…)
For video, MPEG.
1/11/2011
ArabOU - M150 - AbuNawaf
35
Sound and music
Hearing is the second most relied on sense for a human
being.
A sound consists of a waveform.
Example of a waveform.
period
1/11/2011
peak
ArabOU - M150 - AbuNawaf
36
Sound and music .. Continue..
In order to digitize a sound waveform, we take samples of
the sound at small time intervals, such a process is called
sampling.
The number of times/second we take a sample is called
the sampling rate.
The smaller the interval the better.
1/11/2011
ArabOU - M150 - AbuNawaf
37
Sound and music .. Continue..
The process of digitizing a sound consists into sampling it
and then associating a number to each sample
(quantization).
The smaller the interval of taking the samples, the more
accurate our representation of the analogue sound will be.
Smaller intervals will mean, more samples and therefore
more bits to quantize them, which means more storage
space.
Several formats exist for sound digitizing, depending on
the allowed loss of precision (ex: mp3, wav, mid, etc…)
1/11/2011
ArabOU - M150 - AbuNawaf
38
Types of output devices
Output devices for images:
Monitors
Computer monitors (screen) :
CRT (Cathode Ray Tube) big box that looks like televisions.
LCD (Liquid Crystal Display) flat and thin.
Printers
Printers
Inkjet, work by firing drops of liquid ink on paper.
Laser, work by firing a laser beam and “burning” powder ink on paper.
Plotters
Plotters are professional printers used by architects that work by
moving a special pen on a paper.
Loudspeakers
 Loudspeakers are the output devices for sound.
 When outputting a video, the monitor (image output device)
and the loudspeaker (sound output device) are used
simultaneously.
1/11/2011
ArabOU - M150 - AbuNawaf
39
Marking up for style:
A mark-up language will indicate to the computer
how parts of the text will be styled.
Marks are used to determine where the styling
starts and where it ends.
The marks are embedded within the typed text.
Marks are either explicit or implicit.
1/11/2011
ArabOU - M150 - AbuNawaf
40
Marking up for style .. continue
Explicit marks are certain words that you put
before and after the text to be styled in order to
delimit the styling area.
The program needs to understand that the mark is
to be distinguished from the text itself.
It makes sense to place a mark between angle
brackets < and >.
1/11/2011
ArabOU - M150 - AbuNawaf
41
Marking up for style .. continue
Implicit marks are one that you do not have to
type yourself, the will not show as words before
and after the text you wish to style.
Example in a MS-Word document when you wish
to place a word in bold you just press the button
“B” then type the word and then release the button.
1/11/2011
ArabOU - M150 - AbuNawaf
42
Marking up for style .. continue
WYSIWYG programs use implicit marks.
WYSIWYG stands for “What You See IS What
You Get”.
The text that appears on the computer screen will
look exactly like the final printed document.
1/11/2011
ArabOU - M150 - AbuNawaf
43