computer science 37 lecture 1

Upload: alexander-taylor

Post on 07-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/4/2019 Computer Science 37 Lecture 1

    1/24

    1

    1.1

    Where:MooreB03

    When:MWF11:15-12:25

    X-Hour:Tuesday12:00

    LuizFelipe Perrone,Sudikoff 209

    Cybersecurity ResearchGroup

    ISTSDartmouthCollege

  • 8/4/2019 Computer Science 37 Lecture 1

    2/24

    2

    1.2

    Administrivia

    1) Wehaveawebpage:

    http://www.cs.dartmouth.edu/~cs37

    (syllabus,slides,readings,andalladministrivia)

    2) TAs:ClintHepner andMingLi

    3) OfficeHours

    4) Textbook:onerequiredplusanothertwofor

    whoreally wantsmore.

    5) X-Hours:Ijustcantgetenough.

  • 8/4/2019 Computer Science 37 Lecture 1

    3/24

    3

    1.3

    Administrivia

    6) HonorPrinciple:readit,abidebyit.

    7) Grades:

    =

    =

    7

    1i

    ihwHW

    05.1*

    025.1*

    g

    g

    g Nopaper,badpaper

    Bpaper

    Apaper

    g=QZ+MT+FE+HW

    QZ=6%,MT=20%,FE=24%,HW=49%

    =

    =

    3

    1i

    iqzQZ

    Finalgrade:

  • 8/4/2019 Computer Science 37 Lecture 1

    4/24

    4

    1.4

    Lecture1

    AbstractionLayers

    WhereBitsAreBorn

  • 8/4/2019 Computer Science 37 Lecture 1

    5/24

    5

    1.5

    LayersofAbstraction

    abstraction:

    theactorprocessofabstracting.

    abstracting:

    tomakeanabstractof,tosummarize.

    Thinkabouthowyouinteractwiththeworld:

    Youdontconstantlythinkaboutallthedetailsineverything aroundyou.Youthinkaboutessentials.

    Youdealwithfunctionblocks andinterfaces.

  • 8/4/2019 Computer Science 37 Lecture 1

    6/24

    6

    1.6

    LayersofAbstraction

    Pointstoconsider:

    1) Givesomethinganinputandgetsomethingfrom

    itasoutput.Itsthefunctionality thatmatters.

    2) Whenwecanconceptuallybreakdownasystem

    intocooperatingcomponents,theinterface

    betweencomponentsmustbewellunderstood.

  • 8/4/2019 Computer Science 37 Lecture 1

    7/24

    7

    1.7

    LayersofAbstraction

    functiondomain range

  • 8/4/2019 Computer Science 37 Lecture 1

    8/24

    8

    1.8

    LayersofAbstraction

    f()

    program

    inputdata

    outputdata

    computer

    domain

    range

  • 8/4/2019 Computer Science 37 Lecture 1

    9/24

    9

    1.9

    Interlude:AlanTuring,FounderofComputerScience

    1912(23June):Birth,Paddington,London

    1931-34:UndergraduateatKing'sCollege,CambridgeUniversity

    1932-35:Studiesquantummechanics,probability,logic1936:TheTuringmachine:OnComputableNumbers... submitted

    1936-38:AtPrincetonUniversity.Ph.D.Papersinlogic,algebra,numbertheory

    1938-39:ReturntoCambridge.IntroducedtoGermanEnigmacipherproblem

    1939-40DevisestheBombe,machineforEnigmadecryption

    1939-42:BreakingofU-boatEnigmacipher,savingbattleoftheAtlantic

    1943-45:ChiefAnglo-Americanconsultant.Introducedtoelectronics

    1946:Computerdesign,leadingtheworld,formallyaccepted

    1947-48:Papersonprogramming,neuralnets,andprospectsforartificial

    intelligence

    1949:Workonprogrammingandworld'sfirstserioususeofacomputer

    1950:Philosophicalpaperonmachineintelligence:theTuringTest

    1952:Arrestedandtriedasahomosexual,lossofsecurityclearance

    1954(7June):Deathbycyanidepoisoning,Wilmslow,Cheshire.

    Turing

    Machine

    data

    program

  • 8/4/2019 Computer Science 37 Lecture 1

    10/24

    10

    1.10

    LayersofAbstraction

    Application

    SystemSoftware

    Hardware

    Compilers,webbrowsers,word

    processors,MP3players,etc.

    Abstractions:

    servetohidedetailbehindfunctionality,

    youconcentrateonwhatyoumust,

    allowforagoodmeasureofflexibility.

    I/Odevicecontrol,processscheduling,

    virtualmemory,filesystem,etc.

    Arithmeticoperations,datatransfer,

    memory,massstorage,etc.

  • 8/4/2019 Computer Science 37 Lecture 1

    11/24

    11

    1.11

    LayersofAbstraction

    Application

    SystemSoftware

    Hardware

    FunctionalComponentsBus,CPU,Memory

    LogicGates

    DiscreteElectronicComponents

    AND,OR,NOT,

    transistor,

    capacitor,

    resistor,

  • 8/4/2019 Computer Science 37 Lecture 1

    12/24

    12

    1.12

    Whystoopthatlow?

    Understand howoneimplementsahigh-levellanguage(compilerconstruction).

    Understand howanoperatingsystemisconstructed.

    Understand howonedesignsalowlevellanguage:theprocessorsinstructionset.

    Understand whatyou[can]getfromaprocessor(performance).

    Understand howtobettercontrolthecomputerso

    youcangetthemaximumitcangiveyou.Understand yoursystemchoices.

  • 8/4/2019 Computer Science 37 Lecture 1

    13/24

    13

    1.13

    Switch:TheBasicBuildingBlock

    0V

    Whentheswitchis

    closed,currentcanflow

    fromthesourcetothe

    ground.

    hasthesamepotential

    astheground.

    Whentheswitchis

    open,currentcannot

    flow.

    0V hasthesamepotentialasthe

    source.

  • 8/4/2019 Computer Science 37 Lecture 1

    14/24

    14

    1.14

    InformationRepresentation

    Theswitch hastwopossiblestates:

    BINARYSYSTEM

    Question: Isthissystemtoorestrictive?

    surely1

    surely0

    uncertainty

    zone

    0

    potential(V)

    +5

    V

    V

    0

    1

  • 8/4/2019 Computer Science 37 Lecture 1

    15/24

    15

    1.15

    Whatyoucandowithswitches

    (1)

    (2)

    (3)

  • 8/4/2019 Computer Science 37 Lecture 1

    16/24

    16

    1.16

    Whatyoucantdowithswitches

    Youcantcontrolthemelectronically.

    Youdontwanttohavetomechanically

    setAandB(pushthemwithyour

    fingers)whenyouwanttocomputea

    function.

    Whatyoudowantistobeabletoset

    theirvalueswithanelectricsignal

  • 8/4/2019 Computer Science 37 Lecture 1

    17/24

    17

    1.17

    MechanicalLimitation

    input output

    0V

    time

    Canreadtheoutput

    valuefromthispointon

    Duringthistime

    theoutputvalueismeaningless

  • 8/4/2019 Computer Science 37 Lecture 1

    18/24

    18

    1.18

    Switch:TheBasicBuildingBlock

    0V

    Whencurrentininjected

    fromthebase,current

    canflowfromthe

    collectortotheemitter.

    willhavethesame

    potentialasground.

    base

    collector

    emitter

  • 8/4/2019 Computer Science 37 Lecture 1

    19/24

    19

    1.19

    TheNotFunctionwithaTransistor

    oV iV

    0V+5V

    +5V0V

  • 8/4/2019 Computer Science 37 Lecture 1

    20/24

    20

    1.20

    TheNotFunctionwithaLogicGate

    01

    10

    BA

    Truthtable

    input

    variable

    output

    variable

    Fromdiscretecomponentsto

    logicgates:ourfirstmoveuptowardahigherlayerof

    abstraction.

  • 8/4/2019 Computer Science 37 Lecture 1

    21/24

    21

    1.21

    Interlude:AnotherLowerLayer?

    FunctionalComponents

    LogicGates

    DiscreteElectronicComponents

    bitstrings

    bits

    electriccurrents

    DiscreteSpintronic Components electronsspins

  • 8/4/2019 Computer Science 37 Lecture 1

    22/24

    22

    1.22

    PuttingInformationin

    ElectronsStatesUseelectronspin(angular

    momentum)torepresentbinary

    values:{down,up}={0,1}

    5bits

    All possiblevaluesatonce:

    5

    2

    + =

    Aqubitdiffersfromabitinthat

    itcanassumeasuperpositionof

    states:theycanbeboth0and1simultaneously.

    00110

  • 8/4/2019 Computer Science 37 Lecture 1

    23/24

    23

    1.23

    AdvantagesofSpintronics

    Spindoesntchangewhendevicesarepoweredoff:wecanhavenicermemoriesbuiltwiththistechnology.

    Consumelesspower.

    Incrediblyfastercomputation.

    Moreintegration.

  • 8/4/2019 Computer Science 37 Lecture 1

    24/24

    1.24

    TheChallengeinSpintronics

    Whenaqubitinteractswiththe

    surrounding,itsvalueis

    convertedtoarandombit.

    Toreadthevalueofaqubit,

    youneedtointeractwithit

    ?

    Whilequantumcomputingis

    afar-offgoal,spintronics may

    allowforvastimprovements

    whencombinedwithconventionalsemiconductor

    technology.