Lesson 02 of 04 · about 4 min

Shift register

  1. 1
  2. 2
  3. 3
  4. 4

A shift register stores a value from one iteration and offers it to the next. The initializer on the left runs once. Each iteration reads that stored value, computes a new one, and writes it back.

The register starts at 0. Each of three iterations adds 1. Enter the value that leaves the loop.

On the Knowledge page

Resources