01 INTRO2 (1)

Embed Size (px)

Citation preview

  • 8/7/2019 01 INTRO2 (1)

    1/15

    Chapter 1Chapter 1

    Introduction to Digital Systems DesignIntroduction to Digital Systems Design

    ECEn 224ECEn 224

  • 8/7/2019 01 INTRO2 (1)

    2/15

    2

    Digital vs. AnalogDigital vs. Analog

    Analog systems represent informationAnalog systems represent information

    using physical quantitiesusing physical quantities

    Voltage on a wire, magnetic field strengthVoltage on a wire, magnetic field strength Digital systems represent informationDigital systems represent information

    using binary digits, orusing binary digits, orbitsbits

    1 or 0, high or low, on or off1 or 0, high or low, on or off

  • 8/7/2019 01 INTRO2 (1)

    3/15

    3

    Positional Number SystemsPositional Number Systems

    Two discrete values are insufficient forTwo discrete values are insufficient for

    most applicationsmost applications

    We combine bits to represent more valuesWe combine bits to represent more values We use a positional number system forWe use a positional number system for

    binary just like we do in decimalbinary just like we do in decimal

  • 8/7/2019 01 INTRO2 (1)

    4/15

    4

    Positional Number SystemsPositional Number Systems

    DecimalDecimal, base 10, base 10,, means we have 10 digits (0means we have 10 digits (0--9)9)

    Decimal example:Decimal example:

    103210321010 = 1= 1x10x1033 + 0+ 0x10x1022 +3+3x10x1011 + 2+ 2x10x1000

    HexadecimalHexadecimal, base 16, means we have 16 digits (0, base 16, means we have 16 digits (0--9, A9, A--F)F)

    Hexadecimal example:Hexadecimal example:

    2A52A51616 = 2= 2x16x1622 + 10+ 10x16x1611 + 5+ 5x16x1600 = 512 + 160 + 5 = 677= 512 + 160 + 5 = 677

    BinaryBinary, base 2, follows the same pattern, base 2, follows the same pattern

    Binary example:Binary example:

    1011101122 = 1= 1x2x233

    + 0+ 0x2x222 + 1+ 1x2x211 + 1+ 1x2x200 = 8 + 0 + 2 + 1 = 11= 8 + 0 + 2 + 1 = 11

    Counting in any base is analogous to counting in decimalCounting in any base is analogous to counting in decimal

  • 8/7/2019 01 INTRO2 (1)

    5/15

    5

    Digital vs. AnalogDigital vs. Analog

    Analog thermometerAnalog thermometer

    0V to 10V, could be used to represent 00V to 10V, could be used to represent 0 toto

    100100 FF

    Each 1/10Each 1/10thth volt represents 1 degreevolt represents 1 degree

    Digital thermometerDigital thermometer

    77--bit binary number could be used tobit binary number could be used to

    representrepresent 00 to 127to 127 FF

    Seven bits can be used to represent theSeven bits can be used to represent the

    numbers 0 to 127numbers 0 to 127

  • 8/7/2019 01 INTRO2 (1)

    6/15

    6

    Digital PrecisionDigital Precision

    How would you represent 10.5How would you represent 10.5 F?F?

    Analog example: 1.05VAnalog example: 1.05V

    Digital example: ????Digital example: ???? 0001010000101022 = 10= 101010

    0001011000101122 = 11= 111010

    We must either add bits or decrease theWe must either add bits or decrease therangerange

  • 8/7/2019 01 INTRO2 (1)

    7/15

    7

    Digital PrecisionDigital Precision

    99--bit thermometer, 0bit thermometer, 0 to 127.75to 127.75 FF Each discrete number increase represents 0.25Each discrete number increase represents 0.25 FF

    10.510.5 FF 10.5/0.25 = 42 = 10101010.5/0.25 = 42 = 10101022

    77--bit thermometer, 0bit thermometer, 0 to 12.7to 12.7 FF Each discrete number represents 12.7Each discrete number represents 12.7/127 = 0.1/127 = 0.1 FF

    10.510.5 FF 10.5/0.1 = 105 = 110100110.5/0.1 = 105 = 110100122

    It is not possible to representIt is not possible to represent allallvalues exactlyvalues exactly

    using digital representationusing digital representation Example: 1/3 cant be represented in binary, just likeExample: 1/3 cant be represented in binary, just like

    it cant be represented in decimalit cant be represented in decimal

  • 8/7/2019 01 INTRO2 (1)

    8/15

    8

    Example: Analog PhotographyExample: Analog Photography

    An analog camera uses a chemicalAn analog camera uses a chemical

    reaction in the film when exposed to lightreaction in the film when exposed to light

    The amount of exposure is directly relatedThe amount of exposure is directly relatedto the amount of light that hits the filmto the amount of light that hits the film

  • 8/7/2019 01 INTRO2 (1)

    9/15

    9

    Example: Digital PhotographyExample: Digital Photography

    A digital camera uses an array of lightA digital camera uses an array of light--

    sensitive receptors that measure the lightsensitive receptors that measure the light

    as a binary numberas a binary number

    Image quality is determined mostly by twoImage quality is determined mostly by two

    factors:factors:

    The number of bits per pixelThe number of bits per pixel

    The number of pixels per imageThe number of pixels per image

  • 8/7/2019 01 INTRO2 (1)

    10/15

    10

    Example: Digital PhotographyExample: Digital Photography

    1284x897 pixels, 24-bit color

    1284x897 pixels, 6-bit color

    100x70 pixels, 24-bit color

    100x70 pixels, 6-bit color

  • 8/7/2019 01 INTRO2 (1)

    11/15

    11

    Analog vs. Digital StorageAnalog vs. Digital Storage

    Analog storage mediums fade over time due toAnalog storage mediums fade over time due to

    gradual physical degradationgradual physical degradation

    Photos turn yellow with timePhotos turn yellow with time

    Cassette audio tapes lose their clarityCassette audio tapes lose their clarity

    Digital storage mediums dont fade like analogDigital storage mediums dont fade like analog

    If a 0 or 1 fades it will still be a 0 or 1If a 0 or 1 fades it will still be a 0 or 1

    A .jpg image taken 10 years ago isA .jpg image taken 10 years ago is exactlyexactlythethesame todaysame today

  • 8/7/2019 01 INTRO2 (1)

    12/15

    12

    Analog vs. Digital StorageAnalog vs. Digital Storage

    Making an analog copy implies measuring theMaking an analog copy implies measuring the

    storage mediumstorage medium

    Always introduces some errorsAlways introduces some errors

    Copies of copies are even worseCopies of copies are even worse

    Making digital copies implies distinguishing 0sMaking digital copies implies distinguishing 0s

    from 1s so copies are exactfrom 1s so copies are exact

    Copies can be made without any errorCopies can be made without any error Copies of copies are identicalCopies of copies are identical

  • 8/7/2019 01 INTRO2 (1)

    13/15

    13

    Analog vs. Digital ProcessingAnalog vs. Digital Processing

    Modern computers and digital circuitsModern computers and digital circuits

    make it easy to do extremely complexmake it easy to do extremely complex

    processingprocessing

    Digital processing allows precision andDigital processing allows precision and

    error to be exactly predictederror to be exactly predicted

  • 8/7/2019 01 INTRO2 (1)

    14/15

    14

    Combinational vs. Sequential CircuitsCombinational vs. Sequential Circuits

    Digital circuits consist of binary inputs andDigital circuits consist of binary inputs andoutputsoutputs

    In combinational circuits, the output is a directIn combinational circuits, the output is a directfunction of its inputsfunction of its inputs

    In sequential circuits the output depends on theIn sequential circuits the output depends on thecurrent input and previous inputscurrent input and previous inputs Sequential circuits contain memory that tracks stateSequential circuits contain memory that tracks state

    A clock is used to signal when to change statesA clock is used to signal when to change states

    AB

    CD

    XY

  • 8/7/2019 01 INTRO2 (1)

    15/15

    15

    Combinational vs. SequentialCombinational vs. Sequential

    Combinational example: Clock chimeCombinational example: Clock chime

    Inputs:Inputs: secondsseconds andand minutesminutes

    Output:Output: chimechime

    Behavior: OutputBehavior: Output chimechime is 1 if and only ifis 1 if and only ifsecondsseconds isis0 and0 and minutesminutes is 0, 15, 30, or45.is 0, 15, 30, or45.

    Sequential example: CounterSequential example: Counter

    Inputs:Inputs: incinc andand clkclk

    Output:Output: countcount

    Behavior: Increment count onBehavior: Increment count on clkclk edge if and only ifedge if and only if

    incinc is 1is 1