Combine Reset and Hold Behavior

A LabVIEW program retains an energy total EkE_k in a floating-point shift register initialized to 12.0 J12.0\ \text{J}. Each iteration receives an energy increment, a validity flag and a reset flag. It follows these rules in order:

  1. If reset is true, use 0 J0\ \text{J} as that iteration's base total BkB_k; otherwise, use the incoming retained total EkE_k.
  2. If valid is true, add the current increment to the base total; otherwise, leave the base total unchanged.
  3. Write the resulting total Ek+1E_{k+1} to the right shift-register terminal.

The inputs arrive in the following order:


Iteration kk

Increment eke_k (J)

Valid

Reset

0

4.0

True

False

1

9.0

False

False

2

3.0

True

True

3

5.0

True

False


Trace the loop. For each iteration, enter the state read from the left terminal, the base value used for the update and the state written to the right terminal. Then enter the final energy held after the last iteration. Give every value in joules as a whole number.

IterationState read (J)Base value (J)State written (J)
0
1
2
3
Final energy after the loopnot usednot used

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Shift Registers Questions: