The findMin problem and the other problems we solved with the Human Machine Language also have sequencing, selection, and iteration. Here's what they mean:
- Selection: also known as "branching" most commonly seen in if-statements -- The JUMP...IF command in the Human Machine Language is a form of selection. It gives us a way to compare two things (numbers) and take action if one thing was true.
- Iteration: also known as "looping" -- The JUMP command in the Human Machine Language allows us to move to a different point in the program and start executing from there. This allows us to re-use lines of code, and this is a form of iteration or looping.
- Sequencing: From the framework: "4.1.1B - Sequencing is the application of each step of an algorithm in the order in which the statements are given." Sequencing is so fundamental to programming it sometimes goes without saying. In our lesson, the sequencing is simply implied by the fact that we number the instructions with the intent to execute them in order.