Sequential logic
Sequential logic
Logic Structure
0-1
Pseudocode
!2
Pseudocode
• For example, some part uses C language code and some part uses
Malay or English language.
• Advantages:
i. Easily understood.
ii. Easily maintained.
iii. The codes are changeable.
• Disadvantages:
Cannot be executed in the computer.
Flowchart
Process
Output
END
Explanation of basic flowchart symbol:
Simbol / Symbol Penerangan / Explanation
➢Indicate the direction of data flow.
➢Used to connect a block to another block.
Flow Lines
Process
Input
Condition True
True Statement
False
False statement
Output
END
Symbol usage !7
Cont…Explanation of basic flowchart symbol:
START
Input
Symbol Explanation
Output
Next page
B
First page
Symbol Usage
There are few additional symbols of flowchart used in a complicated program:
GOSUB and RETURN. It’s usually used in a big program.
Symbol Explanation
GOSUB
Output area
GOSUB area
RETURN
END
Symbol Usage
Example Flowchart:
Flowchart to calculate the total of fine for late returning of library books.
START
Input
total_of_day
Output Fine
END
Symbol Usage
Questions
!12