Learning a flowchart makes programming easy, We have discussed algorithm before, Now lets see what is a flow chart or programming chart. The flowchart is a diagram which visually presents the flow of data through processing systems. This means by seeing a flow chart one can know the operations performed and the sequence of these operations in a system.
Algorithms are nothing but sequence of steps for solving problems. So a flow chart can be used for representing an algorithm. A flowchart, will describe the operations (and in what sequence) are required to solve a given problem. You can see a flow chart as a blueprint of a design you have made for solving a problem.
|How to use flow chart|
Programming chart diagram - Flowchart SymbolsThere are 6 basic symbols commonly used in flowcharting of assembly language Programs:
Terminal, Process, input/output, Decision, Connector and Predefined Process. This is not a complete list of all the possible flowcharting symbols, it is the ones used most often in the structure of Assembly language programming.
Process - Indicates any type of internal operation inside the Processor or Memory.
input/output - Used for any Input / Output (I/O) operation. Indicates that the computer is to obtain data or output results.
Decision - Used to ask a question that can be answered in a binary format (Yes/No, True/False)
Connector - Allows the flowchart to be drawn without intersecting lines or without a reverse flow.
Predefined Process - Used to invoke a subroutine or an Interrupt program.
Terminal - Indicates the starting or ending of the program, process, or interrupt program
Flow Lines - Shows direction of flow.
General Rules for flowcharting
- All boxes of the flowchart are connected with Arrows. (Not lines)
- Flowchart symbols have an entry point on the top of the symbol with no other entry points. The exit point for all flowchart symbols is on the bottom except for the Decision symbol.
- The Decision symbol has two exit points; these can be on the sides or the bottom and one side.
- Generally a flowchart will flow from top to bottom. However, an upward flow can be shown as long as it does not exceed 3 symbols.
- Connectors are used to connect breaks in the flowchart. Examples are:
- From one page to another page.
- From the bottom of the page to the top of the same page.
- An upward flow of more then 3 symbols
- Subroutines and Interrupt programs have their own and independent flowcharts.
- All flow charts start with a Terminal or Predefined Process (for interrupt
- programs or subroutines) symbol.
- All flowcharts end with a terminal or a contentious loop.
Some simple Flow chart problems
Problem 1: Draw a Flow chart to Find the area of a circle of radius r.
Problem 2: Flowchart for an algorithm which gets two numbers and prints sum of their value.
Some complex flowchart problems
Problem 3: Algorithm for find the greater number between two numbers.
Problem 4: Flowchart for the calculate the average from 25 exam scores.
Advantages of using Flowcharts (programming chart)The advantages of Flowcharts are as follows:
- Communication: A Flowchart can be used as a better way of communication of the logic of a system and steps involve in the solution, to all concerned particularly to the client of system.
- Effective analysis: A flowchart of a problem can be used for effective analysis of the problem.
- Documentation of Program/System: Program flowcharts are a vital part of a good program documentation. Program document is used for various purposes like knowing the components in the program, complexity of the program etc.
- Efficient Program Maintenance: Once a program is developed and becomes operational it needs time to time maintenance. With help of flowchart maintenance become easier.
- Coding of the Program: Any design of solution of a problem is finally converted into computer program. Writing code referring the flowchart of the solution become easy.