introduction to computers rabie a. ramadan, phd. 2 class information website ses/2012/intro
TRANSCRIPT
The Computer Evolution
Mainframe
Computer, 1960
The P
C, 198
0
Mob
ile
Compu
ter 1
990
Senso
r
Platfo
rms 2
000
Smar
t Dus
t …
Mini-Computer, 1
970
Moore’s Law
1965 prediction by Intel cofounder Gordon Moore:
The number of transistors that can be built on the same size piece of silicon will double every 18 months
year
log
(p
eop
le p
er
com
pu
ter)
Streaming Data to/from the
Physical World
Excerpted from ‘The Mote Revolution: Low Power Wireless Sensor Network’, UCB, 2004.
Bell’s Law: New computing class every 10 years
Ubiquitous Computing: A Vision Ahead of its Time
The most profound technologies are those that disappear. They weave themselves into the fabric of everyday life until they are indistinguishable from it.
Mark Weiser, 1991
Ports
CPU
RAM
Diskcontroller
Graphicscard
Soundcard
Networkcard
Printer
Mouse
Keyboard
Modem Monitor
Speakers
bus
Computer
BIOS CHIP
A BIOS chip (Basic Input Output System) is a very important computer component.
In simple terms, the BIOS chip wakes up the computer when you turn it on and reminds it what parts it has and what they do!
31
Memory -- "How the processor stores and uses immediate data“
RAM - Random Access Memory• The main 'working' memory used by the computer.
• When the operating system loads from disk when you first switch on the computer, it is copied into RAM.
• As a rough rule, a Microsoft Windows Microsoft Windows based computer will operate faster if you install more RAM. Data and programs stored in RAM are volatilevolatile (i.e. the information is lost when you switch off the computer).
32
Memory
ROM – Read Only Memory• Read Only Memory (ROM) as the name suggests is a
special type of memory chip that holds software that can be read but not written to.
• A good example is the ROM-BIOS chip, which contains read only software.
• Often network cards and video cards cards and video cards also contain ROM chips.
Bytes, Kilobytes,Megabytes and Gigabytes
Byte 8 Bits=1 byte KB Kilobyte=1,000 bytes MB Megabyte=1,000,000
(1 million) bytes GB Gigabyte=1,000,000,000
(1 billion) bytes
Number Systems The on and off states of the capacitors in RAM can be
thought of as the values 1 and 0, respectively.
Therefore, thinking about how information is stored in RAM requires knowledge of the binary (base 2) binary (base 2) number system.number system.
Let’s review the decimal (base 10) number system decimal (base 10) number system first.
36
The Decimal Number System
37
• The decimal number system is a positional number system.
• Example: 5 6 2 1 1 X 100 = 1 103 102 101 100 2 X 101 = 20 6 X 102 = 600 5 X 103 = 5000
The Decimal Number System (con’t)
38
• The decimal number system is also known as base 10.
• The values of the positions are calculated by taking 10 to some power.
• Why is the base 10 for decimal numbers?o Because we use 10 digits, the digits 0 through 9.
The Binary Number System
39
• The binary number system is also known as base 2.
• The values of the positions are calculated by taking 2 to some power.
• Why is the base 2 for binary numbers?o Because we use 2 digits, the digits 0 and 1.
The Binary Number System (con’t)
40
• The binary number system is also a positional numbering system.
• Instead of using ten digits, 0 - 9, the binary system uses only two digits, 0 and 1.
• Example of a binary number and the values of the positions: 1 0 0 1 1 0 1 26 25 24 23 22 21 20
Converting from Binary to Decimal
41
1 0 0 1 1 0 1 1 X 20 = 1 26 25 24 23 22 21 20 0 X 21 = 0 1 X 22 = 4 20 = 1 24 = 16 1 X 23 = 8 21 = 2 25 = 32 0 X 24 = 0 22 = 4 26 = 64 0 X 25 = 0 23 = 8 1 X 26 = 64
7710
Converting from Binary to Decimal (con’t)
Practice conversions:
Binary Decimal
11101
1010101
100111
42
Converting From Decimal to Binary (con’t)
43
• Make a list of the binary place values up to the number being converted.
• Perform successive divisions by 2, placing the remainder of 0 or 1 in each of the positions from right to left.
• Continue until the quotient is zero.
• Example: 4210
25 24 23 22 21 20
32 16 8 4 2 1
1 0 1 0 1 0
Decimal ‒to‒ Binary ConversionThe Process : Successive Division
a)Divide the Decimal Number by 2; the remainder is the LSB of Binary Number .
b) If the quotation is zero, the conversion is complete; else repeat step (a) using the quotation as the Decimal Number. The new remainder is the next most significant bit of the Binary Number.
Example:
Convert the decimal number 610 into its binary equivalent.
Bit tSignifican Most 1 r 0 1 2
1 r 1 3 2
Bit tSignifican Least 0 r 3 6 2
610 = 1102
44
Dec → Binary : Example #1Example:
Convert the decimal number 2610 into its binary equivalent.
Solution:
LSB 0 r 13 26 2
MSB 1 r 0 1 2
1 r 6 13 2
0 r 3 6 2
1 r 1 3 2
2610 = 110102
46
Dec → Binary : Example #2Example: Convert the decimal number 4110 into its binary equivalent.
Solution:
LSB 1 r 20 41 2
0 r 10 20 2
0 r 5 10 2
1 r 2 5 2
4110 = 1010012
MSB 1 r 0 1 2
0 r 1 2 2
48
Working with Large Numbers
51
0 1 0 1 0 0 0 0 1 0 1 0 0 1 1 1 = ?
• Humans can’t work well with binary numbers; there are too many digits to deal with.
• Memory addresses and other data can be quite large. Therefore, we sometimes use the hexadecimal number system.
The Hexadecimal Number System
The hexadecimal number system is also known as base 16. The values of the positions are calculated by taking 16 to some power.
Why is the base 16 for hexadecimal numbers ?
• Because we use 16 symbols, the digits 0 to 9 and the letters A through F.
52
The Hexadecimal Number System (con’t)
Binary Decimal Hexadecimal Binary Decimal Hexadecimal
0 0 0 1010 10 A
1 1 1 1011 11 B
10 2 2 1100 12 C
11 3 3 1101 13 D
100 4 4 1110 14 E
101 5 5 1111 15 F
110 6 6
111 7 7
1000 8 8
1001 9 9
53
The Hexadecimal Number System (con’t)
Example of a hexadecimal number and the values of the positions:
3 C 8 B 0 5 1 166 165 164 163 162 161 160
54
Example of Equivalent Numbers
55
Binary: 1 0 1 0 0 0 0 1 0 1 0 0 1 1 12
Decimal: 2064710
Hexadecimal: 50A716
Notice how the number of digits gets smaller as the base increases.
Significant Digits
Binary: 11101101
Most significant digit Least significant digit
Hexadecimal: 1D63A7A
Most significant digit Least significant digit
Your turn
Convert the following number to Hex ?
0101 1010 1111
0101 0101 01012
10 0101 1010 1111 . 1011 1112 = 2 5 A F . B E16
Dec → Binary : More Examples
a) 1310 = ?
b) 2210 = ?
c) 4310 = ?
d) 15810 = ?
1 1 0 1 2
1 0 1 1 0 2
1 0 1 0 1 1 2
1 0 0 1 1 1 1 0 2
58
Binary Addition
4 Possible Binary Addition Combinations:
(1) 0 (2) 0
+0 +1
00 01
(3) 1 (4) 1
+0 +1
01 10
SumCarry
Note that leadingzeroes are frequently
dropped.
Types of Memory
Cache Memory• Serves as a buffer for frequently accessed data
• Small High Cost
RAM (Main Memory)• Stores programs and data that the computer needs when executing a
program
• Dynamic RAM (DRAM) • Uses Tiny Capacitors
• Needs to be recharged every few milliseconds to keep the stored data
• Static RAM (SRAM)• Holds its data as long as the power is on
• D Flip Flop
Types of Memory (Cont.) ROM
• Stores critical information necessary to operate the system.
• Hardwired can not be programmed
Programmable Read Only Memory (PROM)• Can be programmed once using appropriate equipment
Erasable PROM (EPROM) • Can be programmed with special tool
• It has to be totally erased to be reprogrammed
Electrical Erasable PROM (EEPROM) • No special tools required
• Can erase a portion
Memory Hierarchy
The idea • Hide the slower memory behind the fast memory
• Cost and performance play major roles in selecting the memory.
Hit Vs. Miss Hit
• The requested data resides in a given level of memory.
Miss• The requested data is not found in the given level of memory
Hit rate• The percentage of memory accesses found in a given level of
memory.
Miss rate• The percentage of memory accesses not found in a given level of
memory.
Hit Vs. Miss (Cont.)
Hit time• The time required to access the requested information in a given
level of memory.
Miss penalty• The time required to process a miss,
• Replacing a block in an upper level of memory,
• The additional time to deliver the requested data to the processor.
Miss Scenario
The processor sends a request to the cache for location X• if found cache hit
• If not try next level
When the location is found load the whole block into the cache • Hoping that the processor will access one of the neighbor
locations next.
• One miss may lead to multiple hits Locality Can we compute the average access time based on this
memory Hierarchy?
Average Access Time Assume a memory hierarchy with three levels (L1, L2, and L3)
What is the memory average access time?
h1 hit at L1 (1-h1) miss at L1t1 L1 access time
h2 hit at L2(1-h2) miss at L2t2 L2 access time
h3 hit at L3=100%(1-h3) miss at L3t3 L3 access time
Your Assignment
1. Convert the following numbers to binary : - 198- 2011- 11240
2. Convert the following binary numbers to Hex : - 1111111111111111- 101010101010101
68