27 September 2012

Computer Heart Symbol

Definition
The algorithm is a sequence of logical steps in solving problems systematically and logically arranged. Logic is the key word in the algorithm. The steps in the algorithm must be determined is true or false.

Algorithms In Life
Algorithms are the heart of computer science or informatics. Many branches of computer science terminology referred to in the algorithm. However, the algorithm is also used in everyday life, such as food recipes. In the recipes, there are steps that an algorithm. In addition there are many examples of other algorithms.

Programming Language
To implement an algorithm requires a programming language, programming language examples are: Pascal, C + +, Basic, etc.. Notation algorithm can be translated into any programming, in other words, the algorithm is independent notation.



Flowchart
A flowchart is a graphical representation of a diagram that illustrates the sequence of operations performed to obtain a result. In other words, flowchart helps us to understand and see the form of the algorithm by presenting an algorithm in image symbols, symbolic heart of the computer.

In drawing a flowchart, use specific symbols such as figure 1.1. The following example can be used to better understand the differences in the usefulness of these symbols. Suppose we want to find the sum of 2 pieces of numbers, then it is like a flowchart Figure 1.2.

As another example, suppose we want to know whether an odd or even number. For that we have to make this flowchart as Figure 1.3.

Pseudo Code
Pseudo Code is a sequence of lines of algorithms such as programming code and does not have a standard syntax. Pseudo Code more commonly used by experienced programmers. However, flowcharts more easily understood by a novice programmer, pseudo code is very easy to implement in the code compared to flowcharts. We can freely write pseudo code for it is easy to understand for others. But it is recommended to use commonly used keywords such as: if, then, else, while, do, repeat, for, and more. And follow the writing style of programming such as Pascal, C + +, etc.. Consider the code below:

Start
Enter a number
Enter a number and show
Take the numbers before and show
Completed

Although the pseudo code above is still understandable but there are some ambiguous statements. From the second row, we do not know where the number is stored, and we also do not know where the numbers are meant to "numbers before". Is the number of the first or the second. Pseudo Code above can be modified as follows:

Start
ADD A
Enter B, View B
Show A
End

Pseudo code shown above is better than ever before. We can clearly see where the numbers are stored and where the numbers are displayed. Now we will change the flowchart in Figure 1.2

Start
Enter the A and B
C = A + B
Show C
End

0 comments:

Post a Comment