Computer, Algorithm and Flowchart

Post date: Mar 3, 2014 7:08:37 AM

Understanding the working of computer, designing of algorithm and symbols of flowchart will help the learner to work effectively and efficiently. This conceptual knowledge is basic prerequisite required to be learned before you start learning any programming language. This tutorial lesson is provided with a video lecture and supported theory content designed using below provided references.

In case video is not running, you can refer to this direct link to our channel on YouTube "SuperWits Academy".

Computers

A computer is a general purpose device that can be programmed to carry out a set of arithmetic and logical operations. Since a sequence of operations can be readily changed the computer can solve mice that one kind of problem.

Block diagram- Computer

Every computer consists of following basic components as shown in above figure:

1. At least one or more processing element also known as central processing unit (CPU)

a. Arithmetic & logical unit: responsible for performing the arithmetic calculations (addition, subtraction, multiplication and division) and logical operations such as comparison of data or selection of the desired problem solving procedure etc.

b. Control unit: This unit acts as the supervisor, which directs operations of the processor. Its job is to provide timing and control signals, through which it controls the communication and co-ordination between Input/output devices, memory and ALU. Technically speaking, it performs the task of fetching, decoding, and managing execution and at last, storing results in memory. A typical Control unit will always repeatedly perform following steps (to know about more Technical details suggest you to read from book “Computer Organization and Architecture”):

i. Read the instruction.

ii. Decode the required signals for action of instruction.

iii. Read data required by instruction from memory or Input device as mentioned in instruction.

iv. Provide the necessary data to an ALU.

v. Write result from ALU back to memory location or Output device

vi. Restart from step (i), for further pending instructions for execution.

2. Memory

a. Primary Memory (Memory): This is a set of registers or Random Access Memory available on computer to store the results temporarily during the execution instruction(s). It can store small amount of data, which is frequently used by CPU. Also it cannot store the data after computer is shutdown; this is why it is also known as volatile memory. Compared to secondary memory it is expensive.

b. Secondary Memory (External Storage): This is used to store large amount of data at lesser cost. The data stored in these types of memories are non volatile and it persist event after shutting down the computer. These memories store data/results for future use. For example Hard disk drive (HDD), Optical disc etc.

3. Input devices: These are the devices to which user’s interaction and using these devices users enter their data require to be processed by instruction in execution. For example Keyboard, mouse, OCR etc.

4. Output devices: These devices are used to display the processed data/output of the instruction. For example monitor, printer, plotter etc.

Summarizing the above content, “a computer is machine that manipulates data according to a set of instructions called as computer programs”.

Computer Program has executable form (link *.exe), that the computer carries out directly to execute the instructions. Instructions trigger sequence of simple action on the executing machine. Those actions produce effects according to the semantic of the instruction. For example: addition of two numbers, copying content from one device to another device etc.

Also the collection of computer programs and related data that provides the instructions for telling a computer what to do and how to do it is known as computer software. Computer software examples are operating system, MS office, MS paint, video games etc.

Algorithms

Algorithm is a set of well defined steps to solve a defined problem corresponding to inputs provided.

For detailed content, please refer to following link What is an Algorithm?

Flowchart

A flowchart is a type of diagram that represents an algorithm or process, showing the steps as boxes of various kinds, and their order by connecting them with arrows. Following are few standard symbols but not limited to, are used for creating the flow chart of any algorithm:

Flowchart Symbols

There are various flowchart tools available in market and few of them are popularly used:

1. Raptor: this is an open source tool that is being used in academia, to provide a learning environment for upcoming progrmmers. This tool will be discussed in detail in following lesson and will be used frequently for explaining various concepts in upcoming videos.

2. Lucid chart: This is a web based flowchart tool and can be downloaded in google chrome.

3. Microsoft Visio: This tool is bundled with MS office 2007 and has plenty of techniques to create effective flowchart diagrams.

You can you any flowchart diagram tool as per your convenience. Point is to learn how to create them effectively.

References:

Following references are in Addition to main references provided on course main page:

Feedback & Suggestions

You can send us feedback & suggestion regarding this lecture at hello@superwits.com subject should be “Feedback-C Programming”.