Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • RTL Foundations36
  • Combinational Design25
  • Sequential Design27
    • Flip-Flops and Registers
    • Counters and Timers
    • Shift Registers and LFSRs
      • Serial and Parallel Data Movement
      • Universal Shift Register
      • LFSR for PRBS Generation
    • Pipelining
    • Stalls, Bubbles and Hazards
    • Retiming
  • FSM & Control27
  • Timing & Clocking39
  • Reset & CDC34
  • Memory & Buses57
  • Advanced RTL28
  • Senior & Interview76
  • Glossary and Notation
Loading lesson

‹Sequential Design
  1. Topics
  2. RTL Design
  3. Sequential Design
  4. Shift Registers and LFSRs

Part 3 · Sequential · Intermediate

Shift Registers and LFSRs

Shift registers move data bit by bit, from serial links to LFSR test sequences.

  • 3topics
  • 3lessons

Topics in this section

  1. 1Serial and Parallel Data Movement1 lesson
  2. 2Universal Shift Register1 lesson
  3. 3LFSR for PRBS Generation1 lesson
On this page

    A shift register moves one bit per clock through a chain of flip-flops. It underlies serial links, serializers and the LFSR.

    A chain of four flip-flops from serial input to serial output.
    A 4-bit shift register: one new bit enters per clock and every stored bit advances one position.

    Lessons in this topic

    3 lessons, about 14 min

    1. 1Serial and Parallel Data MovementYou can build a parallel-in serial-out and a serial-in parallel-out register, state the bit order, and weigh a serial link against a parallel bus.4 min
    2. 2Universal Shift RegisterYou can build a four-mode universal shift register and tell it apart from a barrel shifter.4 min
    3. 3LFSR for PRBS GenerationYou can build a maximal-length LFSR from a primitive polynomial, trace its state and serial output, and say what it is and is not used for.6 min
    Check yourself How many clock cycles does it take to move one byte through an 8-bit serial link, and how many flip-flops does the receiver need?

    8 clock cycles (one bit per cycle) and at least 8 flip-flops for the shift register, plus a small bit counter to know when the byte is complete.

    Interview

    Typical questions: “Convert a parallel byte to a serial stream”, “What is an LFSR and why is it maximal-length?”, and “Design a PRBS generator”. All three are in this topic.

    Revision sheet

    The whole topic on one page, taken from each lesson's Remember box. Read it before an interview, or print it.

    Serial and Parallel Data Movement

    • This page uses LSB-first order, as UART does; I2C data bytes go MSB-first.

    • The first bit sent lands in bit 0 of the receiver after W shifts.

    • A real link adds framing and a bit counter so the receiver knows where a byte begins.

    Rule of thumb: agree bit order and shift direction in writing, and check each wire bit against the source byte.

    Universal Shift Register

    • Each flop picks its own output, a neighbour or the parallel input.

    • Make the hold mode explicit, and use unique case so all four modes are covered.

    • It shifts one position per clock; a barrel shifter shifts any amount in one cycle.

    LFSR for PRBS Generation

    • A primitive polynomial makes every nonzero seed visit all 2^n - 1 states before repeating.

    • The all-zero state never leaves with XOR feedback, so the seed must be nonzero.

    • Tap numbering, shift direction and the sampling point change the stream phase; agree on them before connecting a checker.

    Rule of thumb: an LFSR suits test and scrambling, never secrets.

    Practise it

    • Mini project: a programmable timer with prescaler, compare and interrupt

    • Practice question: Shift register with parameterised depth and parallel load

    • Code lab: 8-bit shift register

    • Code lab: PRBS generator

    • Interview: run a mock interview on this topic

    PreviousNext: Serial and Parallel Data Movement

    Up next

    Up nextSerial and Parallel Data Movement

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Flip-Flops and Registers
    • Counters and Timers
    • Pipelining