Lecture 2 Digital and Logic Components

download Lecture 2 Digital and Logic Components

of 97

Transcript of Lecture 2 Digital and Logic Components

  • 8/8/2019 Lecture 2 Digital and Logic Components

    1/97

    Digital And Logic ComponentsDigital And Logic Components

    ByBy

    Varsha KapoorVarsha Kapoor

  • 8/8/2019 Lecture 2 Digital and Logic Components

    2/97

    ObjectivesObjectives Decimal Representation, Alphanumeric RepresentationDecimal Representation, Alphanumeric Representation ComplementComplement Logic GatesLogic Gates Boolean AlgebraBoolean Algebra

    Combinational LogicCombinational Logic Half AdderHalf Adder

    Full AdderFull Adder

    ICsICs

    MultiplexerMultiplexer RegistersRegisters Shift RegistersShift Registers

  • 8/8/2019 Lecture 2 Digital and Logic Components

    3/97

    Decimal Representation,Decimal Representation, Decimal number enter the computer usually as binary codedDecimal number enter the computer usually as binary codedalphanumeric characters.alphanumeric characters. These codes may contain from 6 to 8 bits for each decimal digitThese codes may contain from 6 to 8 bits for each decimal digit A binary code is a group of nA binary code is a group of n--bits that assume up to 2bits that assume up to 2nn distinctdistinct

    combinations of 1s and 0s with each combination representingcombinations of 1s and 0s with each combination representingone element of the set that is being coded.one element of the set that is being coded.

    8 elements 3 bits8 elements 3 bits 16 elements 4 bit code16 elements 4 bit code A binary code that distinguishes among 10 elements must containA binary code that distinguishes among 10 elements must contain

    at least four bits, but 6 combinations will remain unassigned.at least four bits, but 6 combinations will remain unassigned. In BCD each digit is represented by its own binary sequenceIn BCD each digit is represented by its own binary sequence

    To encode a decimal number using the common BCD encoding,To encode a decimal number using the common BCD encoding,each decimal digit is stored in a 4each decimal digit is stored in a 4--bit nibblebit nibble Decimal: 0Decimal: 0 1 2 3 4 5 6 7 8 91 2 3 4 5 6 7 8 9 BCD: 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001BCD: 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001

  • 8/8/2019 Lecture 2 Digital and Logic Components

    4/97

    BCD AdditionBCD Addition the BCD encoding for the number 137 would be: 0001 0011 0111the BCD encoding for the number 137 would be: 0001 0011 0111

    Add 9 and 6 in BCD:Add 9 and 6 in BCD:

    The sum 1111The sum 111122 is the binary equivalent of 15is the binary equivalent of 151010; however, 1111 is; however, 1111 is

    not a valid BCD number. You cannot exceed 1001 in BCD, so anot a valid BCD number. You cannot exceed 1001 in BCD, so acorrection factor mustbe made. To do this, you add 6correction factor mustbe made. To do this, you add 61010 (0110(0110BCDBCD))to the sum of the two numbers. The "add 6" correction factor isto the sum of the two numbers. The "add 6" correction factor isadded to any BCD group larger than 1001added to any BCD group larger than 100122. Remember, there is no. Remember, there is no1010101022, 1011, 101122, 1100, 110022, 1101, 110122, 1110, 111022, or 1111, or 111122 in BCD:in BCD:

  • 8/8/2019 Lecture 2 Digital and Logic Components

    5/97

    addition of 60addition of 601010 and 55and 551010 in BCD:in BCD:

    In this case, the higher order group is invalid, but the lower ordergroup is valid. Therefore, the correction factor is added only to the

    higher order group as shown:

    Convert this total to decimal to check your answer:

  • 8/8/2019 Lecture 2 Digital and Logic Components

    6/97

    Alphanumeric RepresentationAlphanumeric Representation Set of elements that includes the 10 decimal digits, the 26Set of elements that includes the 10 decimal digits, the 26

    letters of the alphabet and a number of special charactersletters of the alphabet and a number of special characterslike $,+,like $,+,-- and =.and =.

    Between 32 and 64 elements (uppercase only) 6 bitBetween 32 and 64 elements (uppercase only) 6 bit Between 64 and 128 (both uppercase and lower case areBetween 64 and 128 (both uppercase and lower case are

    involved) 7 bitinvolved) 7 bit

    ASCII (American Standard Code For InformationASCII (American Standard Code For InformationInterchange) 7 bit 128 combinationsInterchange) 7 bit 128 combinations The first 32 characters in the ASCIIThe first 32 characters in the ASCII--table are unprintabletable are unprintable

    control codes and are used to control peripherals such ascontrol codes and are used to control peripherals such asprinters.printers.

    Codes 32Codes 32--127 are common for all the different variations of127 are common for all the different variations ofthe ASCII table, they are called printable characters,the ASCII table, they are called printable characters,represent letters, digits, punctuation marks, and a fewrepresent letters, digits, punctuation marks, and a fewmiscellaneous symbols. You will find almost every charactermiscellaneous symbols. You will find almost every characteron your keyboard. Character 127 represents the commandon your keyboard. Character 127 represents the commandDEL.DEL.

    ASCII CodeASCII Code

  • 8/8/2019 Lecture 2 Digital and Logic Components

    7/97

    ComplementComplement

    Used in digital computers for simplifyingUsed in digital computers for simplifyingthe subtraction operation and for logicalthe subtraction operation and for logical

    manipulationsmanipulations

  • 8/8/2019 Lecture 2 Digital and Logic Components

    8/97

    Subtraction using additionSubtraction using addition

    Conventional addition (using carry) is easilyConventional addition (using carry) is easily implemented in digital computers.implemented in digital computers.

    However; subtraction by borrowing is difficultHowever; subtraction by borrowing is difficultand inefficient for digital computers.and inefficient for digital computers.

    Much more efficient to implement subtractionMuch more efficient to implement subtractionusing ADDITIONOF the COMPLEMENTS ofusing ADDITIONOF the COMPLEMENTS ofnumbers.numbers.

  • 8/8/2019 Lecture 2 Digital and Logic Components

    9/97

    Complements of numbersComplements of numbers

    (r-1 )s Complement

    Given a numberNin base rhaving n digits,the (r- 1)s complement ofNis defined as

    (rn - 1) - N

    For decimal numbers thebase orr = 10 and r- 1= 9,

    so the 9s complement ofN

    is (10n-1)-N

    99999. - N

    Digit

    n

    Digit

    n-1

    Next

    digit

    Next

    digit

    First

    digit

    9 9 9 9 9

    -

  • 8/8/2019 Lecture 2 Digital and Logic Components

    10/97

    2- Find the 9s complement of 546700 and 12389

    The 9s complement of 546700 is 999999 - 546700=453299

    and the 9s complement of 12389 is

    99999- 12389 = 87610.

    9s complement Examples9s complement Examples

    5 4 6 7 0

    -0

    9 9 9 9 9 9

    4 5 3 2 9 9

    1 2 3 8- 99 9 9 9 9

    8 7 6 1 0

  • 8/8/2019 Lecture 2 Digital and Logic Components

    11/97

    ls complementls complement

    For binary numbers,For binary numbers, r =r = 2 and2 and rr 11 == 1,1, rr--1s complement is the ls complement.1s complement is the ls complement. The ls complement ofThe ls complement of NN is (2is (2nn -- 1)1) -- N.N.

    Digit

    n

    Digit

    n-1

    Next

    digit

    Next

    digit

    First

    digit

    1 1 1 1 1

    Bit n-1 Bit n-2 . Bit 1 Bit 0

    -

  • 8/8/2019 Lecture 2 Digital and Logic Components

    12/97

    ls complementls complement

    Find r-1 complement for binary number N with four binary digits.

    r-1 complement for binary means 2-1 complement or 1s complement.

    n = 4, we have 24 = (10000)2and 2

    4 - 1 = (1111)2

    .

    The ls complement ofNis (24 - 1) -N. = (1111) -N

  • 8/8/2019 Lecture 2 Digital and Logic Components

    13/97

    The complement 1s of

    1011001 is 0100110

    0 1 1 0 0- 11 1 1 1 1 1

    1 0 0 1 1 0

    0 0 1 1 1- 11 1 1 1 1 1

    1 1 0 0 0 0

    1

    1

    0

    The 1s complement of

    0001111 is 1110000

    0

    1

    1

    ls complementls complement

  • 8/8/2019 Lecture 2 Digital and Logic Components

    14/97

    rs Complementrs Complement

    Given a numberNin base rhaving n digits,

    the rs complement ofNis defined as

    rn

    - N.

    For decimal numbers the

    base orr = 10,

    so the 10s complement ofNis 10n-N.

    100000. - N

    Digit

    n

    Digit

    n-1

    Next

    digit

    Next

    digit

    First

    digit

    0 0 0 0 0

    -

    1

  • 8/8/2019 Lecture 2 Digital and Logic Components

    15/97

    10s complement10s complement ExamplesExamples

    Find the 10s complement of

    546700 and 12389

    The 10s complement of546700

    is 1000000 - 546700= 453300

    and the 10s complement of

    12389 is

    100000 - 12389 = 87611.

    Notice that it is the same as 9s

    complement + 1.

    5 4 6 7 0- 00 0 0 0 0 0

    4 5 3 3 0 0

    1 2 3 8- 91 0 0 0 0 0

    8 7 6 1 1

    1

  • 8/8/2019 Lecture 2 Digital and Logic Components

    16/97

    For binary numbers, r = 2,

    rs complement is the 2s complement.

    The 2s complement ofNis 2n -N.

    2s complement2s complement

    Digit

    n

    Digit

    n-1

    Next

    digit

    Next

    digit

    First

    digit

    0 0 0 0 0

    -

    1

  • 8/8/2019 Lecture 2 Digital and Logic Components

    17/97

    2s complement Example2s complement Example

    The 2s complement of

    1011001 is 0100111

    The2

    s complement of0001111 is 1110001

    0 1 1 0 0- 10 0 0 0 0 0

    1 0 0 1 1 1

    0 0 1 1 1- 11 1 0 0 0 1

    1

    0

    0

    0

    1

    1

    0 0 0 0 0 001

  • 8/8/2019 Lecture 2 Digital and Logic Components

    18/97

    Fast Methods for 2sFast Methods for 2s

    ComplementComplement

    Method 1:The 2s complement of binary number is obtained by adding 1 to the

    ls complement value.

    Example:

    1s complement of 101100 is 010011 (invert the 0s and 1s)

    2s complement of 101100 is 010011 + 1 = 010100

  • 8/8/2019 Lecture 2 Digital and Logic Components

    19/97

    Fast Methods for 2sFast Methods for 2s

    ComplementComplement

    Method 2:

    The2

    s complement can be formed by leaving all least significant 0sand the first 1 unchanged, and then replacing ls by 0s and 0s by ls

    in all other higher significant bits.

    Example:The 2s complement of 1101100 is

    0010100

    Leave the two low-order 0s and the first 1 unchanged, and then

    replacing 1s by 0s and 0s by 1s in the four most significant bits.

  • 8/8/2019 Lecture 2 Digital and Logic Components

    20/97

    ExamplesExamples

    Finding the 2s complement of (01100101)Finding the 2s complement of (01100101)22 Method 1Method 1 Simply complement each bit andSimply complement each bit and

    then add 1 to the result.then add 1 to the result.(01100101)(01100101)22

    [N] = 2s complement = 1s complement (10011010)[N] = 2s complement = 1s complement (10011010)22 +1+1=(10011011)=(10011011)22

    Method 2Method 2 Starting with the least significantbit,Starting with the least significantbit,copy all the bits up to and including the first 1 bitcopy all the bits up to and including the first 1 bit

    and then complement the remaining bits.and then complement the remaining bits.NN = 0 1 1 0 0 1 0= 0 1 1 0 0 1 0 11

    [N][N] = 1 0 0 1 1 0 1= 1 0 0 1 1 0 1 11

  • 8/8/2019 Lecture 2 Digital and Logic Components

    21/97

    Subtraction of Unsigned NumbersSubtraction of Unsigned Numbers

    usingusing rs complementrs complementSubtractN from M : MSubtractN from M : M NN

    rs complementrs complement NN (r(rnn N )N )

    add M to ( radd M to ( rnn N ) : Sum = M + ( rN ) : Sum = M + ( r nn N)N)

    take rs complement (If Mtake rs complement (If M uu N, the negativeN, the negativesign will produce an end carrysign will produce an end carry rrnn we need towe need totake the rs complement again.)take the rs complement again.)

  • 8/8/2019 Lecture 2 Digital and Logic Components

    22/97

    Subtraction of Unsigned NumbersSubtraction of Unsigned Numbers

    usingusing rs complementrs complement (1) if M(1) if M uu N, ignore the carry withoutN, ignore the carry without

    taking complement of sum.taking complement of sum.

    (2) if M < N, take the rs complement of(2) if M < N, take the rs complement ofsum and place negative sign in front ofsum and place negative sign in front ofsum. The answer is negative.sum. The answer is negative.

  • 8/8/2019 Lecture 2 Digital and Logic Components

    23/97

    Example 1 (Decimal unsigned numbers),

    perform the subtraction 72532 - 13250 = 59282.

    M >N : Case 1 Do not take complement of sum

    and discard carry

    The 10s complement of 13250 is 86750.

    Therefore:

    M= 72532

    10s complement ofN =+86750

    Sum= 159282

    Discard end carry 105

    = - 100000Answer = 59282 no complement

  • 8/8/2019 Lecture 2 Digital and Logic Components

    24/97

    Example 2;

    Now consider an example with M

  • 8/8/2019 Lecture 2 Digital and Logic Components

    25/97

    Digital Computers (Terminology)Digital Computers (Terminology) Use the Binary Number system 0 and 1Use the Binary Number system 0 and 1 Bit is a Single Binary NumberBit is a Single Binary Number Byte is a group of 8 bitsByte is a group of 8 bits Group ofbits in a digital computer are used to represent a many differentGroup ofbits in a digital computer are used to represent a many different

    thingthing E.g. 1001011 represent a binary number whose decimal equivalent is 75E.g. 1001011 represent a binary number whose decimal equivalent is 75 It can also represent a letter K when used in conjunction with a binaryIt can also represent a letter K when used in conjunction with a binary

    code for the alphabet lettercode for the alphabet letter Hardware and SoftwareHardware and Software Computer Organization (how the H/W components connects and operates )Computer Organization (how the H/W components connects and operates ) Computer Design ( specifications based H/W and how?)Computer Design ( specifications based H/W and how?) Computer Architecture (structure and behaviour as seen by the user.Computer Architecture (structure and behaviour as seen by the user.

    Instruction formats, instruction set and techniques for addressing memory)Instruction formats, instruction set and techniques for addressing memory) AnAn instruction setinstruction set, or, or instruction set architectureinstruction set architecture (ISA), is the part(ISA), is the part

    of the computer architecture related to programming, including the nativeof the computer architecture related to programming, including the nativedata types, instructions, registers, addressing modes, memorydata types, instructions, registers, addressing modes, memoryarchitecture, interrupt and exception handling, and external I/O. An ISAarchitecture, interrupt and exception handling, and external I/O. An ISAincludes a specification of the set of opcodes (machine language), andincludes a specification of the set of opcodes (machine language), andthe native commands implemented by a particular processor.the native commands implemented by a particular processor.

  • 8/8/2019 Lecture 2 Digital and Logic Components

    26/97

    Boolean Operations and ExpressionsBoolean Operations and Expressions

    Boolean AdditionBoolean AdditionLogical OR operationLogical OR operation

    Ex 4Ex 4--1) Determine the values of A, B, C, and D that make the sum1) Determine the values of A, B, C, and D that make the sumterm A+B+C+Dterm A+B+C+D

    Sol) all literals mustbe 0 for the sum term to be 0Sol) all literals mustbe 0 for the sum term to be 0

    A+B+C+D=0+1+0+1=0A+B+C+D=0+1+0+1=0ppA=0, B=1, C=0, and D=1A=0, B=1, C=0, and D=1

    Boolean MultiplicationBoolean MultiplicationLogical AND operationLogical AND operation

    Ex 4Ex 4--2) Determine the values of A, B, C, and D for ABCD=12) Determine the values of A, B, C, and D for ABCD=1

    Sol) all literals mustbe 1 for the product term to be 1Sol) all literals mustbe 1 for the product term to be 1

    ABCD=1010=1ABCD=1010=1ppA=1, B=0, C=1, and D=0A=1, B=0, C=1, and D=0

  • 8/8/2019 Lecture 2 Digital and Logic Components

    27/97

    IntroductionIntroduction

    Boolean Algebra George Boole(English mathematician), 1854

    An Investigation of the Laws of Thought, on WhichAre Founded the Mathematical Theories ofLogic and

    ProbabilitiesBoolean Algebra{(1,0), Var, (NOT, AND, OR), Thms}

    Mathematical tool to expression and analyze digital

    (logic) circuits Claude Shannon, the first to apply Booles work, 1938

    A Symbolic Analysis of Relay and Switching Circuitsat MIT

  • 8/8/2019 Lecture 2 Digital and Logic Components

    28/97

    Logic GatesLogic Gates

    Logic circuits are built from components calledLogic circuits are built from components calledlogic gates.logic gates.

    The logic gates correspond to Boolean operationsThe logic gates correspond to Boolean operations+, *,+, *, ..

    Binary operations have two inputs, unary has oneBinary operations have two inputs, unary has one

    OR

    +

    AND

    *

  • 8/8/2019 Lecture 2 Digital and Logic Components

    29/97

    Basic logic gatesBasic logic gates

    NotNot

    AndAnd OrOr

    NandNand

    NorNor

    XorXor

  • 8/8/2019 Lecture 2 Digital and Logic Components

    30/97

    XOR and XNOR GatesXOR and XNOR Gates XOR is used to choose between two mutually exclusiveXOR is used to choose between two mutually exclusive

    inputs. Unlike OR, XOR is true only when one input orinputs. Unlike OR, XOR is true only when one input orthe other is true, notboth.the other is true, notboth.

    XOR

    XNOR

    AA BB AABB

    00 00 0000 11 11

    11 00 11

    11 11 00

    A B A B0 0 1

    0 1 0

    1 0 0

    1 1 1

  • 8/8/2019 Lecture 2 Digital and Logic Components

    31/97

    NAND and NOR as Universal LogicNAND and NOR as Universal Logic

    GatesGates Any logic circuitAny logic circuit

    can be built usingcan be built using

    only NAND gates,only NAND gates,or only NORor only NORgates. They aregates. They arethe only logicthe only logic

    gate needed.gate needed. Here are theHere are the

    NANDNANDequivalents:equivalents:

  • 8/8/2019 Lecture 2 Digital and Logic Components

    32/97

    NAND and NOR as Universal LogicNAND and NOR as Universal Logic

    Gates (cont)Gates (cont) Here are theHere are theNORNOR

    equivalents:equivalents: NAND and NORNAND and NOR

    can be used tocan be used to

    reduce thereduce thenumber ofnumber ofrequired gatesrequired gatesin a circuit.in a circuit.

  • 8/8/2019 Lecture 2 Digital and Logic Components

    33/97

    Properties ofNAND AND NORProperties ofNAND AND NOR NAND and NOR have special properties,NAND and NOR have special properties,but neither satisfies the distributive orbut neither satisfies the distributive orassociative laws.associative laws.

    NANDNAND NORNORxxoo1=X1=X xxqq0=X0=X

    xx oo 0=10=1 xx qq 1=01=0

    xx oo x=Xx=X xx qq x=Xx=X

    xx oo y=X+Yy=X+Y xx qq y=XYy=XY

    XX oo Y=x+yY=x+y XX qq Y=xyY=xy

    not (xnot (x oo y)=xyy)=xy not (xnot (x qq y)=x+yy)=x+y

    It should be clear by looking at these properties thatIt should be clear by looking at these properties that

    NAND and NOR are dualsNAND and NOR are duals

  • 8/8/2019 Lecture 2 Digital and Logic Components

    34/97

    Boolean functions : NOT, AND, OR,Boolean functions : NOT, AND, OR,

    exclusive OR(XOR) : odd functionexclusive OR(XOR) : odd function

    exclusive NOR(XNOR) : even function(equivalence)exclusive NOR(XNOR) : even function(equivalence)

    Basic FunctionsBasic Functions

  • 8/8/2019 Lecture 2 Digital and Logic Components

    35/97

    ANDZ=X Y or Z=XY

    Z=1 if and only if X=1 and Y=1, otherwise Z=0

    ORZ=X + YZ=1 if X=1 or if Y=1, or both X=1and Y=1. Z=0 if

    and only if X=0 and Y=0

    NOT Z=Xd orZ=1 if X=0, Z=0 if X=1

    Basic Functions

  • 8/8/2019 Lecture 2 Digital and Logic Components

    36/97

    36

    Basic Functions

  • 8/8/2019 Lecture 2 Digital and Logic Components

    37/97

    Basic Identities of Boolean Algebra

    The relationship betweena single variable X, itscomplement Xd, and thebinary constants 0 and 1

  • 8/8/2019 Lecture 2 Digital and Logic Components

    38/97

    Laws of Boolean AlgebraLaws of Boolean Algebra

    Commutative LawCommutative Lawthe order of literals does not matterthe order of literals does not matter

    A + B = B + AA + B = B + A

    A B = B AA B = B A

  • 8/8/2019 Lecture 2 Digital and Logic Components

    39/97

    Associative LawAssociative Lawthe grouping of literals does not matterthe grouping of literals does not matter

    A + (B + C) = (A + B) + CA + (B + C) = (A + B) + C (=A+B+C)(=A+B+C)

    A(BC) = (AB)CA(BC) = (AB)C (=ABC)(=ABC)

    Laws of Boolean AlgebraLaws of Boolean Algebra

  • 8/8/2019 Lecture 2 Digital and Logic Components

    40/97

    Distributive Law : A(B + C) = AB + ACDistributive Law : A(B + C) = AB + AC

    X=Y

    Laws of Boolean AlgebraLaws of Boolean Algebra

  • 8/8/2019 Lecture 2 Digital and Logic Components

    41/97

    ((A+B)(C+D) = AC + AD + BC + BDA+B)(C+D) = AC + AD + BC + BD

    X=Y

    Laws of Boolean AlgebraLaws of Boolean Algebra

  • 8/8/2019 Lecture 2 Digital and Logic Components

    42/97

    A+0=AA+0=A

    In math if you add 0 you have changed nothingIn math if you add 0 you have changed nothingin Boolean Algebra ORing with 0 changesin Boolean Algebra ORing with 0 changes

    nothingnothing

    X=A+0=A

    Rules of Boolean Algebra

  • 8/8/2019 Lecture 2 Digital and Logic Components

    43/97

    A+1=1A+1=1

    ORing with 1 must give a 1 since if anyORing with 1 must give a 1 since if anyinput is 1 an OR gate will give a 1input is 1 an OR gate will give a 1

    X=A+1=1

    Rules of Boolean AlgebraRules of Boolean Algebra

  • 8/8/2019 Lecture 2 Digital and Logic Components

    44/97

    AA0=00=0

    In math if 0 is multiplied with anythingIn math if 0 is multiplied with anythingyou get 0. If you AND anything with 0you get 0. If you AND anything with 0you get 0you get 0

    X=A0= 0

    Rules of Boolean AlgebraRules of Boolean Algebra

  • 8/8/2019 Lecture 2 Digital and Logic Components

    45/97

    AA1 =A1 =A

    ANDing anything with 1 will yield the anythingANDing anything with 1 will yield the anything

    X=A1=A

    A

    Rules of Boolean AlgebraRules of Boolean Algebra

    l f l l bl f l l b

  • 8/8/2019 Lecture 2 Digital and Logic Components

    46/97

    A+A = AA+A = A

    ORing with itself will give the same resultORing with itself will give the same result

    Rules of Boolean AlgebraRules of Boolean Algebra

    R l f B l Al bR l f B l Al b

  • 8/8/2019 Lecture 2 Digital and Logic Components

    47/97

    A+A =1A+A =1

    Either A or A mustbe 1 so A + A =1Either A or A mustbe 1 so A + A =1

    Rules of Boolean AlgebraRules of Boolean Algebra

    R l f B l Al bR l f B l Al b

  • 8/8/2019 Lecture 2 Digital and Logic Components

    48/97

    AAA = AA = A

    ANDing with itself will give the same resultANDing with itself will give the same result

    Rules of Boolean AlgebraRules of Boolean Algebra

    R l f B l Al bR l f B l Al b

  • 8/8/2019 Lecture 2 Digital and Logic Components

    49/97

    AAA =0A =0

    In digital Logic 1 =0 and 0 =1, so AA=0In digital Logic 1 =0 and 0 =1, so AA=0since one of the inputs mustbe 0.since one of the inputs mustbe 0.

    Rules of Boolean AlgebraRules of Boolean Algebra

    R l f B l Al b (R l f B l Al b ())

  • 8/8/2019 Lecture 2 Digital and Logic Components

    50/97

    50

    A = (A )A = (A )

    If you not something twice you are back to the beginningIf you not something twice you are back to the beginning

    Rules of Boolean Algebra (Rules of Boolean Algebra ())

    R l f B l Al bR l f B l Al b

  • 8/8/2019 Lecture 2 Digital and Logic Components

    51/97

    A + AB = A

    Rules of Boolean AlgebraRules of Boolean Algebra

    R l f B l Al bR l f B l Al b

  • 8/8/2019 Lecture 2 Digital and Logic Components

    52/97

    A + A B = A + BA + A B = A + B

    If A is 1 the output is 1 If A is 0 the output isIf A is 1 the output is 1 If A is 0 the output isBB

    Rules of Boolean AlgebraRules of Boolean Algebra

    R l f B l Al bR l f B l Al b

  • 8/8/2019 Lecture 2 Digital and Logic Components

    53/97

    A

    B

    C

    X

    Y

    (A + B)(A + C) = A + BC

    Rules of Boolean AlgebraRules of Boolean Algebra

    DeMorgan s Theorems

  • 8/8/2019 Lecture 2 Digital and Logic Components

    54/97

    DeMorgans TheoremFd(A,Ad, , + , 1,0) = F(Ad, A, + ,,0,1)

    (A B) = A + B and (A + B) = A B DeMorgans theorem will help to simplify digitalcircuits using NORs and NANDs his theoremstates

    DeMorgan s Theorems

  • 8/8/2019 Lecture 2 Digital and Logic Components

    55/97

  • 8/8/2019 Lecture 2 Digital and Logic Components

    56/97

    Look at (A +B +C + D) = A B C D

  • 8/8/2019 Lecture 2 Digital and Logic Components

    57/97

    How to add binary numbersHow to add binary numbers

    Consider adding two 1Consider adding two 1--bitbinary numbersbitbinary numbers xx andand yy 0+0 = 00+0 = 0

    0+1 = 10+1 = 1

    1+0 = 11+0 = 1 1+1 = 101+1 = 10

    Carry isCarry is xx ANDAND yy Sum isSum is xx XORXOR yy The circuit to compute this is called a halfThe circuit to compute this is called a half--adderadder

    xx yy CarryCarry SumSum

    00 00 00 0000 11 00 11

    11 00 00 11

    11 11 11 00

  • 8/8/2019 Lecture 2 Digital and Logic Components

    58/97

    The halfThe half--adderadder

    Sum =Sum = xx XORXOR y (x`y + y`x)y (x`y + y`x) Carry =Carry = xx ANDAND y (xy)y (xy)

  • 8/8/2019 Lecture 2 Digital and Logic Components

    59/97

    Using half addersUsing half adders

    We can then use a halfWe can then use a half--adder to computeadder to computethe sum of two Boolean numbersthe sum of two Boolean numbers

    1 1 0 01 1 0 0

    ++ 1 1 1 01 1 1 0

    001100??

    000011

  • 8/8/2019 Lecture 2 Digital and Logic Components

    60/97

    How to fix thisHow to fix this We need to create an adder that can take aWe need to create an adder that can take a

    carry bit as an additional inputcarry bit as an additional input Inputs:Inputs: xx,, yy, carry in, carry in

    Outputs: sum, carry outOutputs: sum, carry out

    This is called a full adderThis is called a full adder Will addWill add xx andand yy with a halfwith a half--adderadder

    Will add the sum of that to theWill add the sum of that to thecarry incarry in

    What about the carry out?What about the carry out? Its 1 if either (or both):Its 1 if either (or both):

    xx++yy = 10= 10

    xx++yy = 01 and carry in = 1= 01 and carry in = 1

    xx yy cc CarryCarry sumsum

    11 11 11 11 1111 11 00 11 00

    11 00 11 11 00

    11 00 00 00 11

    00 11 11 11 0000 11 00 00 11

    00 00 11 00 11

    00 00 00 00 00

  • 8/8/2019 Lecture 2 Digital and Logic Components

    61/97

    The full adderThe full adder

    The HA boxes are halfThe HA boxes are half--addersadders

  • 8/8/2019 Lecture 2 Digital and Logic Components

    62/97

    The full adderThe full adder

    The full circuitry of the full adderThe full circuitry of the full adder

  • 8/8/2019 Lecture 2 Digital and Logic Components

    63/97

    Adding bigger binary numbersAdding bigger binary numbers

    Just chain full adders togetherJust chain full adders together

  • 8/8/2019 Lecture 2 Digital and Logic Components

    64/97

    Adding bigger binary numbersAdding bigger binary numbers

    A half adder has 4 logic gatesA half adder has 4 logic gates A full adder has two half adders plus a OR gateA full adder has two half adders plus a OR gate

    Total of 9 logic gatesTotal of 9 logic gates

    To addTo add nn bitbinary numbers, you need 1 HA andbitbinary numbers, you need 1 HA andnn--1 FAs1 FAs

    To add 32 bitbinary numbers, you need 1 HATo add 32 bitbinary numbers, you need 1 HA

    and 31 FAsand 31 FAs Total of 4+9*31 = 283 logic gatesTotal of 4+9*31 = 283 logic gates To add 64 bitbinary numbers, you need 1 HATo add 64 bitbinary numbers, you need 1 HA

    and 63 FAsand 63 FAs Total of 4+9*63 = 571 logic gatesTotal of 4+9*63 = 571 logic gates

  • 8/8/2019 Lecture 2 Digital and Logic Components

    65/97

    ICs (Integrated Circuits)ICs (Integrated Circuits) is a small silicon semiconductor crystal called as chip,is a small silicon semiconductor crystal called as chip,

    containing the electronic components for the digitalcontaining the electronic components for the digitalgates.gates.

    ICs constitutes the digital circuitsICs constitutes the digital circuits

    Various gates are interconnected inside the chip toVarious gates are interconnected inside the chip toform a required circuitform a required circuit SSI < 10 gatesSSI < 10 gates MSI < 10MSI < 10 200 gates (decoders, adders , registers)200 gates (decoders, adders , registers) LSI 200LSI 200-- few 1000 (digital systems like processors,few 1000 (digital systems like processors,

    memory chip, and programmable modules)memory chip, and programmable modules) VLSI > 1000s of gates (large memory arrays andVLSI > 1000s of gates (large memory arrays and

    complex microcomputer chips)complex microcomputer chips) ULSI > 1 million gates/transistors.ULSI > 1 million gates/transistors.

  • 8/8/2019 Lecture 2 Digital and Logic Components

    66/97

    Integrated Circuits (contt.)Integrated Circuits (contt.)

    Classification of ICs by specific circuitClassification of ICs by specific circuittechnology (digital logic family):technology (digital logic family): 1. TTL Transistor Transistor Logic (std.)1. TTL Transistor Transistor Logic (std.)

    2. ECL Emitter coupled Logic (high speed2. ECL Emitter coupled Logic (high speedoperations)operations)

    3. MOS Metal3. MOS Metal--oxide semi conductor (highoxide semi conductor (high

    component density)component density) 4. CMOS Complementary metal oxide semi4. CMOS Complementary metal oxide semi

    conductor (low power consumption)conductor (low power consumption)

  • 8/8/2019 Lecture 2 Digital and Logic Components

    67/97

    TTLTTL evolutes from previous technology of diodesevolutes from previous technology of diodes

    and transistors for basic NAND gates (DTL)and transistors for basic NAND gates (DTL)

    variations of TTL are high speed TTL, lowvariations of TTL are high speed TTL, low

    power TTL, low power Schottky TTL (basepower TTL, low power Schottky TTL (basecollector voltage to 400 mV which preventscollector voltage to 400 mV which preventsthe transistor form saturation therebythe transistor form saturation therebyincreasing the switching speed), andincreasing the switching speed), and

    advanced Schottky TTL.advanced Schottky TTL.

    Power Supply voltage for TTL circuits is 5 voltsPower Supply voltage for TTL circuits is 5 voltsand the two logic levels are 0 and 3.5 voltsand the two logic levels are 0 and 3.5 volts

  • 8/8/2019 Lecture 2 Digital and Logic Components

    68/97

    ECLECL

    Provides the highest speed digital circuitsProvides the highest speed digital circuitsin integrated form.in integrated form.

    Used in supercomputers and signalUsed in supercomputers and signalprocessors where high speed is desirable.processors where high speed is desirable.

    Transistors here operate in a nonsaturatedTransistors here operate in a nonsaturated

    state a condition that allow propagationstate a condition that allow propagationdelays of 1 to 2 ns.delays of 1 to 2 ns.

  • 8/8/2019 Lecture 2 Digital and Logic Components

    69/97

    MOSMOS

    A unipolar transistor that depends on theA unipolar transistor that depends on theflow of only one type of carrier., whichflow of only one type of carrier., which

    may be electrons (n channel) or holes (pmay be electrons (n channel) or holes (pchannel)channel)

    A pA p--channel MOS is referred to as PMOSchannel MOS is referred to as PMOS

    and an nand an n-- channel as NMOS.channel as NMOS.

  • 8/8/2019 Lecture 2 Digital and Logic Components

    70/97

    CMOSCMOS

    it uses PMOS and NMOS connected init uses PMOS and NMOS connected incomplementary fashion in all circuits.complementary fashion in all circuits.

    High packing density of circuits.High packing density of circuits. A simpler processing technique duringA simpler processing technique during

    fabricationfabrication

    Low power consumptionLow power consumption

    Used in microprocessors, microcontrollers, staticUsed in microprocessors, microcontrollers, staticRAM, and other digital logic circuitsRAM, and other digital logic circuits High Noise ImmunityHigh Noise Immunity

  • 8/8/2019 Lecture 2 Digital and Logic Components

    71/97

    Advantages of ICs over DiscreteAdvantages of ICs over Discrete

    circuitscircuits Cost And PerformanceCost And Performance Low Cost BecauseLow Cost Because

    The chips with their components are printed a s a singleThe chips with their components are printed a s a singleunitby process called photolithography and notunitby process called photolithography and not

    constructed as one transistor at a time.constructed as one transistor at a time. Less material is required to construct as a packaged IC dieLess material is required to construct as a packaged IC diethen as a discrete circuitthen as a discrete circuit

    Better PerformanceBetter Performance Components can switch quickly ,Components can switch quickly ,

    chip areas range from a few square millimeters to aroundchip areas range from a few square millimeters to around350350 mm2, with up to 1 million transistors per mm2mm2, with up to 1 million transistors per mm2

    low power consumption because components are smalllow power consumption because components are smalland close together.and close together.

  • 8/8/2019 Lecture 2 Digital and Logic Components

    72/97

    Notable ICsNotable ICs

    The 555 common multivibrator subThe 555 common multivibrator sub--circuit (common in electroniccircuit (common in electronictiming circuits)timing circuits)

    The 741 operational amplifierThe 741 operational amplifier 7400 series TTL logic building blocks7400 series TTL logic building blocks

    4000 series, the CMOS counterpart to the 7400 series (see also:4000 series, the CMOS counterpart to the 7400 series (see also:74HC00 series)74HC00 series) Intel 4004, the world's first microprocessor, which led to the famousIntel 4004, the world's first microprocessor, which led to the famous

    8080 CPU and then the IBM PC's 8088, 80286, 486 etc.8080 CPU and then the IBM PC's 8088, 80286, 486 etc. The MOS Technology 6502 and Zilog Z80 microprocessors, used inThe MOS Technology 6502 and Zilog Z80 microprocessors, used in

    many home computers of the early 1980smany home computers of the early 1980s

    The Motorola 6800 series of computerThe Motorola 6800 series of computer--related chips, leading to therelated chips, leading to the68000 and 88000 series (used in some Apple computers).68000 and 88000 series (used in some Apple computers).

    combinational logic circuit andcombinational logic circuit and

  • 8/8/2019 Lecture 2 Digital and Logic Components

    73/97

    combinational logic circuit andcombinational logic circuit andsequential logic circuitsequential logic circuit

    A sequential circuit uses flip flops. Unlike combinationalA sequential circuit uses flip flops. Unlike combinationallogic, sequential circuits have state, which meanslogic, sequential circuits have state, which meansbasically, sequential circuits have memory.basically, sequential circuits have memory.

    The main difference between sequential circuits andThe main difference between sequential circuits andcombinational circuits is that sequential circuits computecombinational circuits is that sequential circuits compute

    their outputbased on input and state, and that the statetheir outputbased on input and state, and that the stateis updated based on a clock. Combinational logic circuitsis updated based on a clock. Combinational logic circuitsimplement Boolean functions, so they are functions onlyimplement Boolean functions, so they are functions onlyof their inputs, and are notbased on clocks.of their inputs, and are notbased on clocks.

    Combinational Circuit does not depend on the previousCombinational Circuit does not depend on the previousand next state inputs but this sequential circuit areand next state inputs but this sequential circuit aredependent on those factors.dependent on those factors.

  • 8/8/2019 Lecture 2 Digital and Logic Components

    74/97

    difference between characteristicdifference between characteristic

    tables and excitation tablestables and excitation tables A characteristic table has the control input (i.e., D or T) asA characteristic table has the control input (i.e., D or T) asthe first column, the current state as the middle column, andthe first column, the current state as the middle column, andthe next state as the last column. Basically, it tells you howthe next state as the last column. Basically, it tells you how

    the control bit affects the current state to produce the nextthe control bit affects the current state to produce the nextstate.state.

    An excitation table has the current state as the first column,An excitation table has the current state as the first column,the next state as the second column, and the control bit asthe next state as the second column, and the control bit asthe third column. Basically, think of this as the state youthe third column. Basically, think of this as the state you

    have (first column), the state you want (second column),have (first column), the state you want (second column),and what you must set the control bit (third column) to getand what you must set the control bit (third column) to getthe desired state you want. The excitation table is used tothe desired state you want. The excitation table is used toimplement an FSM.implement an FSM.

  • 8/8/2019 Lecture 2 Digital and Logic Components

    75/97

    Combinational LogicCombinational Logic

    Outputs, at any time, are determined by the inputOutputs, at any time, are determined by the input

    combinationcombination Examples of combinational logic are:Examples of combinational logic are:

    Multiplexers / DeMultiplexers / De--MultiplexersMultiplexers

    Decoders / EncodersDecoders / Encoders

    Binary Adders / SubtractorsBinary Adders / Subtractors

    Combinationalcircuits

    Ninputs

    Moutputs

  • 8/8/2019 Lecture 2 Digital and Logic Components

    76/97

    MultiplexersMultiplexers A multiplexer is a digital switchA multiplexer is a digital switch

    -- it connects data from one of n sources to its outputit connects data from one of n sources to its output

    Multiplexers also known asMultiplexers also known as

    Data SelectorsData Selectors An nAn n--input and binput and b--bit multiplexer has n sources of data, eachbit multiplexer has n sources of data, each

    of which bbits wide, and there are b outputbits.of which bbits wide, and there are b outputbits.

    A multiplexer is a unidirectional device.A multiplexer is a unidirectional device.

    Multiplexers are used in any application in which data mustbeMultiplexers are used in any application in which data mustbeswitched from multiple sources to a destination.switched from multiple sources to a destination.e.g., processors registers to ALUe.g., processors registers to ALU

  • 8/8/2019 Lecture 2 Digital and Logic Components

    77/97

    Example of a Combinatorial Circuit:Example of a Combinatorial Circuit:A Multiplexer (MUX)A Multiplexer (MUX)

    Consider an integer m, which isConsider an integer m, which is

    constrained by the following relation:constrained by the following relation:

    m = 2m = 2nn,,

    where m and n are both integers.where m and n are both integers. A mA m--toto--1 Multiplexer1 Multiplexer hashas

    m Inputs: Im Inputs: I00, I, I11, I, I22, ................ I, ................ I(m(m--1)1) one Output: Yone Output: Y

    n Control inputs: Sn Control inputs: S00, S, S11, S, S22, ...... S, ...... S(n(n--1)1)One (or more) Enable input(s)One (or more) Enable input(s)

    such that Y may be equal to one of the inputs,such that Y may be equal to one of the inputs,depending upon the control inputs.depending upon the control inputs.

  • 8/8/2019 Lecture 2 Digital and Logic Components

    78/97

    Multiplexers (Mux)Multiplexers (Mux)

    Functionality:Functionality:Selection of aSelection of aparticular inputparticular input

    Route 1 ofN inputsRoute 1 ofN inputs(A) to the output F(A) to the output F

    RequireRequire

    selection bits (S)selection bits (S) En(able) bit canEn(able) bit can

    disable the route anddisable the route andset F to 0set F to 0

    F

    A0

    A1

    A2

    A3S1 S0

    En

    44--toto--11MuxMux

    N

    2log

  • 8/8/2019 Lecture 2 Digital and Logic Components

    79/97

    Multiplexers (Mux) w/out EnableMultiplexers (Mux) w/out Enable

    F

    A0

    A1

    A2

    A3S1 S0

    44--toto--11MuxMux

    S1S1 S0S0 A3A3 A2A2 A1A1 A0A0 FF

    00 00 XX XX XX 00 00

    00 11 XX XX 00 XX 00

    11 00 XX 00 XX XX 00

    11 11 00 XX XX XX 00

    00 00 XX XX XX 11 11

    00 11 XX XX 11 XX 11

    11 00 XX 11 XX XX 11

    11 11 11 XX XX XX 11

  • 8/8/2019 Lecture 2 Digital and Logic Components

    80/97

    Multiplexers (Mux) w/out EnableMultiplexers (Mux) w/out Enable

    S1S1 S0S0 FF

    00 00 A0A0

    00 11 A1A1

    11 00 A2A2

    11 11 A3A3

    F

    A0

    A1

    A2

    A3S1 S0

    44--toto--11MuxMux

    30121101001 ASSAS0SASSASSF !

  • 8/8/2019 Lecture 2 Digital and Logic Components

    81/97

    Logic Diagram of a 4Logic Diagram of a 4--toto--1 Mux1 Mux

    30121101001 ASSAS0SASSASSF !

    S1

    S0

    A0

    A1

    A2

    A3

    F

  • 8/8/2019 Lecture 2 Digital and Logic Components

    82/97

    Multiplexers (Mux) w/ EnableMultiplexers (Mux) w/ Enable

    EnEn S1S1 S0S0 FF

    00 XX XX 00

    11 00 00 A0A0

    11 00 11 A1A1

    11 11 00 A2A2

    11 11 11 A3A3

    30121101001

    30121101001

    En0EnEnEn

    )0(En

    !

    !

    F

    A0

    A1

    A2

    A3S1 S0

    En

    44--toto--11MuxMux

  • 8/8/2019 Lecture 2 Digital and Logic Components

    83/97

    Flip FlopsFlip Flops

    aa flipflip--flopflop is a term referring to anis a term referring to anelectronic circuit (a bistable multivibrator)electronic circuit (a bistable multivibrator)that has two stable states and thereby isthat has two stable states and thereby is

    capable of serving as one bit of memory.capable of serving as one bit of memory.A flipA flip--flop is usually controlled by one orflop is usually controlled by one ortwo control signals and/or a gate or clocktwo control signals and/or a gate or clocksignal. The output often includes thesignal. The output often includes thecomplement as well as the normal outputcomplement as well as the normal output

  • 8/8/2019 Lecture 2 Digital and Logic Components

    84/97

    MemoryMemory

    A flipA flip--flop holds a single bit of memoryflop holds a single bit of memory The bit flipThe bit flip--flops between the two NANDflops between the two NAND

    gatesgates

    In reality, flipIn reality, flip--flops are a bit moreflops are a bit morecomplicatedcomplicated Have 5 (or so) logic gates (transistors) perHave 5 (or so) logic gates (transistors) per

    flipflip--flopflop

    Consider a 1 Gb memory chipConsider a 1 Gb memory chip 1 G b = 8,589,934,592 bits of memory1 Gb = 8,589,934,592 bits of memory

    Thats about 43 million transistors!Thats about 43 million transistors!

    In reality, those transistors are split intoIn reality, those transistors are split into9 ICs of about 5 million transistors each9 ICs of about 5 million transistors each

  • 8/8/2019 Lecture 2 Digital and Logic Components

    85/97

    RegistersRegisters

    A group of flip flops with each flip flop capable of storingA group of flip flops with each flip flop capable of storingone bit of informationone bit of information

    An nAn n--bit register is a group of n flipbit register is a group of n flip--flop capable of storingflop capable of storing

    any binary information of nany binary information of n--bits.bits. A register can have FlipA register can have Flip--flop along with combinationalflop along with combinationalgates that performs data processing tasks.gates that performs data processing tasks.

    A register consist of a group of flip flops and gates whichA register consist of a group of flip flops and gates whicheffect their transition.effect their transition.

    A flip flop holds the binary information and the gatesA flip flop holds the binary information and the gatescontrol when and how new information is transferred intocontrol when and how new information is transferred intoregisters.registers.

  • 8/8/2019 Lecture 2 Digital and Logic Components

    86/97

    Shift RegistersShift Registers

    A shift register is a register in which theA shift register is a register in which thecontents may be shifted one or morecontents may be shifted one or more

    places to the left or right. This type ofplaces to the left or right. This type ofregister is capable of performing a varietyregister is capable of performing a varietyof functions. It may be used for serialof functions. It may be used for serial--toto--parallel conversion and for scaling binaryparallel conversion and for scaling binarynumbers.numbers.

    Shift Registers CharacteristicsShift Registers Characteristics

  • 8/8/2019 Lecture 2 Digital and Logic Components

    87/97

    Shift Registers CharacteristicsShift Registers Characteristics

    1.1. It is a temporary memory and holds theIt is a temporary memory and holds thenumbers on display.numbers on display.

    2.2. It shifts the number to the to the left onIt shifts the number to the to the left onthe display each time a new digit isthe display each time a new digit is

    pressed on the keyboard.pressed on the keyboard. Calculator Example:Calculator Example:

    Press & release 1 on keyboard & 1 displayedPress & release 1 on keyboard & 1 displayedright.right.

    Press & release 1 on keyboard & 1 displayedPress & release 1 on keyboard & 1 displayedright, 11 displayed.right, 11 displayed.

    Press & release 3 on keyboard & 3 displayedPress & release 3 on keyboard & 3 displayedright, 113 displayed.right, 113 displayed.

    g a ys em s ngg a ys em s ng

  • 8/8/2019 Lecture 2 Digital and Logic Components

    88/97

    RegistersRegistersInputInputKeyboarKeyboardd

    7 8 9

    1

    4 5 6

    2 3

    0

    EncoderShift

    RegisterDecoder

    OutputOutputDisplayDisplay

    4-bit serial load shift register

    Shift

    RegisterProcessing

    Unit

    D Q

    CLK

    CLR

    FF A

    D Q

    CLK

    CLRFF A

    D Q

    CLK

    CLRFF A

    D Q

    CLK

    CLRFF A

    LineLine

    ##

    InputsInputs OutputsOutputs

    ClearClear DataData ClockClockPulsePulse

    ##

    FF AFF A FF BFF B FF CFF C FF DFF D

    AA BB CC DD

    11 00 00 00 00 00 00 00

    22 11 11 00 00 00 00 00

    33 11 11 11 11 00 00 00

    44 11 11 22 11 11 00 00

    55 11 11 33 11 11 11 00

    66 11 00 44 00 11 11 11

    77 11 00 55 00 00 11 11

    88 11 00 66 00 00 00 11

    99 11 00 77 00 00 00 00

    1010 11 00 88 00 00 00 00

    1111 11 11 99 11 00 00 00

    1212 11 00 1010 00 11 00 00

    1313 11 00 1111 00 00 11 00

    1414 11 00 1212 00 00 00 11

    1515 11 00 1313 00 00 00 00

    A B C D

    Data

    Input

    Clock

    Clear

  • 8/8/2019 Lecture 2 Digital and Logic Components

    89/97

    Register ClassificationsRegister Classifications

    MSB LSB

    Where bits come in & goWhere bits come in & goout:out:

    Serial inSerial in--serial out.serial out.

    Parallel inParallel in--serial out.serial out.

    Serial inSerial in-- parallel out.parallel out.

    Parallel inParallel in--parallel out.parallel out.

    MSB LSB

    Serial & Parallel Transfers &Serial & Parallel Transfers &

  • 8/8/2019 Lecture 2 Digital and Logic Components

    90/97

    Serial & Parallel Transfers &Serial & Parallel Transfers &ConversionConversion

    SERIAL TRANSFER means that the data isSERIAL TRANSFER means that the data ismoved along a single line one bit at amoved along a single line one bit at a

    time. A control pulse is required to movetime. A control pulse is required to moveeach bit.each bit.

    PARALLEL TRANSFER means that each bitPARALLEL TRANSFER means that each bit

    of data is moved on its own line and thatof data is moved on its own line and thatall bits transfer simultaneously as they didall bits transfer simultaneously as they didin the parallel register. A single controlin the parallel register. A single controlpulse is required to move all bits.pulse is required to move all bits.

  • 8/8/2019 Lecture 2 Digital and Logic Components

    91/97

    ScalingScaling

    SCALING means to change the magnitude ofSCALING means to change the magnitude ofa number. Shifting binary numbers to thea number. Shifting binary numbers to theleft increases their value, and shifting to theleft increases their value, and shifting to theright decreases their value. The increase orright decreases their value. The increase or

    decrease in value is based on powers of 2.decrease in value is based on powers of 2.A shift of one place to the left increases theA shift of one place to the left increases thevalue by a power of 2, which in effect isvalue by a power of 2, which in effect ismultiplying the number by 2.multiplying the number by 2.

  • 8/8/2019 Lecture 2 Digital and Logic Components

    92/97

    question 1question 1

    Write the circuits for the followingWrite the circuits for the followingBoolean algebraic expressionsBoolean algebraic expressions

    a)a) xx++yy____

    x x+y

  • 8/8/2019 Lecture 2 Digital and Logic Components

    93/97

    question 2question 2

    Write the circuits for the followingWrite the circuits for the followingBoolean algebraic expressionsBoolean algebraic expressions

    b)b) ((xx++yy))xx______________

    x+yx+y (x+y)x

  • 8/8/2019 Lecture 2 Digital and Logic Components

    94/97

    question 3question 3

    Write the circuits for the followingWrite the circuits for the followingBoolean algebraic expressionsBoolean algebraic expressions

    a)a) xx++yy

    ____

    x x+y

  • 8/8/2019 Lecture 2 Digital and Logic Components

    95/97

    question 4question 4

    Write the circuits for the followingWrite the circuits for the followingBoolean algebraic expressionsBoolean algebraic expressions

    b)b) ((xx++yy))xx______________

    x+yx+y (x+y)x

  • 8/8/2019 Lecture 2 Digital and Logic Components

    96/97

    Quick surveyQuick survey

    I felt I understood the material in this slideI felt I understood the material in this slidesetset

    a)a) Very wellVery wellb)b) With some review, Ill be goodWith some review, Ill be goodc)c) Not reallyNot really

    d)d)Not at allNot at all

  • 8/8/2019 Lecture 2 Digital and Logic Components

    97/97

    Quick surveyQuick survey

    I understand (more or less) aboutI understand (more or less) aboutadding binary numbers using logic gatesadding binary numbers using logic gates

    a)a) Absolutely!Absolutely!b)b) More or lessMore or lessc)c) Not reallyNot really

    d)d) Not at allNot at all