digital lecture

Upload: chart328

Post on 05-Jul-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/15/2019 Digital Lecture

    1/33

    ReviewECE 3710

    reading:

    1. V1.Ch1.1--6, V2.Ch1.52.V1.Ch1.7-9,Ch2.1-2

  • 8/15/2019 Digital Lecture

    2/33

    No one knows what’s next,

    but everybody does it.- George Carlin

  • 8/15/2019 Digital Lecture

    3/33

    for what follows...

     Most Likely You Go Your Way (And I'll Go Mine)- Bob Dylan

  • 8/15/2019 Digital Lecture

    4/33

    binary

    2^8 = 256 => 256 representations

    8 bits: 0000 0000             {

    byte

  • 8/15/2019 Digital Lecture

    5/33

    bin2dec

    1111 1111

    2^7+2^6+2^5+2^4+2^3+2^2+2^1+2^0 = 255

    0

    7

  • 8/15/2019 Digital Lecture

    6/33

    bin2dec

    Q: 0101 0101

    A. 170B. 86

    C. 85D. 43

  • 8/15/2019 Digital Lecture

    7/33

    bin2dec

    A: 2^6+2^4+2^2+2^0 = 85

    Q: 0101 0101

  • 8/15/2019 Digital Lecture

    8/33

    never, ever use this:

    "There are 10 types of people: those

    who understand binary and everyoneelse."

  • 8/15/2019 Digital Lecture

    9/33

    if you think it’s funny...

  • 8/15/2019 Digital Lecture

    10/33

    dec2bin

    275 => 1 0001 0011

    bits:1. how many

    2. which

  • 8/15/2019 Digital Lecture

    11/33

    dec2bin

    275 > 255 => more than 8275 < 511 => no more than 9

    275 => 1 0001 0011

  • 8/15/2019 Digital Lecture

    12/33

    dec2bin

                   {

    19 = 1 0001 XXXX (need bit in 4th position)

    275 => 1 0001 0011

    2^8 + 2^(i-1) + …

  • 8/15/2019 Digital Lecture

    13/33

    hex

    hex2dec & dec2hex

    use bin as intermediary(4-bits represent 16 combinations)

    denoting hex numbers:

    AAH0xAA

  • 8/15/2019 Digital Lecture

    14/33

    Q: dec2bin(34) & dec2hex(34)

  • 8/15/2019 Digital Lecture

    15/33

    Q: dec2bin(34) & dec2hex(34)

    2^5 = 32 and 2^6=64 => 6 bits: 0010 0000

    32 + 2 = 34 => 0010 0010

    22H

  • 8/15/2019 Digital Lecture

    16/33

    Q: hex2dec(0xA5)

    A. 163B. 164C. 165D. 166

  • 8/15/2019 Digital Lecture

    17/33

    Q: hex2dec(A5)

    10 5

    1010 0101

    2^7+2^5+2^2+2^0=128+32+4+1=165

    shouldn’t need table:

    (memorise all 4-bit)

  • 8/15/2019 Digital Lecture

    18/33

    Q: 0x36B+0xF6

  • 8/15/2019 Digital Lecture

    19/33

    Q:36BH+F6H

      11

    36B+ F6

    =0x461

    1: 11+6=17 (-16=1)2:6+15+1=22 (-16=6)3: 3+1=4

  • 8/15/2019 Digital Lecture

    20/33

    Q: 36BH-F6H

     A. 0x275

    B. 0x286

    C. 0x297

    D. 0x2A8

  • 8/15/2019 Digital Lecture

    21/33

    Q: 0x36B-0xF6

    36B

    - F6

    =0x275

    1: 11-6=52:6-15+16=73: 2

  • 8/15/2019 Digital Lecture

    22/33

    decoder

  • 8/15/2019 Digital Lecture

    23/33

    multiplexor

  • 8/15/2019 Digital Lecture

    24/33

     

    flip-flop (d latch)

    previous clock: Q = 1

    want: = 0

    1

    0 1

    Q0 = 0

    0

    1

    0

    1

    10

    1

    1

    0

    1

    00

    1

    0

    1

    1

    0

  • 8/15/2019 Digital Lecture

    25/33

    who makes a 112GB HDD?

    I bought a 120GB HDD

  • 8/15/2019 Digital Lecture

    26/33

  • 8/15/2019 Digital Lecture

    27/33

    http://www.tarsnap.com/GB-why.html

    http://www.tarsnap.com/GB-why.html

  • 8/15/2019 Digital Lecture

    28/33

     

    Bit : a binary digit that can have the value0 or 1

    Byte : 8 bits

    Nibble : half of a bye, or 4 bits

    Word : two bytes, or 16 bits 

    arch. dependent;ARM = 32 bits

    terminology for memory  only

    IEC

    Kibibyte (KiB)Mebibyte (MiB)Gibibyte (GiB)Tebibyte (TiB)

     

    Kilobyte (K): 210 bytes

    Megabyte (M) : 220 bytes, over 1 million

    Gigabyte (G) : 230 bytes, over 1 billion

    Terabyte (T) : 240 bytes, over 1 trillion

     JEDEC

    assumed whenever

    discussing memory

  • 8/15/2019 Digital Lecture

    29/33

    Architecture IECE 3710

    reading:

    1.V1.Ch1.7-9,Ch2.1-22. V1.Ch3.1, V2.Ch1.1-2,Ch2.1

  • 8/15/2019 Digital Lecture

    30/33

    One time a cop pulled me over for runninga stop sign. He said, "Didn't you see the

    stop sign?" I said, "Yeah, but I don't believeeverything I read."

    - Steven Wright

  • 8/15/2019 Digital Lecture

    31/33

    don’t make millions of years of evolution a waste of time, eh?

    why you should read:

  • 8/15/2019 Digital Lecture

    32/33

    lecture notes != abridged version of text

    next week: assembly and I/O

  • 8/15/2019 Digital Lecture

    33/33

     

    CPU Memory(RAM, ROM)

    Peripherals

    (monitor,

     printer, etc.)

    Address bus

    Data bus

    address: how computers know where to get/store

    i f ti

    unidirectional

    bidirectional

    buses: how information is moved(#wires != #bits)