View
215
Download
0
Category
Preview:
Citation preview
More on data storage and representation
More on data storage and representation
CSC 2001CSC 2001
OverviewOverview
MemoryGatesStorage methodsMemory organization
Basic architectureLong bit streams
MemoryGatesStorage methodsMemory organization
Basic architectureLong bit streams
GatesGates
… a device that produces the output of a Boolean operation when given the operation’s input values
… a device that produces the output of a Boolean operation when given the operation’s input values
AND, OR, XOR, & NOT gates
AND, OR, XOR, & NOT gates
A simple flip-flop circuitA simple flip-flop circuit
Setting the output of flip-flop
Setting the output of flip-flop
Storage techniquesStorage techniques
core (direction of magnetic field)capacitors (charged or discharged)flash memory (trapped electrons in
silicon dioxide) (full or empty)
core (direction of magnetic field)capacitors (charged or discharged)flash memory (trapped electrons in
silicon dioxide) (full or empty)
Bits, bytes, and beyondBits, bytes, and beyond
1 byte = 8 bits1KB = 1024 (210) bytes
1MB = 1048576 (220) bytes1GB = 1073741824 (230) bytes
Anatomy of a byteAnatomy of a byte
0 1 0 1 1 0 1 00 1 0 1 1 0 1 0high-order end low-order end
most significant bit least significant bit
Memory organizationMemory organization
memory cellscells contain chunks of memory
(often 1 byte)have addresses (sequentially
numbered)information can span multiple cells
memory cellscells contain chunks of memory
(often 1 byte)have addresses (sequentially
numbered)information can span multiple cells
Memory organizationMemory organization
10101010
11100011
11000011
00101010
01111011
00001101
01001101
01111011
11011101
10110110
00100100
00000000
ROM vs. RAMROM vs. RAM
Read Only Memory
Random Access Memory
Read Only Memory
Random Access Memory
Mass storageMass storage
Auxiliary storage devicesmagnetic disks
hard drives, Zip diskssingle vs. multiple disks
read/write headtracks/cylinders/sectors
formattingperformance
seek time, latency, access time, transfer rate
Auxiliary storage devicesmagnetic disks
hard drives, Zip diskssingle vs. multiple disks
read/write headtracks/cylinders/sectors
formattingperformance
seek time, latency, access time, transfer rate
Hard disksHard disks
More mass storageMore mass storage
Compact disks (CD-ROMs)single spiral-shaped track
DVD-ROMsmultiple, semitransparent layers
Magnetic tapehigh capacity, cheap, reliableslow access time
Compact disks (CD-ROMs)single spiral-shaped track
DVD-ROMsmultiple, semitransparent layers
Magnetic tapehigh capacity, cheap, reliableslow access time
File storage and retrievalFile storage and retrieval
physical vs. logical recordsknowing where to lookdefragmentation
physical vs. logical recordsknowing where to lookdefragmentation
Basic architectureBasic architecture
Inputdevice Output
device
Auxiliarystoragedevice
Central Processing Unit
Control Unit
Arithmetic/logicunit
Memory unit
Basic architectureBasic architecture
Inputdevice Output
device
Auxiliarystoragedevice
Central Processing Unit
Control Unit
Arithmetic/logicunit
Memory unit
Input device
mouse, keyboard, modem
Basic architectureBasic architecture
Inputdevice Output
device
Auxiliarystoragedevice
Central Processing Unit
Control Unit
Arithmetic/logicunit
Memory unit
Output device
screen, printer, modem
Basic architectureBasic architecture
Inputdevice Output
device
Auxiliarystoragedevice
Central Processing Unit
Control Unit
Arithmetic/logicunit
Memory unit
CPU
Control Unit, ALU
MHz (106), GHz (109)
32-bit, 64-bit
Basic architectureBasic architecture
Inputdevice Output
device
Auxiliarystoragedevice
Central Processing Unit
Control Unit
Arithmetic/logicunit
Memory unit
Memory unit
RAM
bits, bytes (8 bits), MB (220 bytes), GB (230 bytes)
Basic architectureBasic architecture
Inputdevice Output
device
Auxiliarystoragedevice
Central Processing Unit
Control Unit
Arithmetic/logicunit
Memory unit
Aux storage unit
MB, GB
Zip disks, CD-ROM, DVD-ROM, tapes, hard drives
Basic architectureBasic architecture
We’ll return to this in chapter 2For now, understand that the
computer has to be able to store bits, that there are different kinds of memory, and different purposes for these different kinds of memory.
We’ll return to this in chapter 2For now, understand that the
computer has to be able to store bits, that there are different kinds of memory, and different purposes for these different kinds of memory.
Data representationData representation
Translating data into bitsCharacters and numbers
Large amount of data imply lots of bits.Working with long strings of 0s and
1s quickly becomes cumbersome.
Translating data into bitsCharacters and numbers
Large amount of data imply lots of bits.Working with long strings of 0s and
1s quickly becomes cumbersome.
Dealing with long bit streams
Dealing with long bit streams
Other (more concise) notation is usefulhexadecimal
base 16need symbols for numbers 10-15
(because 1016 = 1610)
Other (more concise) notation is usefulhexadecimal
base 16need symbols for numbers 10-15
(because 1016 = 1610)
Hexadecimal (0-7)Hexadecimal (0-7)base 2 base 10 base 160000 0 00001 1 10010 2 20011 3 30100 4 40101 5 50110 6 60111 7 7
base 2 base 10 base 160000 0 00001 1 10010 2 20011 3 30100 4 40101 5 50110 6 60111 7 7
Hexadecimal (8-15)Hexadecimal (8-15)base 2 base 10 base 161000 8 81001 9 91010 10 A1011 11 B1100 12 C1101 13 D1110 14 E1111 15 F
base 2 base 10 base 161000 8 81001 9 91010 10 A1011 11 B1100 12 C1101 13 D1110 14 E1111 15 F
binary <-> hex conversionbinary <-> hex conversion
Think in groups of four bits (start from right)
Pad with 0 on left if needed01001000 = 0100 1000 = 4811011011 = 1101 1011 = DB
AF = 1010 1111 = 10101111E7 = 1110 0111 = 11100111
Think in groups of four bits (start from right)
Pad with 0 on left if needed01001000 = 0100 1000 = 4811011011 = 1101 1011 = DB
AF = 1010 1111 = 10101111E7 = 1110 0111 = 11100111
practice problemspractice problems
101101101101
A7D31C
101101101101
A7D31C
Recommended