resources eng2410 digital designislab.soe.uoguelph.ca/sareibi/teaching_dr/eng241_html_dr/... ·...

38
ENG2410 Digital Design “Introduction to Digital Systems: Part 1” S. Areibi School of Engineering University of Guelph

Upload: others

Post on 25-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

  • ENG2410Digital Design

    “Introduction to Digital Systems: Part 1”

    S. AreibiSchool of EngineeringUniversity of Guelph

  • Topics

    Computing Devices and VLSI Design Signals (Digital vs. Analog) Digital Systems and Computers Number systems [binary, octal, hex] Base Conversion Arithmetic Operations Decimal Codes [BCD] Alphanumeric Codes (ASCII)

  • Resources

    Chapter #1, Mano Sections 1.1 Digital Computers 1.2 Number Systems 1.3 Arithmetic Operations 1.4 Decimal Codes 1.5 Alphanumeric Codes

  • Digital Systems

  • 5

    PDA

    Body

    Entertainment

    Household

    Communication

    Home Networking

    Car

    Medicine

    PC

    Super Computer

    Computing Devices Everywhere!

    Game console

    What is the main enabler to such digital systems?

    Digital Circuits (Processors) found in all computing devices

    Embedded Systems

  • 6

    The Transistor Revolution

    First transistorBell Labs, 1948

    Integrated Circuits1960’s

    • Intel 4004 processor • Designed in 1971• Almost 3000 transistors• Speed:1 MHz operation

    Every Processor consists of a Control Unit and a Data Path

  • 7

    Processor: Digital System

    Inputs: Keyboard, mouse, modem, microphone

    Outputs: CRT, LCD, modem, speakers

    Controlunit DatapathCPU

    Data/Instructions/codeAll in 01010010010

    clock

    Basic Gates

    Memory

    Input/Output

  • Transistors

  • 9

    MOSFET: Metal OxideSemiconductor

    Field Effect Transistor

    A voltage controlled device Handles less current than a BJT (Slower) Dissipates less powerAchieves higher density on an IC Has full swing voltage 0 5V

  • 10

    Transistor as a Switch

    VGS ≥ VTRon

    S D

    A Switch!

    |VGS|

    An MOS Transistor

    G

    S D

    If VGS is > VT the Transistor is OnElse If VGS is < VT the Transistor is Off

  • 11

    nMOS Transistor

    Ids

    Vgs

    control gate

    source drain

    (a) Standard MOS transistor

    Siliconsubstrate

    Silicondioxide

    Sourceterminal

    Control gateterminal

    Drainterminal

    |VGS|

    An nMOS Transistor

    Vth

    Gate

    DrainSource

  • VLSI Design Cycle

  • n+n+S

    GD

    +

    DEVICE

    CIRCUIT

    GATE

    MODULE

    SYSTEMSpecification

    Functional design

    Circuit design

    Physical design

    Test/Fabrication

    Logic design

    The VLSI Design Cycle

    13

  • © K

    LMH

    Lien

    ig

    14

    1.3 VLSI Design Styles Contact

    Vdd

    GND

    OUTIN2

    IN1OUT

    IN2

    IN1

    OUTIN1

    Vdd

    GND

    IN2

    Power (Vdd)-Rail

    Ground (GND)-Rail

    Diffusion layer

    p-typetransistor

    n-typetransistor

    Metal layer

    Poly layer

    A Digital Systems

    Circuit Level Physical Level

  • Signals

  • 16

    SignalsAn information variable represented by a

    physical quantity (speech, Temp, humidity, noise, …)

  • 17

    Signals

    Signals can be analog or digital:

    1. Analog signals can have an infinite number of values in a range;

    2. Digital signals can have only a limited number of values.

  • 18

    Analog Signals

    Analog

    Time

    Continuous in value & time

    Continuous in Value

    Continuous in Time

  • 19

    Digital Signals

    For digital systems, the variable takes on discrete values (i.e., not continuous)

    Time

    Digital Discrete in value

    Either 0 or 5 volts

  • 20

    Asynchronous

    Synchronous

    Discrete in value &

    continuous in time

    Discrete in value & time

    Digital

    Digital (Binary) values are represented by: digits 0 and 1 False (F) and True (T) +5 Volt and 0 Volt ……

    Time

    Digital: Sync vs. Async

    A global clock governs the transitions of the system

  • 21

    What are other physical quantities representing 0 and 1?

    Binary Values: Other Physical Quantities

    CPU: Voltage Hard Drive: Magnetic Field Direction

    CD: Surface Pits/LightDynamic Ram: Electric Charge

    +5 volt or 0 volt MF to the right or left

    Electric Charge stored in a capacitor

    A bump etched is a 0, no bump is a 1

  • Number Representation

  • 23

    Number Systems – Representation

    A number with radix r is represented by a string of digits:An - 1An - 2 … A1A0 . A- 1 A- 2 … A- m + 1 A- m

    in which 0 ≤ Ai < r and “.” is the radix point. The string of digits represents the power series:

    ( ) ( )(Number)r= ∑∑ +j = - m

    jj

    i

    i = 0i rArA

    (Integer Portion) + (Fraction Portion)

    i = n - 1 j = - 1

  • 24

    Decimal Number SystemBase (also called radix) = 10

    ● 10 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }

    Digit Position● Integer & fraction

    Formal Notation

    Digit Weight● Weight = (Base) Position

    Magnitude● Sum of “Digit x Weight”

    1 0 -12 -2

    5 1 2 7 4

    10 1 0.1100 0.01

    500 10 2 0.7 0.04

    d2*B2+d1*B

    1+d0*B0+d-1*B

    -1+d-2*B-2

    (512.74)10

  • 25

    Octal Number SystemBase = 8

    ● 8 digits { 0, 1, 2, 3, 4, 5, 6, 7 }

    Weights● Weight = (Base) Position

    Formal Notation

    Magnitude● Sum of “Digit x Weight”

    1 0 -12 -2

    8 1 1/864 1/64

    5 1 2 7 4

    5 *8 2+1 *8 1+2 *8 0+7 *8- 1+4 *8 -2

    =(330.9375)10

    (512.74)8

  • 26

    Octal Number System: Example

    For Example, (27)8 can be expressed as: ( )10

    (2 x 81) + (7 x 80 ) (2 x 8) + (7 x 1) 16 + 7 = (23)10

    (17.1)8 can be expressed as: ( )10

    (1 x 81) + (7 x 80) + (1 x 8-1) 8 + 7 + 0.125 (15.125)10

  • 27

    Hexadecimal Number System

    Base = 16 ● 16 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F }

    Weights● Weight = (Base) Position

    Formal Notation

    Magnitude● Sum of “Digit x Weight”

    1 0 -12 -2

    16 1 1/16256 1/256

    1 E 5 7 A

    1 *162+14 *161+5 *160+7 *16-1+10 *16-2

    =(485.4765625)10

    (1E5.7A)16

    10 12 13 151411

  • 28

    Hex to Decimal

    Just multiply each hex digit by decimal value, and add the results.

    163 162 161 160

    4096 256 16 1

    (2 a c)16

    2 • 16 + 10 • 16 + 12 • 16 = (684)10

    Dec Hex0 01 12 23 34 45 56 67 78 89 910 a11 b12 c13 d14 e15 f

    2 1 0

    Position 2 1 0

  • Binary Numbers

  • 30

    Binary Number System

    Base = 2

    ● 2 digits { 0, 1 }, called binary digits or “bits”

    Weights● Weight = (Base) Position

    Magnitude● Sum of “Bit x Weight”

    Formal Notation

    Groups of bits 4 bits = Nibble

    8 bits = Byte

    1 0 -12 -2

    2 1 1/24 1/4

    1 0 1 0 1

    1 *22+0 *21+1 *20+0 *2-1+1 *2-2

    =(5.25)10

    (101.01)21 0 1 1

    1 1 0 0 0 1 0 1

  • 31

    Binary → Decimal: Example

    7 6 5 4 3 2 1 0

    27 26 25 24 23 22 21 20

    128 64 32 16 8 4 2 1

    1 0 0 1 1 1 0 0

    128 + 0 + 0 + 16 + 8 + 4 + 0 + 0 = (156)10

    What is (10011100)2 in decimal?7 6 5 4 3 2 1 0 position

    Binary #

    position

    value

  • 32

    Binary Numbers Examples:

    (00)2 (0)10 (01)2 (1)10 (0000001)2 (1)10 (10)2 (2)10 (010)2 (2)10 (11)2 (3)10 (100)2 (4)10 (1001010101000)2

    Strings of binary digits (“bits”)One bit can store a number from 0 to 1 n bits can store numbers from 0 to 2n-1

  • 33

    Binary Fractions

    bi bi-1 . . . b2 b1 b0 b-1 b-2 b-3 … b-j

    1242i-12i

    2-j

    1/8

    1/4

    1/2

    Integer Values

    Fractional Values

    decimal number =

  • 34

    Example 1: Binary to Decimal

    (1 1 0 . 1 1)2

    1 x 22 + 1 x 21 + 0x20 + 1x2-1 + 1x2-2

    (6 and ¾)10

    Position 2 1 0 -1 -2

  • 35

    Example 2: Binary to Decimal

    (0 . 1 1 1 1 1 1)2

    (63/64) 10

    0 x 20 + 1 x 2-1 + 1x2-2 + 1x2-3 + 1x2-4 + 1x2-5 + 1x2-6

    Note: (1) Numbers of the form 0.11111…2 are just below 1.0(2) Short form notation for such numbers is 1.0 - ε

    Position 0 -1 -2 -3 -4 -5 -6

  • Why Binary?This is easier to implement in hardware than a unit

    that can take on 10 different values.● For instance, it can be represented by a transistor being

    off (0) or on (1).

    ● Alternatively, it can be a magnetic stripe that is magnetized with North in one direction (0) or the opposite (1).

    Binary also has a convenient and natural association with logical values of:● False (0) and

    ● True (1).36

  • 37

    The Power of 2

    n 2n

    0 20=11 21=22 22=43 23=84 24=165 25=326 26=647 27=128

    n 2n

    8 28=2569 29=51210 210=102411 211=204812 212=409620 220=1M30 230=1G40 240=1T

    Mega

    Giga

    Tera

    Kilo

    As n increasesby 1

    2n doublesin value

  • ENG2410�Digital Design�“Introduction to Digital Systems: Part 1”TopicsResourcesSlide Number 4Computing Devices Everywhere!The Transistor RevolutionProcessor: Digital SystemSlide Number 8Slide Number 9Transistor as a SwitchnMOS TransistorSlide Number 12Slide Number 131.3VLSI Design StylesSlide Number 15SignalsSignalsAnalog SignalsDigital SignalsDigital: Sync vs. AsyncBinary Values: Other Physical QuantitiesSlide Number 22Number Systems – RepresentationDecimal Number SystemOctal Number SystemOctal Number System: ExampleHexadecimal Number SystemHex to DecimalSlide Number 29Binary Number SystemBinary Decimal: ExampleBinary NumbersSlide Number 33Slide Number 34Slide Number 35Why Binary?The Power of 2 Slide Number 38