Download 01slide

Document related concepts
no text concepts found
Transcript
Chapter 1
Introduction to Computers,
Programs, and Java
1
Objectives








To review computer basics, programs, and operating systems (§§1.2-1.4).
To explore the relationship between Java and the World Wide Web (§1.5).
To distinguish the terms API, IDE, and JDK (§1.6).
To write a simple Java program (§1.7).
To display output on the console (§1.7).
To explain the basic syntax of a Java program (§1.7).
To create, compile, and run Java programs (§1.8).
(GUI) To display output using the JOptionPane output dialog boxes (§1.9).
2
What is a Computer?
A typical computer consists of: a CPU, memory, hard disk,
monitor, printer, IO ports and
communication devices.
Bus
Storage
Devices
e.g., Disk, CD,
and Tape
Memory
CPU
Communication
Devices
Input
Devices
Output
Devices
e.g., Modem,
and NIC
e.g., Keyboard,
Mouse
e.g., Monitor,
Printer
3
What is a Computer?
Chassis
OPERATING SYSTEM
PROCESSORS
MEMORY
HARD DRIVE
VIDEO CARD
OPTICAL DRIVE
WIRELESS
SOUND CARD
USB 3.0
Dell Datasafe
Wireless Driver
Additional Software
Power Cord
XPS 8500, White Chassis w/19:1 media card reader
Genuine Windows® 7 Home Premium, 64Bit, English
3rd Generation Intel® Core™ i7-3770 processor 3.40 GHz
with Turbo Boost 2.0 up to 3.90 GHz
12GB Dual Channel DDR3 1600MHz - 4 DIMMs
2TB 7200RPM, SATA Hard Drive 6.0 Gb/s + 32GB SSD SRT Enhancement
AMD Radeon™ HD 7770 2GB GDDR5
16X CD/DVD burner (DVD+/-RW), write to CD/DVD
Dell Wireless 1703 802.11b/g/n, Bluetooth v4.0+LE
Integrated 7.1 with WAVE MAXXAudio 4
Integrated 10/100/1000 Ethernet
DataSafe 2.0 Online Backup 2GB for 1 year
Dell SRV Software 1703
Additional Software
US Power Cord
May 12, 2012
Source: www.dell.com
4
CPU
• The central processing unit (CPU) is the brain of a computer.
• It retrieves instructions from memory and executes them.
• The CPU speed is measured in Gigahertz (GHz), with 1 gigahertz equaling 1
billion pulses per second.
• For example: Intel i7 core frequency is 3.45GHz (Up To 3.73GHz w/ Turbo)
and includes six core CPUs in a package (cell phone CPU’s @ 1.5Ghz)
Bus
Storage
Devices
e.g., Disk, CD,
and Tape
Memory
CPU
Communication
Devices
Input
Devices
Output
Devices
e.g., Modem,
and NIC
e.g., Keyboard,
Mouse, Stylus
e.g., Monitor,
Printer
5
Memory
•
Memory is used to store OS, and user data and program instructions for
CPU to execute.
•
A memory unit is an ordered sequence of bytes, each holds eight bits.
•
A program and its data must be brought to memory before they can be
executed.
•
Typical laptops today support between 4-16 Gigabytes
Bus
Storage
Devices
e.g., Disk, CD,
and Tape
Memory
CPU
Communication
Devices
Input
Devices
Output
Devices
e.g., Modem,
and NIC
e.g., Keyboard,
Mouse
e.g., Monitor,
Printer
6
Memory
Byte
Kilobyte
Megabyte
Gigabyte
Terabyte
Petabyte
Exabyte
B
KB
MB
GB
TB
PB
EB
1B (8 bits)
1000 B
1000 KB
1000 MB
1000 GB
1000 TB
1000 PB
The contents of a DVD
Printed collections of Library of Congress
All printed material in the world
All words ever spoken by human beings
4.7 gigabytes
10 terabytes
200 petabytes
5
exabytes
Source (May 19, 2014):
http://www2.sims.berkeley.edu/research/projects/how-muchinfo/datapowers.html
Bus
Storage
Devices
e.g., Disk, CD,
and Tape
Memory
CPU
Communication
Devices
Input
Devices
Output
Devices
e.g., Modem,
and NIC
e.g., Keyboard,
Mouse
e.g., Monitor,
Printer
7
How Data is Stored?
Numbers, characters, and strings, are
encoded as a series of bits (zeros and
ones).
The encoding scheme varies (ASCII,
Unicode). For example, character ‘J’ is
represented by 01001010 in one byte
(ASCII Hex: 4A).
A small number such as 3 can be stored
in a single byte.
If computer needs to store a large
number that cannot fit into a single
byte, it uses a number of adjacent
bytes.
Memory
address
Memory
content
.
.
.
.
.
.
2000
01001010
Encoding for character ‘J’
2001
01100001
Encoding for character ‘a’
2002
01110110
Encoding for character ‘v’
2003
01100001
Encoding for character ‘a’
2004
00000011
Encoding for number 3
No two data can share or split a same
byte.
A byte is the minimum storage unit.
8
Storage Devices
Memory is volatile, information is lost when the power is off.
Programs and data are permanently stored on storage devices and are
moved to memory when the computer actually uses them.
Currently there are three main types of storage devices:
Disk drives:
Mechanical/SSD disks (and floppy disks),
Optical drives: CD/DVD drives, and
Magnetic drives: Tape drives.
Bus
Storage
Devices
e.g., Disk, CD,
and Tape
Memory
CPU
Communication
Devices
Input
Devices
Output
Devices
e.g., Modem,
and NIC
e.g., Keyboard,
Mouse
e.g., Monitor,
Printer
9
Storage Devices
Dimensions
Capacity
Rotational speed / Buffer size
Interface / Transfer rate
Bus
Storage
Devices
e.g., Disk, CD,
and Tape
Memory
CPU
Communication
Devices
Input
Devices
Output
Devices
e.g., Modem,
and NIC
e.g., Keyboard,
Mouse
e.g., Monitor,
Printer
10
Output Devices: Monitor
The monitor displays information
(text and graphics).
The resolution and dot pitch
determine the quality of the
display.
Bus
Storage
Devices
e.g., Disk, CD,
and Tape
Memory
CPU
Communication
Devices
Input
Devices
Output
Devices
e.g., Modem,
and NIC
e.g., Keyboard,
Mouse
e.g., Monitor,
Printer
11
Monitor Resolution and Dot Pitch
resolution The resolution specifies the number of pixels per square inch.
Pixels (short for “picture elements”) are tiny dots that form an image
on the screen. The higher the resolution, the sharper and clearer the
image is.
PC monitors are usually 15-inch, 17-inch, 19-inch, or 21-inch.
For a 15-inch monitor, a comfortable resolution setting would be
640480 (307,200 pixels).
dot pitch
The dot pitch is the amount of space between pixels.
The smaller the dot pitch, the better the display.
12
Communication Devices
A regular modem uses a phone line and can transfer data in a speed up to
56 Kbps (bits per second).
DSL (digital subscriber line) and cable modem can transfer data in the
range 128Kbps – 3Gbps (upload/download)
Network interface card (NIC) is a device to connect a computer to a local
area network (LAN).
A typical type of NIC, called 10BaseT, can transfer data at 10 mbps
Check your Internet speed: http://speedtest.connectedoh.org/
Bus
Storage
Devices
e.g., Disk, CD,
and Tape
Memory
CPU
Communication
Devices
Input
Devices
Output
Devices
e.g., Modem,
and NIC
e.g., Keyboard,
Mouse
e.g., Monitor,
Printer
13
Programs

Computer programs, known as software, are instructions to the
computer.

You tell a computer what to do through programs.

Computers do not understand human languages, so you need to
use computer languages to communicate with them.

Programs are written using programming languages.
14
Programming Languages
Machine Language Assembly Language
High-Level Language
•
Machine language is a set of primitive instructions built into every computer.
•
The instructions are in the form of binary code, so you have to enter binary
codes for various instructions.
•
Write program with native machine language is a tedious process, programs
are highly difficult to read and modify.
•
For example, to add two numbers, you might write an instruction in binary like
this:
1101101010011010
15
Programming Languages
Machine Language Assembly Language
High-Level Language
Assembly languages were developed to make programming easier.
Since the computer cannot understand assembly language, however, a
program called assembler is used to convert assembly language programs
into machine code.
For example, to add two numbers, you might write an instruction in
assembly code like this:
ADDF3 R1, R2, R3
Assembly Source File
…
ADDF3 R1, R2, R3
…
Machine Code File
Assembler
…
1101101010011010
…
16
Programming Languages
Machine Language Assembly Language
High-Level Language
The high-level programming languages are English-like and easy to learn
and program.
For example, the following is a high-level language statement that
computes a student’s final grade
final grade = 0.20 * homeworkGrade + 0.30 * midterm + 0.5 * finalExam;
17
Popular High-Level Languages
•
•
•
•
•
•
•
•
•
•
•
•
•
•
COBOL
FORTRAN
BASIC
Pascal
Ada
C
Objective C
Visual Basic
Delphi
C++
C#
Perl, PHP
Python,
JavaScript,…
Java
(COmmon Business Oriented Language)
(FORmula TRANslation)
(Beginner All-purpose Symbolic Instructional Code)
(named for Blaise Pascal)
(named for Ada Lovelace)
(whose developer designed B first)
(used to develop Apple iOS apps)
(Basic-like visual language developed by Microsoft)
(Pascal-like visual language developed by Borland)
(an object-oriented language, based on C)
(a Java-like language developed by Microsoft)
(scripting language used for web-development)
(We use it in the book)
18
Compiling Source Code
1.
2.
3.
A program written in a high-level language is called a source
program.
A program called a compiler is used to translate the source
program into a machine language program called an object
program.
The object program is often then linked with other supporting
library code before the object can be executed on the machine.
Source File
Compiler
Machine-language
File
Linker
Executable File
Library Code
19
Operating Systems
1.
2.
3.
4.
The operating system (OS) is a
program that manages and
controls a computer’s
activities.
You are probably using OSX,
Linux, Windows 7, 8, XP, or
Vista.
Windows is currently the most
popular PC operating system.
Application programs such as
an Internet browser and a word
processor cannot run without
an operating system.
User
Application Programs
Operating System
Hardware
20
Why Java?
The answer is that Java enables users to develop and deploy
applications on the Internet for servers, desktop computers,
and small hand-held devices, and appliances.

Java is a general purpose programming language.

Java is the primary Internet programming language.
21
Java, Web, and Beyond
•
Java can be used to develop:
• mobile applications,
• games,
• Web-based content, and
• enterprise software
22
Examples of Java’s Versatility (Applets)
23
PDA, Tablets, Appliances, Cell Phones …
24
Java’s History
•
Designed by James Gosling @ Sun Microsystems
originally intended for interactive TV environment.
•
Released on May 20, 1995, soon followed by Java
enabled web-browser such as: HotJava, Netscape, IE.
•
On 2007, Sun makes all of Java's core code available
under free software/open-source distribution terms
•
On 2010 Oracle acquires Sun.
•
Oracle vs. Google-Android (2012) sets legal precedent:
APIs cannot be copyrighted (Oracle lost the case).
•
According to Oracle, over 4 billion devices worldwide
operate using Java (2013)
Duke,
original
Java mascot
25
Characteristics of Java
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Java is Simple
Java is Object-Oriented
Java is Distributed
Java is Interpreted
Java is Robust
Java is Secure
Java is Architecture-Neutral
Java is Portable
Java's Performance
Java is Multithreaded
Java is Dynamic
www.cs.armstrong.edu/liang/intro8e/JavaCharacteristics.pdf
26
Companion
Website
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Characteristics of Java
Java is Simple
Java is Object-Oriented
Java is Distributed
Java is Interpreted
Java is Robust
Java is Secure
Java is ArchitectureNeutral
Java is Portable
Java's Performance
Java is Multithreaded
Java is Dynamic
Java is partially modeled on C++, but
greatly simplified and improved.
Some people refer to Java as "C++--"
because it is like C++ but with more
functionality and fewer negative aspects.
27
Companion
Website
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Characteristics of Java
Java is Simple
Java is Object-Oriented
Java is Distributed
Java is Interpreted
Java is Robust
Java is Secure
Java is ArchitectureNeutral
Java is Portable
Java's Performance
Java is Multithreaded
Java is Dynamic
Java is inherently object-oriented.
Object-oriented programming (OOP) is
a popular programming approach that
is replacing traditional procedural
programming techniques.
One of the central issues in software
development is how to reuse code.
Object-oriented programming
provides great flexibility, modularity,
clarity, and reusability through
encapsulation, inheritance, and
polymorphism.
28
Companion
Website
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Characteristics of Java
Java is Simple
Java is Object-Oriented
Java is Distributed
Java is Interpreted
Java is Robust
Java is Secure
Java is ArchitectureNeutral
Java is Portable
Java's Performance
Java is Multithreaded
Java is Dynamic
Distributed computing involves several
computers working together on a
network.
Java is designed to make distributed
computing easy.
Since networking capability is
inherently integrated into Java, writing
network programs is like sending and
receiving data to and from a file.
29
Companion
Website
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Characteristics of Java
Java is Simple
Java is Object-Oriented
Java is Distributed
Java is Interpreted
Java is Robust
Java is Secure
Java is ArchitectureNeutral
Java is Portable
Java's Performance
Java is Multithreaded
Java is Dynamic
You need an interpreter to run Java
programs.
The programs are compiled into the
Java Virtual Machine code called
bytecode.
The bytecode is machine-independent
and can run on any machine that has a
Java interpreter, which is part of the
Java Virtual Machine (JVM).
30
Companion
Website
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Characteristics of Java
Java is Simple
Java is Object-Oriented
Java is Distributed
Java is Interpreted
Java is Robust
Java is Secure
Java is ArchitectureNeutral
Java is Portable
Java's Performance
Java is Multithreaded
Java is Dynamic
Java compilers can detect many
problems that would first show up at
execution time in other languages.
Java has eliminated certain types of
error-prone programming constructs
found in other languages.
Java has a runtime exception-handling
feature to provide programming
support for robustness.
31
Companion
Website
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Characteristics of Java
Java is Simple
Java is Object-Oriented
Java is Distributed
Java is Interpreted
Java is Robust
Java is Secure
Java is ArchitectureNeutral
Java is Portable
Java's Performance
Java is Multithreaded
Java is Dynamic
Java implements several security
mechanisms to protect your system
against harm caused by stray
programs.
32
Companion
Website
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Characteristics of Java
Java is Simple
Java is Object-Oriented
Java is Distributed
Java is Interpreted
Java is Robust
Java is Secure
Java is ArchitectureNeutral
Java is Portable
Java's Performance
Java is Multithreaded
Java is Dynamic
Write once, run anywhere
With a Java Virtual Machine (JVM), you
can write one program that will run on
any platform.
33
Companion
Website
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Characteristics of Java
Java is Simple
Java is Object-Oriented
Java is Distributed
Java is Interpreted
Java is Robust
Java is Secure
Java is ArchitectureNeutral
Java is Portable
Java's Performance
Java is Multithreaded
Java is Dynamic
Because Java is architecture neutral,
Java programs are portable. They can
be run on any platform without being
recompiled.
34
Companion
Website
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Characteristics of Java
Java is Simple
Java is Object-Oriented
Java is Distributed
Java is Interpreted
Java is Robust
Java is Secure
Java is ArchitectureNeutral
Java is Portable
Java's Performance
Java is Multithreaded
Java is Dynamic
Although slower than executable code
the speed of interpreted Java bytecode
is reasonably good. Use Just-In-Time
compiler feature for critical apps.
35
Companion
Website
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Characteristics of Java
Java is Simple
Java is Object-Oriented
Java is Distributed
Java is Interpreted
Java is Robust
Java is Secure
Java is ArchitectureNeutral
Java is Portable
Java's Performance
Java is Multithreaded
Java is Dynamic
Multithread programming is smoothly
integrated in Java, whereas in other
languages you have to call procedures
specific to the operating system to enable
multithreading.
36
Companion
Website
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Characteristics of Java
Java is Simple
Java is Object-Oriented
Java is Distributed
Java is Interpreted
Java is Robust
Java is Secure
Java is ArchitectureNeutral
Java is Portable
Java's Performance
Java is Multithreaded
Java is Dynamic
Java was designed to adapt to an evolving
environment. New code can be loaded on the
fly without recompilation. There is no need for
developers to create, and for users to install,
major new software versions. New features can
be incorporated transparently as needed.
37
JDK Editions

Java Standard Edition (J2SE)
 J2SE can be used to develop client-side standalone
applications or applets.

Java Enterprise Edition (J2EE)
 J2EE can be used to develop server-side
applications such as Java servlets and Java
ServerPages.

Java Micro Edition (J2ME).
 J2ME can be used to develop applications for
mobile devices such as cell phones.
This book uses J2SE to introduce Java programming.
http://www.oracle.com
38
Popular Java IDEs
•
NetBeans Open Source by Sun/Oracle
www.netbeans.org
•
Eclipse Open Source by IBM
•
www.eclipse.org
•
39
Java Programming Preliminaries
Windows Users:
After installing the JDK ( say in C:\Program Files\Java\jdk1.7.0_03)
You need to create a system-wide reference to the Java directory.
Steps
1. Start button > Right click on Computer > Properties > Advanced
System Setting >(Advanced Tab) Environment Variables.
2. On “System Variables” panel, click “New” > on “New System
Variable” window enter Variable name: “Java_Home”, and Variable
value: “C:\Program Files\Java\jdk1.7.0_03” > click OK
3. Again, on “System Variables” panel, look for “Path” variable, click
on Edit > prefix the path string with the following reference:
%JAVA_HOME%\bin; (caution: include the semicolon)
40
Java Programming Preliminaries
Windows Users: (continuation)
Steps
4. [Important for the use of Packages – Explained later]
Once more, on “System Variables” panel, look for “classPath”
variable. Click “New…” (in case it doesn’t exist) or Edit. Enter the
following string .;c:/; (caution: include the semicolons)
(later on you may execute a class by typing a command such as:
java csu.matos.MyClass1 where csu.matos is the package
name, and the class is located in the directory c:\csu\matos )
41
Java
Programming
Preliminaries 1/2
42
Java
Programming
Preliminaries 2/2
43
A Simple Java Program
Listing 1.1
//This program prints Welcome to Java!
public class Welcome {
public static void main(String[] args) {
System.out.println("Welcome to Java!");
}
}
44
Creating and Editing Using NotePad
To use NotePad, type
notepad Welcome.java
from the DOS prompt.
45
Creating, Compiling, and
Running Programs
Create/Modify Source Code
Source code (developed by the programmer)
public class Welcome {
public static void main(String[] args) {
System.out.println("Welcome to Java!");
}
}
Byte code (generated by the compiler for JVM
to read and interpret, not for you to understand)
…
Method Welcome()
0 aload_0
…
Method void main(java.lang.String[])
0 getstatic #2 …
3 ldc #3 <String "Welcome to
Java!">
5 invokevirtual #4 …
8 return
Saved on the disk
Source Code
Compile Source Code
i.e., javac Welcome.java
If compilation errors
stored on the disk
Bytecode
Run Byteode
i.e., java Welcome
Result
If runtime errors or incorrect result
46
Compiling Java Source Code
1.
With Java, you write the program once, and compile the source
program into a special type of object code, known as bytecode.
2.
The bytecode can then run on any computer with a Java Virtual
Machine (JVM), as shown below.
3.
Java Virtual Machine is a software that interprets Java bytecode.
Java Bytecode
Java Virtual
Machine
Any
Computer
47
animation
Trace a Program Execution
Enter main method
//This program prints Welcome to Java!
public class Welcome {
public static void main(String[] args) {
System.out.println("Welcome to Java!");
}
}
48
animation
Trace a Program Execution
Execute statement
//This program prints Welcome to Java!
public class Welcome {
public static void main(String[] args) {
System.out.println("Welcome to Java!");
}
}
49
animation
Trace a Program Execution
//This program prints Welcome to Java!
public class Welcome {
public static void main(String[] args) {
System.out.println("Welcome to Java!");
}
}
print a message to the
console
50
Companion
Website
•
Compiling and Running Java
from the Command Window
Set path to JDK bin directory
– set path=c:\Program Files\java\jdk1.6.0\bin
•
Set classpath to include the current directory
– set classpath=.
•
Compile
– javac Welcome.java
•
Run
– java Welcome
51
Anatomy of a Java Program
1.
2.
3.
4.
5.
6.
7.
8.
Comments
Reserved words
Modifiers
Statements
Blocks
Classes
Methods
The main method
52
Comments
Three types of comments in Java.
Line comment: A line comment is preceded by two slashes (//) in a
line.
Paragraph comment: A paragraph comment is enclosed between
/* and */ in one or multiple lines.
javadoc comment: javadoc comments begin with /** and end with */.
They are used for documenting classes, data, and methods. They can
be extracted into an HTML file using JDK's javadoc command.
53
Reserved Words
1.
Reserved words or keywords are words that have a specific
meaning to the compiler and cannot be used for other purposes in
the program.
2.
For example, when the compiler sees the word class, it understands
that the word after class is the name for the class.
3.
Other reserved words in Listing 1.1 are public, static, String and
void. Their use will be introduced later in the book.
54
Reserved Words
abstract
assert
boolean
break
byte
case
catch
char
class
const*
continue
default
do
double
else
enum
extends
final
finally
float
for
goto
if
implements
import
instanceof
int
interface
long
native
new
package
private
protected
public
return
short
static
strictfp
super
switch
synchronized
this
throw
throws
transient
try
void
volatile
while
55
Modifiers

Java uses certain reserved words called modifiers that specify the
properties of the data, methods, and classes and how they can be
used.

Examples of modifiers are public and static.

Other modifiers are private, final, abstract, and protected.

A public datum, method, or class can be accessed by other
programs.

A private datum or method cannot be accessed by other
programs.
56
Statements
A statement represents an action or a sequence of actions.
The statement
System.out.println(“ Hello world ") ;
in the previous program is a statement to display the greeting
"Welcome to Java!"
Every statement in Java ends with a semicolon ( ; ).
57
Blocks
A pair of braces {…} in a program forms a block that
groups related components of a program.
public class Welcome {
Method block
Class block
public static void main(String[] args) {
System.out.println ("Hello world");
}
}
58
Classes
1.
2.
3.
4.
The class is the essential Java construct.
A class is a template or blueprint for objects.
To program in Java, you must understand classes and be able to
write and use them.
Programs are defined by using one or more classes.
public class Welcome
{
... Class contents
}
59
Methods
1.
What is System.out.println? It is a method: a collection of
statements that performs a sequence of operations to display a
message on the console.
2.
It can be used even without fully understanding the details of how it
works.
3.
It is used by invoking a statement with a string argument. The string
argument is enclosed within parentheses.
4.
In this case, the argument is " Hello world " You can call the
same println method with a different argument to print a different
message.
60
main Method
The Java interpreter executes the application by invoking the main
method.
The main method looks like this:
public static void main(String[] args) {
// statements;
}
61
Displaying Text in a Message Dialog Box
A more colorful version of the test program follows
import javax.swing.JOptionPane;
public class Welcome {
public static void main(String[] args) {
JOptionPane.showMessageDialog (
null,
"Welcome to Java!",
"Display Message",
JOptionPane.INFORMATION_MESSAGE);
}
}
62
Two Ways to Invoke the Method
One way is to use a statement as shown in the example:
JOptionPane.showMessageDialog(null,
x,
y,
JOptionPane.INFORMATION_MESSAGE);
where x is a string for the text to be displayed, and y is a string for
the title of the message dialog box.
The other is to use a statement like this:
JOptionPane.showMessageDialog(null, x);
where x is a string for the text to be displayed.
63
64
How much information?
http://www2.sims.berkeley.edu/research/projects/how-much-info/datapowers.html
Many of the following facts were taken from Roy Williams "Data Powers of Ten" page at Caltech.
Byte [ 8 bits]
0.1 bytes: a binary decision;
1 byte: a single character;
10 bytes: a single word;
100 bytes: a telegram ORr a punched card;
Kilobyte [ 1,000 bytes OR 103 bytes]
1 Kilobyte: A very short story;
2 Kilobytes: A typewritten page;
10 Kilobytes: An encyclopaedic page OR a deck of punched cards;
10 Kilobytes: static web page;
50 Kilobytes: A compressed document image page;
100 Kilobytes: A low-resolution photograph;
200 Kilobytes: A box of punched cards;
500 Kilobytes: A very heavy box of punched cards;
Megabyte [ 1,000,000 bytes OR 106 bytes]
1 Megabyte: A small novel OR a 3.5 inch floppy disk;
2 Megabytes: A high resolution photograph;
5 Megabytes: The complete works of Shakespeare OR 30 seconds of TV-quality video;
10 Megabytes: A minute of high-fidelity sound OR a digital chest X-ray;
20 Megabytes: A box of floppy disks;
50 Megabytes: A digital mammogram;
100 Megabytes: 1 meter of shelved books OR a two-volume encyclopaedic book;
200 Megabytes: A reel of 9-track tape OR an IBM 3480 cartridge tape;
500 Megabytes: A CD-ROM OR the hard disk of a PC;
65
How much information?
http://www2.sims.berkeley.edu/research/projects/how-much-info/datapowers.html
Gigabyte [ 1,000,000,000 bytes OR 109 bytes]
1 Gigabyte: a pickup truck filled with paper OR a symphony in high-fidelity sound OR a movie at TV quality;
2 Gigabytes: 20 meters of shelved books OR a stack of 9-track tapes;
5 Gigabytes: 8mm Exabyte tape;
20 Gigabytes: A good collection of the works of Beethoven OR 5 Exabyte tapes OR a VHS tape used for digital data;
50 Gigabytes: A floor of books OR hundreds of 9-track tapes;
100 Gigabytes: A floor of academic journals OR a large ID-1 digital tape;
200 Gigabytes: 50 Exabyte tapes;
500 Gigabytes: The biggest FTP site.
Terabyte [ 1,000,000,000,000 bytes OR 1012 bytes]
1 Terabyte: An automated tape robot OR all the X-ray films in a large technological hospital OR 50000 trees made into
paper and printed OR daily rate of EOS data (1998);
2 Terabytes: An academic research library OR a cabinet full of Exabyte tapes;
10 Terabytes: The printed collection of the US Library of Congress;
50 Terabytes: The contents of a large Mass Storage System;
400 Terabytes: National Climactic Data Center (NOAA) database;
Petabyte [ 1,000,000,000,000,000 bytes OR 1015 bytes]
1 Petabyte: 3 years of EOS data (2001);
2 Petabytes: All US academic research libraries;
8 Petabytes: All information available on the Web;
20 Petabytes: Production of hard-disk drives in 1995;
200 Petabytes: All printed material OR production of digital magnetic tape in 1995;
Exabyte [ 1,000,000,000,000,000,000 bytes OR 1018 bytes]
2 Exabytes: Total volume of information generated worldwide annually.
5 Exabytes: All words ever spoken by human beings.
Zettabyte [ 1,000,000,000,000,000,000,000 bytes OR 1021 bytes]
Yottabyte [ 1,000,000,000,000,000,000,000,000 bytes OR 1024 bytes]
66
Appendix. The Size of the Mobile Market – 2009
Extracted from: http://gizmodo.com/5489036/cellphone-overshare
2009
How SMS compares
as a text communication
application
3.05 bn
SMS users
worldwide
600 m
IM users
worldwide
2.6 SMS per
day per person
world average .
The most used
written
communication
tool of the planet
1.3 bn
Email users
worldwide
67
67
The Size of the Mobile Market – 2009
Extracted from:
http://gizmodo.com/5489036/cellphone-overshare
http://www.microsoft.com/investor/reports/ar09/10k_fr_bal.html
Exxon Mobil 2009 Summary Annual Report
2010 Toyota Annual Report (pp 12)
2009 Mobile Revenue
Revenue Year 2009
Microsoft
$78bn
$130 bn
Messaging
Toyota Motors
$204bn
Exxon Mobil
$301bn
$600 bn
Voice
$70 bn
Non-messaging
Revenue is the
collective amount of
income made by a
company (usually from
the sales of goods &
services)
68