Shift Registers

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/111

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:50 AM on 9/6/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

112 Terms

1
New cards

Shift Register

A sequential storage structure that can deliberately reposition the bits of its stored value across clock cycles.

2
New cards

Shift Register as a Data-Movement Structure

A register whose next-state behavior can change the positions of the bits already stored within it.

3
New cards

Storage + Controlled Repositioning

What two architectural capabilities are combined by a shift register?

4
New cards

The shift register calculates a repositioned version of its current stored word and commits that version as its next state.

Why is shifting considered a state transformation rather than merely movement through wires?

5
New cards

The current stored value.

From what value is the next shifted state derived?

6
New cards

Parallel Load

An operation that captures an entire multi-bit input word into the register during one clock event.

7
New cards

ParallelIn

The WIDTH-bit input bus containing the complete word that can be loaded into DataOut.

8
New cards

DataOut

The WIDTH-bit register that both stores the shift register's current state and exposes that state as the module output.

9
New cards

The entire ParallelIn word is captured into DataOut on the active clock edge.

What happens when load is asserted?

10
New cards

DataOut <= ParallelIn;

Which RTL statement implements parallel loading?

11
New cards

All WIDTH bits are loaded together.

Why is the operation called a parallel load?

12
New cards

It is the complete candidate word to replace the current stored state when load is asserted.

What architectural role does ParallelIn serve?

13
New cards

Right Shift

The operation that moves every stored bit one position toward the least-significant side.

14
New cards

DataOut <= DataOut >> 1;

Which RTL statement implements the shift operation?

15
New cards

The current DataOut value is logically shifted right by one position and stored back into DataOut.

What happens when shift is asserted and load is not asserted?

16
New cards

Logical Right Shift

A right shift that introduces zeros into the newly vacated most-significant bit positions.

17
New cards

A zero.

What bit value enters the most-significant side when DataOut >> 1 performs the project's logical right shift?

18
New cards

The previous least-significant bit is discarded.

What happens to the old DataOut[0] during a one-bit logical right shift?

19
New cards

Old DataOut[i+1] becomes new DataOut[i].

How do the retained bits move during the right shift?

20
New cards

DataOut >> 1

What expression computes the shift register's candidate next state during a shift?

21
New cards

Because the next stored value is calculated from DataOut's current stored value.

Why does the shift operation depend on previous machine state?

22
New cards

The register's own current state is transformed and written back as its next state.

What feedback-like behavior occurs in DataOut <= DataOut >> 1;?

23
New cards

WIDTH

A parameter defining the number of bits stored and shifted by the module.

24
New cards

8

What is the default value of the WIDTH parameter?

25
New cards

No. WIDTH can be overridden when the module is instantiated.

Is the ShiftRegister permanently restricted to eight bits?

26
New cards

Parameterized Shift Register

A shift-register module whose stored-word width can be changed through a parameter without rewriting its core behavior.

27
New cards

[WIDTH - 1:0]

What range declares ParallelIn and DataOut as WIDTH-bit vectors?

28
New cards

Changing WIDTH consistently changes the width of ParallelIn, DataOut, the reset value, and the shift operation.

Why is parameterization useful in this ShiftRegister?

29
New cards

Width-Independent RTL

RTL written so the same module description remains valid for different parameter values.

30
New cards

{WIDTH{1'b0}}

What expression generates the reset value for DataOut?

31
New cards

Replication Operator

The Verilog {N{value}} construction that repeats a bit pattern N times.

32
New cards

WIDTH copies of 1'b0.

What does {WIDTH{1'b0}} generate?

33
New cards

An all-zero word exactly WIDTH bits wide.

What value is produced by {WIDTH{1'b0}}?

34
New cards

It automatically produces the correct number of reset bits for whatever WIDTH is selected.

Why is {WIDTH{1'b0}} preferable to hard-coding 8'b00000000 in this parameterized module?

35
New cards

Synchronous Reset

A reset whose effect is committed when the clocked always block is triggered by its active clock edge.

36
New cards

always @(posedge clk)

What event triggers the ShiftRegister's sequential logic?

37
New cards

At the positive edge of clk.

When can reset actually clear DataOut in this implementation?

38
New cards

Because reset is checked inside an always block sensitive only to posedge clk.

Why is this reset synchronous?

39
New cards

DataOut becomes an all-zero WIDTH-bit word.

What happens when reset is asserted at an active clock edge?

40
New cards

Reset Priority

The rule that reset overrides both load and shift when multiple control inputs are asserted together.

41
New cards

reset

Which ShiftRegister control has the highest priority?

42
New cards

DataOut is cleared to zero.

What happens if reset and load are both asserted on the same active edge?

43
New cards

DataOut is cleared to zero.

What happens if reset and shift are both asserted on the same active edge?

44
New cards

DataOut is cleared; neither loading nor shifting determines the new state.

What happens if reset, load, and shift are all asserted together?

45
New cards

Because the if (reset) branch is evaluated before the normal-operation else branch containing load and shift.

Why does reset override load and shift?

46
New cards

Load Priority

The rule that parallel loading overrides shifting when both normal-operation commands are asserted together.

47
New cards

load

Between load and shift, which control has higher priority?

48
New cards

ParallelIn is loaded into DataOut; no shift is performed for that edge.

What happens if load and shift are both asserted while reset is low?

49
New cards

Because the shift condition is reached only through the alternative path where load was not selected.

Why does load override shift in the RTL?

50
New cards

if (load) ... else if (shift)

What RTL structure establishes load-over-shift priority?

51
New cards

Priority Logic

Control logic in which simultaneous requests are resolved according to a predefined ordering rather than being treated equally.

52
New cards

reset → load → shift → hold

What is the complete priority order of the ShiftRegister?

53
New cards

The control priority defines which candidate next state wins when several state-changing requests occur during the same cycle.

Why is the order of the if statements architecturally meaningful?

54
New cards

A different ordering could produce a different stored value when multiple controls are asserted simultaneously.

Why is control priority part of the module's behavior rather than merely coding style?

55
New cards

Hold Behavior

The register's preservation of its current state when no higher-priority state-changing command is active.

56
New cards

DataOut retains its previous value.

What happens when reset = 0, load = 0, and shift = 0?

57
New cards

No assignment to DataOut occurs on that clock path, so the register naturally retains its stored value.

Why does DataOut hold without an explicit DataOut <= DataOut; statement?

58
New cards

Implicit Hold

A clocked-register behavior in which the previous value remains stored because no assignment occurs on the selected execution path.

59
New cards

No. A clock edge alone does not force DataOut to change; one of the state-changing control conditions must authorize a new value.

Does DataOut necessarily change on every positive clock edge?

60
New cards

reset, load, or shift

Which inputs can cause DataOut to receive a newly determined value at a clock edge?

61
New cards

The stored state remains unchanged.

What does a clock edge do when none of reset, load, or shift requests a state change?

62
New cards

Next-State Selection

The process of choosing which candidate value will become DataOut's next stored state according to reset/load/shift priority.

63
New cards

All zeros.

What is the candidate next state when reset is asserted?

64
New cards

ParallelIn.

What is the candidate next state when reset is low and load is asserted?

65
New cards

DataOut >> 1.

What is the candidate next state when reset and load are low but shift is asserted?

66
New cards

The current DataOut value.

What is effectively the next state when reset, load, and shift are all low?

67
New cards

DataOut_next = 0

What next-state equation applies when reset is asserted?

68
New cards

DataOut_next = ParallelIn

What next-state equation applies when reset = 0 and load = 1?

69
New cards

DataOut_next = DataOut >> 1

What next-state equation applies when reset = 0, load = 0, and shift = 1?

70
New cards

DataOut_next = DataOut

What next-state equation applies when reset = 0, load = 0, and shift = 0?

71
New cards

Priority-Based Next-State Function

The interpretation of the ShiftRegister as a register whose next value is selected from reset, parallel input, shifted current state, or held current state.

72
New cards

The controls determine which candidate next-state expression is allowed to reach the register.

How can the ShiftRegister be understood as a next-state selection problem?

73
New cards

A multiplexer-like next-state selection network feeding the DataOut register.

What hardware structure can the reset/load/shift decision conceptually imply before the register?

74
New cards

Control selects the transformation, while DataOut stores the resulting state.

How are control and storage responsibilities separated conceptually inside the ShiftRegister?

75
New cards

Load replaces the stored word with external data; shift transforms the word already stored.

What is the fundamental difference between load and shift?

76
New cards

External Replacement

Parallel loading replaces current state with a value supplied by ParallelIn.

77
New cards

Internal State Transformation

Shifting derives the next state from the register's own current state.

78
New cards

ParallelIn.

Which source supplies the new word during an external replacement?

79
New cards

DataOut's current state.

Which source supplies the information used during an internal shift transformation?

80
New cards

Load does not preserve the previous stored word; it replaces it with ParallelIn.

What happens to the previous DataOut value when a parallel load is committed?

81
New cards

A shift preserves most of the previous bits but changes their positions and discards the least-significant bit.

How does a shift differ from a complete replacement of state?

82
New cards

Controlled Spatial Transformation

The repositioning of remembered bits within a stored word under control of a sequential command.

83
New cards

Because the identities of the retained bits stay related to the old word while their bit positions change.

Why can shifting be described as a spatial transformation of stored data?

84
New cards

Binary Weight Repositioning

Changing a bit's position in a binary word, thereby changing the positional weight associated with that bit.

85
New cards

A right shift moves retained bits toward positions with lower binary weight.

How does a logical right shift affect the positional weights of retained bits?

86
New cards

For an unsigned binary value, a one-bit logical right shift corresponds to integer division by 2 with any fractional remainder discarded.

What arithmetic interpretation can DataOut >> 1 have for an unsigned value?

87
New cards

The shift register can reposition the next relevant bit for later processing while preserving the rest of the working word as state.

Why are shift registers useful in iterative arithmetic?

88
New cards

Serial/Parallel Conversion

Using shifting and parallel storage to move information between representations or interfaces with different transfer widths.

89
New cards

Arithmetic Alignment

Using shifts to reposition binary digits according to the weights required by an arithmetic operation.

90
New cards

Delay / Staging

Using sequential storage to preserve ordered information across successive clock cycles.

91
New cards

Bit-Stream Processing

Advancing stored information by one bit position per controlled step.

92
New cards

Serial/parallel conversion, arithmetic alignment, iterative arithmetic, delay/staging, and bit-stream processing.

What architectural uses for shift registers are identified in Part 08?

93
New cards

The stored word can be repositioned one controlled step at a time across successive clock cycles.

Why is a shift register naturally useful for bit-stream processing?

94
New cards

Each accepted shift produces a new stored state that becomes the source for the next accepted shift.

How can repeated shift commands create sequential data movement over time?

95
New cards

The word is captured simultaneously into DataOut rather than entering one bit at a time.

Why is the project's load operation specifically a parallel load?

96
New cards

DataOut = 8'b10110010.

If WIDTH = 8 and ParallelIn = 8'b10110010 when load is asserted, what value is stored after the active edge?

97
New cards

DataOut = 8'b01011001.

If DataOut = 8'b10110010 and a right shift occurs, what is DataOut after the edge?

98
New cards

DataOut = 8'b00101100.

If DataOut = 8'b01011001 and another right shift occurs, what value is stored afterward?

99
New cards

DataOut = ParallelIn.

If load = 1 and shift = 1 while reset = 0, what is the next DataOut?

100
New cards

DataOut = 0.

If reset = 1, load = 1, and shift = 1, what is the next DataOut?