more on data storage and representation csc 2001

29
More on data storage and representation CSC 2001

Upload: warren-marshall

Post on 21-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: More on data storage and representation CSC 2001

More on data storage and representation

More on data storage and representation

CSC 2001CSC 2001

Page 2: More on data storage and representation CSC 2001

OverviewOverview

MemoryGatesStorage methodsMemory organization

Basic architectureLong bit streams

MemoryGatesStorage methodsMemory organization

Basic architectureLong bit streams

Page 3: More on data storage and representation CSC 2001

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

Page 4: More on data storage and representation CSC 2001

AND, OR, XOR, & NOT gates

AND, OR, XOR, & NOT gates

Page 5: More on data storage and representation CSC 2001

A simple flip-flop circuitA simple flip-flop circuit

Page 6: More on data storage and representation CSC 2001

Setting the output of flip-flop

Setting the output of flip-flop

Page 7: More on data storage and representation CSC 2001

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)

Page 8: More on data storage and representation CSC 2001

Bits, bytes, and beyondBits, bytes, and beyond

1 byte = 8 bits1KB = 1024 (210) bytes

1MB = 1048576 (220) bytes1GB = 1073741824 (230) bytes

Page 9: More on data storage and representation CSC 2001

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

Page 10: More on data storage and representation CSC 2001

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

Page 11: More on data storage and representation CSC 2001

Memory organizationMemory organization

10101010

11100011

11000011

00101010

01111011

00001101

01001101

01111011

11011101

10110110

00100100

00000000

Page 12: More on data storage and representation CSC 2001

ROM vs. RAMROM vs. RAM

Read Only Memory

Random Access Memory

Read Only Memory

Random Access Memory

Page 13: More on data storage and representation CSC 2001

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

Page 14: More on data storage and representation CSC 2001

Hard disksHard disks

Page 15: More on data storage and representation CSC 2001

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

Page 16: More on data storage and representation CSC 2001

File storage and retrievalFile storage and retrieval

physical vs. logical recordsknowing where to lookdefragmentation

physical vs. logical recordsknowing where to lookdefragmentation

Page 17: More on data storage and representation CSC 2001

Basic architectureBasic architecture

Inputdevice Output

device

Auxiliarystoragedevice

Central Processing Unit

Control Unit

Arithmetic/logicunit

Memory unit

Page 18: More on data storage and representation CSC 2001

Basic architectureBasic architecture

Inputdevice Output

device

Auxiliarystoragedevice

Central Processing Unit

Control Unit

Arithmetic/logicunit

Memory unit

Input device

mouse, keyboard, modem

Page 19: More on data storage and representation CSC 2001

Basic architectureBasic architecture

Inputdevice Output

device

Auxiliarystoragedevice

Central Processing Unit

Control Unit

Arithmetic/logicunit

Memory unit

Output device

screen, printer, modem

Page 20: More on data storage and representation CSC 2001

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

Page 21: More on data storage and representation CSC 2001

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)

Page 22: More on data storage and representation CSC 2001

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

Page 23: More on data storage and representation CSC 2001

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.

Page 24: More on data storage and representation CSC 2001

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.

Page 25: More on data storage and representation CSC 2001

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)

Page 26: More on data storage and representation CSC 2001

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

Page 27: More on data storage and representation CSC 2001

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

Page 28: More on data storage and representation CSC 2001

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

Page 29: More on data storage and representation CSC 2001

practice problemspractice problems

101101101101

A7D31C

101101101101

A7D31C