CSCI130 - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

CSCI130

Description:

much slower and cheaper than main memory. Tapes, disks and CDs. Magnetic VS Optical ... They are sealed so that no dirt comes between R/W head and disk ... – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 25
Provided by: usersC1
Category:
Tags: cheaper | csci130 | dirt | than

less

Transcript and Presenter's Notes

Title: CSCI130


1
Lecture 4 (3.1-3.5)
  • CSCI130
  • Instructor Dr. Imad Rahal

2
Data Storage (3.1-3.3)
3
Overview of Computer Hardware
  • Quiz or team quiz
  • necessary components of a computer
  • CPU, Main memory
  • components needed for convenience
  • computer wont be very practical to use otherwise
  • Secondary/Auxiliary storage, I/O devices
  • CPU
  • Central Processing Unit
  • Single silicon chip with circuits attached to it
  • Known as microprocessor
  • Sits on a circuit board known as the motherboard

4
Overview of Computer Hardware
  • Main memory
  • Connects to the motherboard
  • Divided into two major parts
  • RAM --- Random Access Memory
  • memory registers which store data before/after
    CPU processing
  • Available for users and programs so store data in
    and read data from
  • Volatile --- does not persist when no electric
    power is supplied to its circuits
  • ROM --- Read Only Memory
  • Permanent
  • Holds programs that are vital for the operation
    of the computer
  • As the name indicates, can be read but never
    altered

5
Overview of Computer Hardware
  • Cache
  • A type of memory that sits between main memory
    and CPU
  • Faster, smaller and more expensive than main
    memory
  • Used a lot in mobile phones
  • Input devices
  • Takes data from the user and converts it into
    binary
  • Sends it to main memory
  • Mouse, touch screens, scanners, digital cameras,
    etc
  • Questions on output devices (printers and
    monitors), secondary storage (magnetic disks,
    tapes, and optical disks) or file management

6
Overview of Computer Hardware
  • Output devices
  • Devices such as monitors, speakers, printers, etc
  • Monitors
  • CRTs (cathode ray tubes) VS Flat-panel
  • CRTS are cheaper (4-8 times less) and more used
    with desktops
  • Three important monitor characteristics to watch
    out for
  • Resolution number pf pixels on the screen...the
    higher the better (640x480 to 1600x1200)
  • Dot pitch how close are the pixels to each
    otherthe closer the better (.2 or .3)
  • Refresh rate number of times per second that a
    new electric pulse is sent to each pixel to
    maintain the color from fading (70Hz or higher)

7
Overview of Computer Hardware
  • Printers
  • Laser VS ink-jet
  • Both use small dots to form images of characters
    and graphics being printed
  • Ink-jet however sprays smalls dots of liquid ink
    onto the page from a matrix of ink jets
  • Laser creates an image of the page to be printed
    on cylinder (photoreceptor drum) covered with
    magnetically charged toner (powder ink)
  • The image is created on the drum as a negative
    charge
  • Toner (positive) is spread over the drum and
    sticks only to the image
  • Paper is given a strong negative charge passes
    close to drum so that the powder leaves the drum
    and sticks to the paper

8
Overview of Computer Hardware
  • Auxiliary Storage
  • Used to store data/programs for long terms
    (permanent storage)
  • much slower and cheaper than main memory
  • Tapes, disks and CDs
  • Magnetic VS Optical
  • What is a 1? 0?
  • Sequential VS Direct
  • Fast VS Slow
  • E.g. of Magnetic disks

9
Overview of Computer Hardware
  • Magnetic tape
  • Like VHS films or cassettes
  • Was ubiquitous prior to the 80s
  • Nowadays, only for backup and archiving
  • Cheap, holds a lot of data and easy to store
  • Binary data from RAM is stored as is
  • Thin plastic tape covered with a coating that
    accepts magnetic charge

10
Overview of Computer Hardware
  • A dot of magnetic charge is a 1, nothing is a 0
  • Divided into multiple segments
  • There is a directory that stores where (i.e. in
    which segment) every file is stored
  • To access a file
  • Mount tape on drive
  • FF until the right segment
  • Write or read
  • Sequential access
  • Start from the beginning and go all the way until
    the desired file is found
  • Time consuming ? not used for storage in
    Computers

11
Overview of Computer Hardware
  • Magnetic Disk
  • Used the most for permanent storage in computers
  • In principal, stores data pretty much the same
    way as tapes
  • Magnetic coating covers the disk
  • Takes magnetic charge to represent data
  • Divided into tracks and sectors
  • Tracks are concentric circles on the disk
  • Sectors divide the disk into pie-shaped areas
  • Data fills all track within one sector
  • All tracks can store the same number of bits!!!
  • more compact towards the center (higher density)

12
(No Transcript)
13
R/W Head
  • R/W head can move to any position (sector, track)
    on the disk ? random access

14
Overview of Computer Hardware
  • Comes in two forms
  • Portable
  • Floppy disks
  • Because they are flexible (easily bent)
  • 3.5
  • 1.44 MB
  • Zip disks
  • Several 100 MBs
  • Accessed by a disk drive
  • Need formatting sets up tracks and sectors and
    directory (where is every file) and erases
    everything

15
Overview of Computer Hardware
Disk Pack
  • Fixed
  • Hard disks
  • Single (PCs) or multiple ( 10 to 12)
  • Multiple GBs per disk
  • Diskettes have 135 tracks per inch and 18 tracks
  • HDs have 1000s of tracks per inch and 64 tracks
  • R/W does not touch the surface but floats right
    above it ? Rotate 100 times faster than diskettes
  • They are sealed so that no dirt comes between R/W
    head and disk (corrupts data)

16
Overview of Computer Hardware
  • Compact Disks (CDs)
  • Optical disk
  • Data stored like magnetic disks (series of dots
    on tracks)
  • Now we BURN the dots (rather than magnetic
    charges) as pits on the surface
  • A laser detects those pits as 0s
  • Data spans a track of the disk (not sectors)
  • Pits gives the advantage of more density of
    storage
  • 600 MB to 10 GB
  • Most CDs are Read-only (because of the burning)
  • Some optical drives do allow for re-burning of
    surface after smoothing out the pits

17
Data Manipulation (3.4)
18
Data Manipulation
  • Computing an answer to an equation
  • 53 63 7 33/12
  • Assume our computer cant directly multiply,
    subtract, or raise to power
  • Multiplication task (Algorithm)
  • 1 Get 1st number, Number_1
  • 2 Get 2nd number, Number_2
  • 3 Answer 0
  • 4 Add Number_1 to Answer
  • 5 Subtract 1 from Number_2
  • 6 if Number_20, go to step 4
  • 7 Stop

19
Data Manipulation
  • What we really need for this example
  • Store numbers
  • Add numbers (Subtract ?)
  • Compare number
  • All tasks done by a general-purpose computer can
    be accomplished through the following set of
    operations
  • Store data
  • numbers (positive, negative or fractions), text,
    pictures, etc
  • Compare data (numbers, pictures, sounds, letters)
  • Add
  • Move data from one storage (memory) location to
    another
  • Editing a text document
  • Input/output
  • Not mentioned in book but important

20
Data Manipulation
  • Adding and comparing bit patterns is sufficient
    to achieve an operational machines
  • This is done by circuits for adding and comparing
    bit patterns in registers
  • Circuits are made up of logical gates
  • Gates and Truth Tables
  • Gates needed are NOT, AND, and OR
  • NOT Gate
  • Single input and single output
  • Reverses input
  • 1 ? 0 and 0 ? 1
  • If there is electric power ? shut it off
  • If there is no electric power ? turns it on
  • Like a power switch

21
Data Manipulation
  • AND Gate
  • Accepts two inputs (or more) and yields one
    output
  • Output is 0 when any input is 0
  • Requires power coming from both lines in order to
    give out power

22
Data Manipulation
  • OR Gate
  • Accepts two inputs and yields one output
  • Output is 1 when any input is 1
  • Requires power coming from at least one of the
    input lines in order to give out power
  • Variant XOR
  • 1 if inputs are distinct

23
Data Manipulation
  • These three simple gates are combined to create
    circuits that perform more complicated operations
  • Circuits, in turn, might then be used (thru
    programs) to perform even more complicated tasks
  • Gate combinations can be expressed in three ways
  • (1) Through Expressions
  • A AND B ? AB
  • A OR B ? AB
  • NOT A ? A
  • (NOT A AND NOT B) OR (A AND B) ? AB AB

24
  • Enough rows to hold all input combinations
  • 1 letter ? 21 rows
  • 2 letters ? 22 rows
  • 3 letters ?23 rows
  • n letters ?2n rows
  • (2) Through Circuit diagrams
  • Given an expression
  • Try AB AB
  • (3) Through Truth Tables
  • Each of the representations can be derived from
    the other
  • Derive truth table given expression
  • One column for each letter
  • Make 1 additional column for every sub-expression
    (order parentheses, NOTs, ANDs, ORs)
Write a Comment
User Comments (0)
About PowerShow.com