33
1 Data Representations

2 Data Representation, Memory & Secondary Storage Devices

Embed Size (px)

DESCRIPTION

Data representation

Citation preview

Page 1: 2 Data Representation, Memory & Secondary Storage Devices

1

Data Representations

Page 2: 2 Data Representation, Memory & Secondary Storage Devices

2

Data Representations

3.1 Bit & Byte•Bit – represent each 0 and 1 in binary system. Bit lower case 'b' . •Byte - to represent letters, numbers and special characters, bits are

combined into groups.8 bits 1 byte1 byte represents one character or letter or value (Letter ‘Y’)8 bits can represent 256 different data because, 28 = 256.

3.2 Popular coding schemes to represent data • ASCII ( American Standard Code for Information

Interchange) - pronounced ask-ee.

• EBCDIC (Extended Binary Coded Decimal Interchange Code) - pronounced eb-see-dic.

Page 3: 2 Data Representation, Memory & Secondary Storage Devices

3

Binary system ( 0=OFF and 1=ON)

Page 4: 2 Data Representation, Memory & Secondary Storage Devices

How is a letter converted to binary form and back?

4

Step 1.The user presses the capital letter D (shift+D key) on the keyboard.

Step 2.An electronic signal for the capital letter D is sent to the system unit.

Step 3.The signal for the capital letter D is converted to its ASCII binary code (01000100) and is stored in memory for processing.

Step 4.After processing, the binary code for the capital letter D is converted to an image, and displayed on the output device.

Page 5: 2 Data Representation, Memory & Secondary Storage Devices

5

Unit

Kilobyte (K, KB) - is about 1000B or to be exact 1024B                      Megabyte (M, MB) - is about 1 million bytes. Gigabytes (G, GB) - is about 1 billion bytes. Terabytes (T, TB) - represents about 1 trillion bytes

Example1 : convert 1GB to KB

Page 6: 2 Data Representation, Memory & Secondary Storage Devices

6

Binary Digit = 1 Bit 1 Nibble/ word = 4 Bits 1 Byte = 8 Bits 1 Kilobyte = 1024 Bytes 1 Megabyte = 1024 Kilobytes 1 Gigabyte = 1024 Megabytes 1 Terabyte = 1024 Gigabytes 1 Petabyte = 1024 Terabytes 1 Exabyte = 1024 Petabytes 1 Zettabyte = 1024 Exabytes 1 Yottabyte = 1024 Zettabytes 1 Brontobyte = 1024 Yottabytes 1 Geopbyte = 1024 Brontobytes

Page 7: 2 Data Representation, Memory & Secondary Storage Devices

• If half page of text is approximately 1KB, what is the size of a file with 2000 pages. Give your answer in MB.

7

Now you try…

Can you solve this???

1 page = 2kb2000 pages = 2kb x 2000 = 4000 kb

4000 kb = 4000 / 1024 = 3.9 MB

Page 8: 2 Data Representation, Memory & Secondary Storage Devices

8

• Memory Devices

(RAM,ROM,PROM,EPROM)

Memory

Page 9: 2 Data Representation, Memory & Secondary Storage Devices

99

Types of System Unit MemoryTypes of System Unit Memory

volatile memoryLoses its contents when

computer's poweris turned off

nonvolatile memory

Does NOT lose its contents when

computer’s power is turned off

Page 10: 2 Data Representation, Memory & Secondary Storage Devices

10

Main Memory (RAM)Main Memory (RAM)Also known as primary storage, internal memory, random access memory (RAM) or memory . Is a working storage with following tasks : It holds data for processing Holds instructions to process data Holds data after it is processed, waiting to be sent to an

output or secondary storage device Its content are temporary / volatile . Size determines total size of programs and data files that the computer can work at any time. More memory more data faster.

Page 11: 2 Data Representation, Memory & Secondary Storage Devices

What are two basic types of RAM chips?

11

Must be Must be refreshedrefreshedconstantlyconstantly

Do not have toDo not have tobe refreshedbe refreshedas often asas often as

DRAMDRAM

Most Most common common

typetype

Faster and Faster and more reliable more reliable than DRAM than DRAM

chipschips

Dynamic Dynamic RAM RAM (DRAM)(DRAM)

Static Static RAM RAM (SRAM) (SRAM)

Page 12: 2 Data Representation, Memory & Secondary Storage Devices

• Summary:1. SRAM is static (Don’t refreshed periodically) while DRAM is Dynamic (refreshed

periodically)

2. SRAM consists of Transistor while DRAM made up of Transistors & Capacitor

3. SRAM consumes less power than DRAM

4. SRAM is more expensive than DRAM

5. SRAM is faster compared to DRAM

6. Cheaper DRAM is used in main memory while SRAM is commonly used in cache memory

12

Page 13: 2 Data Representation, Memory & Secondary Storage Devices

13

Read-only memory (ROM) • Contains programs and data that are permanently

recorded at the factory. • Can be read and used, but cannot be changed by

the user.• ROM is nonvolatile.

Page 14: 2 Data Representation, Memory & Secondary Storage Devices

14

CMOS • To store information about the computer such as:

• The type of disk drives, keyboard and monitor.

• The current date and time, and other startup information.

• Use battery power to retain information even when the power to the computer is turned off.

Page 15: 2 Data Representation, Memory & Secondary Storage Devices

• Types of ROMs

– Programmable ROM (PROM)

– Erasable programmable ROM (EPROM)

– Electrically erasable PROM (EEPROM)

15

Page 16: 2 Data Representation, Memory & Secondary Storage Devices

Helps speed computer processes by storing frequently used instructions and data.

Also called memory cache.

16

3.3.4 Cache

Page 17: 2 Data Representation, Memory & Secondary Storage Devices

17

4.1What is USB?

It has “hot swap” features – you don’t

have to reboot the system

USB is plug and play

USB (universal serial bus) port can connect up to 127 different peripherals together with a single connector type (USB hub)

Page 18: 2 Data Representation, Memory & Secondary Storage Devices

18

Page 19: 2 Data Representation, Memory & Secondary Storage Devices

19

Storage

Page 20: 2 Data Representation, Memory & Secondary Storage Devices

20

What is storage?

Storage medium is physical material used for storage Holds data, instructions, and information for future use

Also called secondary storage

Page 21: 2 Data Representation, Memory & Secondary Storage Devices

21

Storage capacity / size High capacity storage devices are required for many

sophisticated programs and large databases. Speed

People prefer whichever that is fast, but the problem is, it will cost more. The fastest storage is RAM Hard Disk CD USB Flash Drive, Floppy and Magnetic Tape. The speed is usually measured by access time.

Access time Refers to the average time needed to locate data on the

medium. Measured in ms for secondary storage, ns for RAM.

Cost The faster the storage device , the more expensive it is.

4.1 Criteria for rating secondary storage

Page 22: 2 Data Representation, Memory & Secondary Storage Devices

4.2.1 DiskettesA removable round, flat piece

of Mylar plastic that stores data and programs.

Sizes of diskettes 3 ½-inches

shutter

shell

liner

magneticcoating

flexible thin film

metal hub

Page 23: 2 Data Representation, Memory & Secondary Storage Devices

Disk drive - device that holds, spins and reads data from and writes data to a diskette.

A diskette is inserted into a slot, called the drive gate or drive door.

4.2.1 Diskettes

Page 24: 2 Data Representation, Memory & Secondary Storage Devices

24

4.2.2 Hard DisksWhat is a hard disk?

High-capacity storage Consists of several inflexible,

circular platters that store items electronically

Components enclosed in airtight, sealed case for protection

hard disk mountedin system unit

Page 25: 2 Data Representation, Memory & Secondary Storage Devices

25

4.2.2 Hard Disks

Page 26: 2 Data Representation, Memory & Secondary Storage Devices

26

4.2.2 Hard Disks What is a head crash?

Occurs when read/write head touches platter surface Spinning creates cushion of air that floats read/write

head above platter Clearance between head and platter is approximately two-millionths of an inch A smoke particle, dust particle, or human hair could render drive unusable

Page 27: 2 Data Representation, Memory & Secondary Storage Devices

• What are tracks and sectors?

Trackis narrow

recording bandthat forms fullcircle on disk

Sector stores up to512 bytes

of data

27

Page 28: 2 Data Representation, Memory & Secondary Storage Devices

28

Sectors and Clusters

Page 29: 2 Data Representation, Memory & Secondary Storage Devices

29

4.3 Optical Disk Storage

• Is a removable disk on which data is written and read through the use of laser beams.

• A high-power laser beam is used to represent data by burning tiny pits into the surface of a hard-plastic disk.

• To read data, a low-powered laser light scans the disk surface

• Main types of optical storage are :CD-R, CD-RW and DVD.

Page 30: 2 Data Representation, Memory & Secondary Storage Devices

laserdiode

laserdiode

prism prismlight-

sensingdiode

light-sensingdiode

0 1

lens lenspit land

disc label

Step 1.Laser diode shines a light beam towarddisc.

Step 2.If light strikesa pit, it scatters. If light strikes a land, it is reflected back toward diode.

Step 3.Reflected light is deflected to alight-sensing diode, which sends digital signals of 1 to computer. Absence of reflected light is read as digital signal of 0.

30

4.3 Optical Disk Storage

Page 31: 2 Data Representation, Memory & Secondary Storage Devices

31

• CD-R (compact disc - recordable) • Permits writing on optical disk where CD-R drive, CD-R

disks and accompanying software are required. Once written, data can't be modified

• CD-RW (rewritable) • Erasable disc allows you write on it multiple times. To

write on CD-RW, you must use CD-RW drive • DVD-ROM (Digital video disc-ROM)

• Looks like an audio compact disk but can store 4.7 to 17 GB, allowing great data storage, studio-quality video images, and theater-like surround sound.

Page 32: 2 Data Representation, Memory & Secondary Storage Devices

32

4.4 Magnetic Tape Storage One of the first storage used with mainframe computer. It's a thin plastic tape that has been coated with substance that can be magnetized Mainly used for backup not used for primary method of storage because it is a sequential- access media (slow to access data)

Page 33: 2 Data Representation, Memory & Secondary Storage Devices

How is data stored on a tape? Sequential access

Reads and writes data consecutively, like music tape Random access

Used on hard disks, CDs, and DVDs — which can locate particular item immediately

04/27/23 33

4.4 Magnetic Tape Storage