Module 1 - Block Diagram and Flowchart

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 24

Module 1 - Block Diagram

Engr. Mary Ann Joaquin


Block Diagram

• A block diagram is a specialized, high-level flowchart used in


engineering.
• It is used to design new systems or to describe and improve
existing ones.
• Its structure provides a high-level overview of major system
components, key process participants, and important working
relationships.
Types and Uses of Block Diagrams

• A block diagram provides a quick, high-level view of a system to


rapidly identify points of interest or trouble spots.
• Because of its high-level perspective, it may not offer the level of
detail required for more comprehensive planning or
implementation.
• A block diagram will not show every wire and switch in detail,
that's the job of a circuit diagram.
• A block diagram is especially focused on the input and output of a
system.
• It cares less about what happens getting from input to output.
• This principle is referred to as black box in engineering.
• Either the parts that get us from input to output are not known or
they are not important.
Example:
Symbols Used in Block Diagrams

• Block diagrams use very basic geometric shapes: boxes and circles.
• The principal parts and functions are represented by blocks connected by
straight and segmented lines illustrating relationships.
• When block diagrams are used in electrical engineering, the arrows
connecting components represent the direction of signal flow through the
system.
• Whatever any specific block represents should be written on the inside of
that block.
• A block diagram can also be drawn in increasing detail if analysis requires it.
Feel free to add as little or as much detail as you want using more specific
electrical schematic symbols.
Block Diagram: Best Practices

• Identify the system. Determine the system to be illustrated.


Define components, inputs, and outputs.
• Create and label the diagram. Add a symbol for each component
of the system, connecting them with arrows to indicate flow. Also,
label each block so that it is easily identified.
• Indicate input and output. Label the input that activates a block,
and label that output that ends the block.
• Verify accuracy. Consult with all stakeholders to verify accuracy.
Flowchart

• A flowchart is a visual representation of the sequence of steps and


decisions needed to perform a process.
• It is a graphical representation of an algorithm
• Each step in the sequence is noted within a diagram shape.
• Steps are linked by connecting lines and directional arrows.
• Programmers often use it as a program-planning tool to solve a
problem.
Flowchart Symbols
Example
Flowchart for calculating the
average of three numbers.
Guidelines for Drawing a Flowchart

• In drawing a proper flowchart, all necessary requirements


should be listed out in logical order.

• The flowchart should be clear, neat and easy to follow. There


should not be any room for ambiguity in understanding the
flowchart.

• The usual direction of the flow of a procedure or system is


from left to right or top to bottom.
• Only one flow line should come out from a process symbol.

or

• Only one flow line should enter a decision symbol, but two or
three flow lines, one for each possible answer, should leave the
decision symbol.
• If the flowchart becomes complex, it is better to use
connector symbols to reduce the number of flow lines.
Avoid the intersection of flow lines if you want to make it
more effective and better way of communication.

• Ensure that the flowchart has a logical start and finish.

• It is useful to test the validity of the flowchart by passing


through it with a simple test data.
Advantages of Using Flowchart
The benefits of flowcharts are as follows:

• Communication: Flowcharts are better way of communicating


the logic of a system to all concerned.

• Effective analysis: With the help of flowchart, problem can be


analyzed in more effective way.

• Proper documentation: Program flowcharts serve as a good


program documentation, which is needed for various purposes.
• Efficient Coding: The flowcharts act as a guide or blueprint during the systems
analysis and program development phase.

• Proper Debugging: The flowchart helps in debugging process.

• Efficient Program Maintenance: The maintenance of operating


program becomes easy with the help of flowchart. It helps the
programmer to put efforts more efficiently on that part
Limitations of Using Flowchart

• Complex logic: Sometimes, the program logic is quite


complicated. In that case, flowchart becomes complex and
clumsy.

• Alterations and Modifications: If alterations are required the


flowchart may require re-drawing completely.

• Reproduction: As the flowchart symbols cannot be typed,


reproduction of flowchart becomes a problem.
Examples

Example 1

Draw a flowchart to find the


sum of first 50 natural numbers.
Example 2
Draw a flowchart to find
the largest of three
numbers A,B, and C.
Example 3
Draw a flowchart for computing
factorial N (N!)
Where N! = 1 ´ 2 ´ 3 ´ …… N .
Problem Solving Process

Input Process Output


Example Problem #1
Calculate and display the price of a number
of apples if the quantity in kg and price per kg
are given.

Input Process Output


• Quantity Price = Quantity * Price_per_kg Price
• Price_per_kg
Flowchart
Start

Input
Quantity

Input
Price_per_kg

Price = Quantity * Price_per_kg

Output
Price

End
Activity #1:Assignment
A car park has the following charges:
The 1st hour costs Php 5.00. The subsequent hour cost Php
2.00 per hour. Draw a flowchart based on a vehicle’s entry
and exit time.

Input Process Output


• Entry_time
???? Charge
• Exit_time

You might also like