cs101: introduction to computing
DESCRIPTION
CS101: Introduction to Computing. Fall 2009. Instructors: Badre Munir, Usman Adeel, Zahid Irfan & Maria Riaz Faculty of Computer Science and Engineering GIK Institute of Engineering Sciences and Technology. Data Representation. Data Representation. Modern computers are digital devices - PowerPoint PPT PresentationTRANSCRIPT
CS101: Introduction to Computing
Instructors: Badre Munir, Usman Adeel, Zahid Irfan & Maria Riaz
Faculty of Computer Science and Engineering
GIK Institute of Engineering Sciences and Technology
Fall 2009
Data Representation
Data Representation
Modern computers are digital devices A digital device works with discrete data, such as the
digits 1 and 0 An analog device works with continuous data
Just as a standard light switch is a simpler technology than a dimmer, so is digital when compared to analog
digital analog
Number System We use decimal number system [base 10] when
representing numeric values in our daily life E.g., consider the number 123
123 = 100 + 20 + 3 = 1*102 + 2 * 101 + 3*100
Most modern computer systems do not use the decimal system to represent numeric values. Instead, they use a binary numbering system [base 2]
Consisting of only two digits: 1 and 0 Uses powers of 2 rather than 10
It is said that there are 10 types of people: those who understand binary, and those who don’t !
Conversions Conversion from binary to decimal:
(1011)2 = 1*23 + 0*22 + 1*21 + 1*20 = (11)10
Conversion from decimal to binary:1252
62 – 12
31 – 02
15 – 12
7 – 12
3 – 12
1 – 12
(125)10
= (1111101)2
162
8 – 02
4 – 02
2 – 02
1 – 02
(16)10
= (10000)2
Char Decimal Binary
A 65 100 0001
B 66 100 0010
0 48 011 0000
1 49 011 0001
$ 36 010 0100
Some decimal values & their binary equivalents
In addition to numeric data, computers also manipulate character data
numbers, symbols, numerals that are not used in arithmetic operations
To represent them, codes have been developed that specify binary equivalent for each character ASCII – 7 bits [Example table given ]
Unicode – 16 bits
Sounds and pictures must be transformedinto a format the computer can understand A computer must digitize colors, notes, and
instrument sounds into 1s and 0s
Representing Non-Numeric Data
Quantifying Bits and Bytes A bit is one binary digit (b):
can have value either 0 or 1
A byte is 8 bits (B) 0010 0100
Kilo- means a 1000; Mega- means million; Giga -means billion Kilobit (Kb) is 1,024 bits Kilobyte (KB) is 1,024 bytes Megabyte (MB) is 1,048,576 bytes Gigabyte (GB) is 1,073,741,824 bytes
Bits take the form of electrical pulses that can travel over circuits Almost the same way as electricity flows over a wire when you turn on a
light switch
Computer Hardware
Microprocessor
Memory
Storage Devices
I/O Devices
Computer Chips (-1-) Most electronic components inside a
computer are integrated circuits Thin slices of silicon crystal packed with
microscopic circuit elements Semiconducting materials are
used to fabricate a chip Types of chips:
DIPs; DIMMs; PGAs; SEC cartridge *The motherboard houses all essential chips and
provides connecting circuitry between them
Computer Chips (-2-)
Dual In-line Memory Module(DIMM)
Dual In-linePackage(DIP)
PinGridArray(PGA)
SingleEdgeContact(SEC)
Microprocessor
An integrated circuit designed to process instructions - CPU on a chip
The CPU has two parts ALU (arithmetic logic unit)
Performs arithmetic operations Performs logical operations Uses registers to hold data being
processed Control Unit
Directs and coordinates processing
Random Access Memory (RAM)
A temporary holding area for data, application program instructions, and the operating system As you type, characters are held in RAM
RAM is primary storage (main memory) Measured in megabytes (MB) or gigabytes (GB)
Today’s computers have between 256 MB and 2 GB of RAM depending on software you use You can purchase additional RAM A computer can use disk storage to simulate RAM. This is called
virtual memory Not as fast as RAM
Types of RAM RAM components vary in speed, technology,
and configuration SDRAM (Synchronous Dynamic RAM) RDRAM (Rambus Dynamic RAM) DDR DDR2 DDR3
Speed is measured in nanoseconds. 1 nanosecond (ns) is 1 billionth of a second It can also be expressed in MHz (millions of cycles per
second)
Other Types of Memory Read-Only Memory (ROM)
Type of memory circuitry that holds the computer’s startup routine
Permanent and non-volatile Only way to change the instructions on a ROM chip is to
replace the chip Additionally, a computer needs a semi-permanent
way of keeping boot data CMOS memory holds data but requires very little power
to retain its contents Retains important computer settings after you turn the power off Can be run by a battery on the motherboard
Storage Devices
A storage medium is the disk, tape, CD, DVD, paper or other substance that contains data
A storage device is the mechanical apparatus that records and retrieves data from a storage medium
Types of storage devices Magnetic Storage Optical Storage Solid State Storage
Magnetic Storage
Stores data by magnetizing microscopic particles on the disk or tape surface
Contains a read-write head mechanism in the disk drive that reads and writes
magnetized particles that represent data Example
Hard Disk Drive [HDD] Floppy Disk Magnetic Tape
Magnetic Storage : HDD Working of a hard disk
Hard disk platter - a flat, rigid disk made of aluminum or glass and coated with magnetic iron oxide particles
Hard disk - one or more platters and their associated read-write heads Capacity up to 250 GB; Preferred type of main storage
Limitations Head crash - when a read-write head runs
into a dust particle or other contaminant on the disk Head crash damages some data
on disk Triggered by jarring the hard disk
while in use Not limited to hard disks R/W
Head
Platter
Optical Storage Stores data as microscopic light spots (lands) and
dark spots (pits) on the disk surface Advantage
Less susceptible to environmentaldamage than data recorded on magnetic media
Example CD [Capacity: 700 MB]
DVD [Capacity: 4.7 GB; Double Layered can store up to 8.5 GB]
Blue-Ray [Capacity: up to 50 GB]
Optical Storage : CD / DVD
Working of CD / DVD Recordable technology uses a laser to change
the color in a dye layer sandwiched beneath the clear plastic disk surface
Rewritable technology uses “phase change” technology to alter a crystal structure on the disk surface
Slower than hard disk Not a suitable replacement for hard disk yet
Solid State Storage Stores data in a non-volatile, erasable, low-power chip Some solid state storage requires a device called a
card reader to transfer data to or from a computer Advantage
Provides faster access to data than magnetic or optical storage technology because it includes no moving parts
Portable Example
USB flash drive CompactFlash card
Moore’s Law:An Important Observation (-1-)
Moore's law describes a long-term trend in the history of computing hardware
Since the invention of the IC in 1958, the number of transistors that can be placed inexpensively on an IC has increased exponentially, doubling approximately every two years
Moore’s Law:An Important Observation (-2-)
References
Computer Concepts, by Parsons & Oja [Chapters 2]
http://en.wikipedia.org/wiki/ASCII http://en.wikipedia.org/wiki/Moore's_law