...

/

Converting Flowcharts into Execution Sheets

Converting Flowcharts into Execution Sheets

Learn to translate decision-bearing flowcharts into text and convert them into execution sheets.

Text conversion of a flowchart

Here’s an example flowchart that contains a two-way decision and displays the absolute difference between two numbers. We want to generate an execution sheet for this flowchart.

The flowchart above cannot be directly represented in the form of an execution sheet unless we convert it into text. We use if before the conditional expression in PS# 3, and PS# 4 is the subordinate instruction of PS# 3. This true branch subordination is indicated in the flowchart by shifting this step to the right of the main flow. The same fact is shown in text form by adding space at the start of PS# 4.

Note: The PS# column shows the sequence number of each instruction in the program.

We also need to convert the false branch of the flowchart to text form. We use else to indicate the separation of true and false branches in PS# 5, and PS# 6 is the subordinate of PS# 5. PS# 7 is the print instruction we are already familiar with. It’s neither a part of the true branch nor the false branch.

Execution sheet of decisions

Within the same program, we may see two scenarios of execution:

  • When a is greater than b.
  • When a is not greater than b.

We need to introduce another column, “State”, representing the conditional state. The conditional state tells us whether a condition is true or false. The value of a conditional state depends on the current value of the variables participating in the ...