21
Binary and Hard Binary and Hard Disk Disk Aslin Aslin Izmitli Izmitli PEOPLE Program PEOPLE Program

Binary and Hard Disk

  • Upload
    woods

  • View
    58

  • Download
    2

Embed Size (px)

DESCRIPTION

PEOPLE Program. Binary and Hard Disk. Aslin Izmitli. How do computers store numbers Hard drive and its components Binary numbers. Outline. How do Computers Store Numbers. Computers are constructed of digital electronics => two states: “on” “off” - PowerPoint PPT Presentation

Citation preview

Page 1: Binary and Hard Disk

Binary and Hard DiskBinary and Hard Disk

Aslin IzmitliAslin Izmitli

PEOPLE ProgramPEOPLE Program

Page 2: Binary and Hard Disk

OutlineOutline

How do computers store numbersHow do computers store numbers

Hard drive and its componentsHard drive and its components

Binary numbersBinary numbers

Page 3: Binary and Hard Disk

How do Computers Store NumbersHow do Computers Store Numbers

Computers are constructed of digital electronics => two Computers are constructed of digital electronics => two states: “on” “off”states: “on” “off”

Binary number system consists of 0 and 1 onlyBinary number system consists of 0 and 1 only

On-off patterns are used to encode numbers using binary On-off patterns are used to encode numbers using binary number systemnumber system

Most computer electronicsMost computer electronics Voltage levelsVoltage levels

CD-ROMCD-ROM Microscopic dark spots on disk surfaceMicroscopic dark spots on disk surface

Hard diskHard disk MagnetismMagnetism

Computer memoryComputer memory Electric charges on capacitorsElectric charges on capacitors

Page 4: Binary and Hard Disk

Cassette Tape vs. Hard DiskCassette Tape vs. Hard DiskThey use the same magnetic recording techniquesThey use the same magnetic recording techniques

Easily erased-writtenEasily erased-written ““remember” for many yearsremember” for many years

Cassette TapeCassette Tape Hard DiskHard Disk

Recording materialRecording material On plastic stripOn plastic strip On high-precision On high-precision aluminum or glass diskaluminum or glass disk

To get to a pointTo get to a point Fast forward (several Fast forward (several minutes)minutes)

You can move instantlyYou can move instantly

Read-write headRead-write head Touches the tapeTouches the tape ““flies” over the diskflies” over the disk

Move – SpinMove – Spin 2 inch/second2 inch/second 3000 inch/second 3000 inch/second (170mph)(170mph)

Info storageInfo storage Magnetic domainsMagnetic domains Extremely smaller Extremely smaller magnetic domainsmagnetic domains

Page 5: Binary and Hard Disk

Hard DriveHard Drive

Hard disks are used in all desktop computers, servers, Hard disks are used in all desktop computers, servers, super computers etc. They are also VCR type devices super computers etc. They are also VCR type devices or video recorders that use hard drives instead of tapeor video recorders that use hard drives instead of tape

They store changing digital information in a relatively They store changing digital information in a relatively permanent form. They give computers the ability to permanent form. They give computers the ability to remember things when the power goes out. remember things when the power goes out.

Now see what we can find in a hard driveNow see what we can find in a hard drive (opening a hard disk ruins it!!)(opening a hard disk ruins it!!)

Page 6: Binary and Hard Disk

Electronic BoardElectronic Board

A hard drive is a sealed aluminum A hard drive is a sealed aluminum box with controller electronics box with controller electronics attached to one side. attached to one side.

The electronics are all contained on The electronics are all contained on a small board that detaches from a small board that detaches from the rest of the drive the rest of the drive

The electronics The electronics

control the read/write mechanism control the read/write mechanism and the motor that spins the platters.and the motor that spins the platters.

Magnetic domains -> bytes (reading)Magnetic domains -> bytes (reading)

Bytes -> Magnetic domains (writing)Bytes -> Magnetic domains (writing)

Page 7: Binary and Hard Disk

Beneath the BoardBeneath the Board

the connections for the connections for the motor that spins the motor that spins the plattersthe platters

a highly-filtered vent a highly-filtered vent hole that lets internal hole that lets internal and external air and external air pressures equalize pressures equalize

Page 8: Binary and Hard Disk

Removing the cover from the driveRemoving the cover from the drive

The The plattersplatters typically spin at 3,600 or 7,200 rpm when the drive is operating typically spin at 3,600 or 7,200 rpm when the drive is operating are manufactured to amazing tolerances and are mirror-smooth are manufactured to amazing tolerances and are mirror-smooth

The The armarm holds the read/write heads and is controlled by the mechanism in the upper-holds the read/write heads and is controlled by the mechanism in the upper-

left cornerleft corner is able to move the heads from the hub to the edge of the driveis able to move the heads from the hub to the edge of the drive extremely light and fast, can move from hub to edge and back up to 50 times extremely light and fast, can move from hub to edge and back up to 50 times

per secondper second

Page 9: Binary and Hard Disk

Mechanism moving the armsMechanism moving the arms

Incredibly fast and precise. Can be constructed using Incredibly fast and precise. Can be constructed using high-speed linear motorhigh-speed linear motor

Many derives use a ‘voice coil’ approach – the same Many derives use a ‘voice coil’ approach – the same technique used to move the cone of a speaker von your technique used to move the cone of a speaker von your stereostereo

Page 10: Binary and Hard Disk

Platters and HeadsPlatters and Heads

Multiple platters to Multiple platters to increase information increase information storage capacitystorage capacity

This drive has three This drive has three platters and six platters and six read/write heads read/write heads

Page 11: Binary and Hard Disk

Storing the DataStoring the DataData is stored on platter surfaceData is stored on platter surface

TracksTracks -> concentric cycles -> concentric cycles SectorsSectors -> pie-shaped wedges on a track -> pie-shaped wedges on a track

A sector contains a fixed number of bytes A sector contains a fixed number of bytes (256, 512 etc.)(256, 512 etc.)

Sectors are often grouped together into Sectors are often grouped together into clustersclusters

Low level formattingLow level formatting The drive establishes tracks and sectors on the platterThe drive establishes tracks and sectors on the platter Prepares the drive to store blocks of bytesPrepares the drive to store blocks of bytes

High level formattingHigh level formatting Writes the file-storage structures, like file allocation table into sectorsWrites the file-storage structures, like file allocation table into sectors Prepares the drive to hold filesPrepares the drive to hold files

Page 12: Binary and Hard Disk

How Does Binary Work?How Does Binary Work?

Decimal number system Decimal number system 10 digits (0 to 9)10 digits (0 to 9) Add a second column worth 10 times the Add a second column worth 10 times the

value of the first columnvalue of the first column

Expanded notation:Expanded notation: 3 x 100 + 6 x 10 + 5 = 3653 x 100 + 6 x 10 + 5 = 365 1 x 1000 + 0 x 100 + 3 x 10 + 2 = 1032 1 x 1000 + 0 x 100 + 3 x 10 + 2 = 1032

…… 10001000 100100 1010 11

Page 13: Binary and Hard Disk

Binary Number SystemBinary Number System

Only contains two digits: 0,1Only contains two digits: 0,1Add a second column worth 2 times Add a second column worth 2 times the value of the first columnthe value of the first column

To convert a number from binary to To convert a number from binary to decimal, use expanded notation:decimal, use expanded notation:101101101101 = =

11x32 +x32 + 0 0x16 +x16 + 1 1x8 + x8 + 11x4 + x4 + 00x2 + x2 + 11x1x1 = 45= 45

      0

      1

    1 0

    1 1

  1 0 0

  1 0 1

  1 1 0

  1 1 1

1 0 0 0

1 0 0 1

…… 3232 1616 88 44 22 11

Page 14: Binary and Hard Disk

Binary Binary Decimal Decimal

Any desired amount Any desired amount can be represented can be represented using 1 and 0.using 1 and 0.

ExamplesExamples 1 == 00011 == 0001 3 == 00113 == 0011 6 == 01106 == 0110

1 1 a power of 2 a power of 20 0 zero zero

ExamplesExamples 0001 0001 2^0 = 1 2^0 = 1 0010 0010 2^1 = 2 2^1 = 2 0100 0100 2^2 = 4 2^2 = 4 1000 1000 2^3 = 8 2^3 = 8

0101 = 0 + 4 + 0 + 1 = 50101 = 0 + 4 + 0 + 1 = 51010 = 8 + 0 + 2 + 0 = 101010 = 8 + 0 + 2 + 0 = 100111 = 0 + 4 + 2 + 1 = 70111 = 0 + 4 + 2 + 1 = 7

Page 15: Binary and Hard Disk

Larger NumbersLarger Numbers

Numbers from 1 to 15Numbers from 1 to 150000 = 00000 = 0 0100 = 40100 = 4 1000 = 81000 = 8 1100 = 121100 = 120001 = 10001 = 1 0101 = 50101 = 5 1001 = 91001 = 9 1101 = 131101 = 130010 = 20010 = 2 0110 = 60110 = 6 1010 = 101010 = 10 1110 = 141110 = 140011 = 30011 = 3 0111 = 70111 = 7 1011 = 111011 = 11 1111 = 151111 = 15

Bigger whole numbers Bigger whole numbers more bits more bits more places in binary more places in binary

numbernumber

10000101 = 128 + 0 + 0 + 0 + 0 + 4 + 0 + 1 = 13310000101 = 128 + 0 + 0 + 0 + 0 + 4 + 0 + 1 = 133

This is 8 bits == 1 byteThis is 8 bits == 1 byte

Page 16: Binary and Hard Disk

Larger NumbersLarger Numbers

10000101 = 128 + 0 + 0 + 0 + 0 + 4 + 1 = 13310000101 = 128 + 0 + 0 + 0 + 0 + 4 + 1 = 133

This is 8 bits == 1 byteThis is 8 bits == 1 byte

Alphanumeric characters are represented with 8 bitsAlphanumeric characters are represented with 8 bits

A == 65 == 01000001A == 65 == 01000001

Kilobyte = 1024 bytes (1024 = 2^10)Kilobyte = 1024 bytes (1024 = 2^10)

Megabyte ~ a million bytesMegabyte ~ a million bytes

Gigabyte = 1000 megabytesGigabyte = 1000 megabytes

Page 17: Binary and Hard Disk

Typical SizesTypical Sizes

Typical RAM is 512 - 1024 megabyteTypical RAM is 512 - 1024 megabyteTypical Hard disks are 40 – 80 gigabyteTypical Hard disks are 40 – 80 gigabyte

1 byte == 1 character1 byte == 1 character hard disk might hold 80000 million characters hard disk might hold 80000 million characters

~ 15000 million words of raw text~ 15000 million words of raw text

Real numbers, fractions, very large numbersReal numbers, fractions, very large numbers floating point arithmeticfloating point arithmetic

Page 18: Binary and Hard Disk

Binary numbers are great!Binary numbers are great!

Simple to work withSimple to work with No big addition and multiplication tables to No big addition and multiplication tables to

learnlearn Just do same things over and over very fastJust do same things over and over very fast

Just use two values of voltage, magnetism Just use two values of voltage, magnetism or other signalor other signal Hardware easier to design and more resistantHardware easier to design and more resistant

Page 19: Binary and Hard Disk

ASCII TableASCII Table

Write your name in ASCII TableWrite your name in ASCII Table

Password 5 letter wordPassword 5 letter word

Page 20: Binary and Hard Disk

Binary AdditionBinary Addition

Decimal SystemDecimal System Sum >= 10 Sum >= 10 add 1 to the column on the left add 1 to the column on the left

Binary SystemBinary System Sum >= 2 Sum >= 2 add 1 to the column on the left add 1 to the column on the left Example: 1+1+1 = 11Example: 1+1+1 = 11

1+1+1+1 = 1001+1+1+1 = 100

110101110101

+ 11110+ 11110

----------------------------

10100111010011

Page 21: Binary and Hard Disk

Binary AdditionBinary Addition

Second WaySecond Way

Convert the numbers to decimalConvert the numbers to decimal Add the decimal numbersAdd the decimal numbers Convert the sum to binaryConvert the sum to binary