Upload
mayor-parashar
View
227
Download
4
Embed Size (px)
DESCRIPTION
Data representation
Citation preview
1
Data Representations
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.
3
Binary system ( 0=OFF and 1=ON)
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.
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
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
• 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
8
• Memory Devices
(RAM,ROM,PROM,EPROM)
Memory
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
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.
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)
• 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
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.
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.
• Types of ROMs
– Programmable ROM (PROM)
– Erasable programmable ROM (EPROM)
– Electrically erasable PROM (EEPROM)
15
Helps speed computer processes by storing frequently used instructions and data.
Also called memory cache.
16
3.3.4 Cache
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)
18
19
Storage
20
What is storage?
Storage medium is physical material used for storage Holds data, instructions, and information for future use
Also called secondary storage
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
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
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
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
25
4.2.2 Hard Disks
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
• What are tracks and sectors?
Trackis narrow
recording bandthat forms fullcircle on disk
Sector stores up to512 bytes
of data
27
28
Sectors and Clusters
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.
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
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.
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)
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