L11 Registers

download L11 Registers

of 10

Transcript of L11 Registers

  • 8/6/2019 L11 Registers

    1/10

    Registers

    A Register is a group of flip-flops that can be used to store abinary number/information.

    A register that stores 5-bit binary number must have 5 FFs. Soin general n-bit register has a group of n flip-flops and it canstore n bit binary information

    In addition to flip-flops, a register may have combinationalgates to perform certain data processing tasks

    So in registers flip flops hold binary information and gates

    control when and how new information is transferred into theregister.

  • 8/6/2019 L11 Registers

    2/10

    A register capable of shifting binary info. Either toright or to left is called a shift register.

    They are a group of flip-flops connected in a chain so

    that the output from one flip-flop becomes the input

    of the next flip-flop All the flip-flops are driven by a common clock, and

    all are set or reset simultaneously

    The clock pulse causes the shift from one stage to

    next.

    Shift Register

  • 8/6/2019 L11 Registers

    3/10

    Bits can be moved from one place to another in two ways.

    Serial shifting: shifts the data 1 bit at a time in serial fashion,

    starting with either MSB or LSB

    Parallel shifting: shifts all data bits simultaneously

    A register which shifts the bits in one direction only either to left

    or to right is called as unidirectional shift register1) Shift-right register

    2) Shift-left register

    Types of Registers

    --Serial in-Serial out

    --Serial in-parallel out

    --Parallel in-Serial out

    --Parallel in-parallel out

  • 8/6/2019 L11 Registers

    4/10

    Serial In - Serial Out Shift Register

    A basic four-bit shift register can be constructed using four Dflip-flops

    The register is first cleared, forcing all four FFs to store binary 0.

    The input data is then applied sequentially to the D input of the

    first flip-flop on the left (FF0). During each clock pulse, one bit

    is transmitted from left to right.

    Assume a data word to be 1001. The least significant bit of the

    data has to be shifted through the register from FF0 to FF3

  • 8/6/2019 L11 Registers

    5/10

    To readout the data, bits must be shifted out serially

    destructive readout: the original data is lost and at the end of

    the read cycle, all flip-flops are reset to zero

    Non-d

    estructive read

    out: any data shifted out of the registerat the right becomes the next input at the left, and is kept in the

    system

  • 8/6/2019 L11 Registers

    6/10

    Serial In - Parallel Out Shift Register

    A basic four-bit shift register can be constructed using four Dflip-flops

    The register is first cleared, forcing all four outputs to zero.

    The input data is then applied sequentially to the D input of the

    first flip-flop on the left (FF0). During each clock pulse, one bit

    is transmitted from left to right.

    Once the data are stored, each bit appears on its respective

    output line, and all bits are available simultaneously

  • 8/6/2019 L11 Registers

    7/10

    Parallel In - Serial Out Shift Register

    The circuit uses D flip-flops and NAND gates for entering data(i.e. writing) to the register.

    D0, D1, D2 and D3 are the parallel inputs, where D0 is the most

    significant bit and D3 is the least significant bit.

  • 8/6/2019 L11 Registers

    8/10

    To write the data, mode control line is taken to LOW, to shift the

    data, mode control line is taken to HIGH.

    The register performs right shift operation on the application of

    a clock pulse

  • 8/6/2019 L11 Registers

    9/10

    Parallel In - Parallel Out Shift Register

    D0, D1, D2, D3 are parallel inputs and corresponding Qs are

    parallel outputs. All data bits are entered simultaneously and once the register is

    clocked, all the data at the D inputs appear at the corresponding

    Q outputs simultaneously.

  • 8/6/2019 L11 Registers

    10/10

    USES:

    One of the most common uses of a shift register is toconvert between serial and parallel interfaces.

    Shift registers can be used as simple delay circuits.

    Several bi-directional shift registers could also beconnected in parallel for a hardware implementation

    of a Stack.

    Shift registers can be used as pulse generator.

    Random bit generator