Saturday 7 January 2017

Introduction to Computer & Programming

Introduction:

-A Computer is divided into 2 categories -softwere and hardwere.
-Hardwere is the physical component and softwere is logical component of the computer.


Computer Languages:

Computer languages  are divided into 2 categories -low level language,and High level language.Low  level language as further divided into 2 types -machine language and assembly language.

(1) Machine Langauage:
-Computer directly understands this language.it is the language of 0's and 1's.Every instruction consists of order,data,address and all are in terms of 0's and 1's,thus it is very difficult to understand as well as remember.

Advantages
-The programs are compact and small.
-Suitable for low voloume application,small simple program where the prototype is the final Product.
-It does not require any extra system program to run.

Disadvantage
-Machine language program are not portable.
-The progarm are slow to enter since you must enter each bit individually.
-The Progarms are long and tiresome to write.
-Progarmmer must have detailed Knowledge of the architecture of particular microprocessor.

(2) Assembly Langauage:
-Every machine language instruction is assigned to english word mnemonic such that it should describe functions of instruction.such language of mnemonics is called as Assembly language.
Assembly language is a low-level programming language for a computer or other programmable device specific to a particular computer architecture in contrast to most high-level programming languages, which are generally portable across multiple systems. Assembly language is converted into executable machine code by a utility program referred to as an assembler like NASM, MASM, etc.

Advantages
-The program are very easy to understand or debug.
-The programs are fast to enter using alphanumeric keys of keyboard.

Disadvantage
-Assembly language programs are not portable.
-It requires assembler and loader for translation.

(3) High level Langauage:
-High level very similar to natural languages.
Example:C,C++,JAVA,.NET

Advantages of high Level language:
-The programs are very easy to understand or dubug.
-The High level instructions are easy sentences so it is very easy to learn.
-The Programs are Portable.

Disadvantage of high Level language:
-High level language programrequires compiler or interpreter to translate high level language Program to machine level that means object code.
-Programmers need to learn structure of high level language programs and syantax of every statement.

(4) Algorithms:

What is the Algorithm ?

-Algorithm is first step of the solution process, after the analysis of problem, programmer write the algorithm of that problem.

Algorithms Properties:

Definiteness:Eash step of algorithm must be clear and un ambiguous.
Effectiveness:Every step must be basis and essential.
Finiteness:Total number of steps used in algorithms should be finite.

Advantages :
-Easy technique to understand logic.
-Easy identifications of the mistakes by non computer person.

Disadvantage :
-Time consuming.
-Big tasks are difficult to put in algoriths.

ShapeNameDescription
Flowchart Line.svgF
l
o
w

L
i
n
e
An arrow coming from one symbol and ending at another symbol represents that control passes to the symbol the arrow points to. The line for the arrow can be solid or dashed. The meaning of the arrow with dashed line may differ from one flowchart to another and can be defined in the legend.
Flowchart Terminal.svgT
e
r
m
i
n
a
l
Represented as circles, ovals, stadiums or rounded (fillet) rectangles. They usually contain the word "Start" or "End", or another phrase signaling the start or end of a process, such as "submit inquiry" or "receive product".
Flowchart Process.svgP
r
o
c
e
s
s
Represented as rectangles. This shape is used to show that something is performed. Examples: "Add 1 to X", "replace identified part", "save changes", etc....
Flowchart Decision.svgD
e
c
i
s
i
o
n

Represented as a diamond (rhombus) showing where a decision is necessary, commonly a Yes/No question or True/False test. The conditional symbol is peculiar in that it has two arrows coming out of it, usually from the bottom point and right point, one corresponding to Yes or True, and one corresponding to No or False. (The arrows should always be labeled.) More than two arrows can be used, but this is normally a clear indicator that a complex decision is being taken, in which case it may need to be broken-down further or replaced with the "predefined process" symbol. Decision can also help in the filtering of data.
Flowchart IO.svgI
n
p
u
t
/
O
u
t
p
u
t
Represented as a parallelogram. Involves receiving data and displaying processed data. Can only move from input to output and not vice versa. Examples: Get X from the user; display X.
Flowchart Annotation.svgA
n
n
o
t
a
t
i
o
n
Annotations represent comments or remarks about the flowchart. Like comments found in high-level programming languages, they have no effect on the interpretation or behavior of the flowchart. Sometimes, the shape consists of a box with dashed (or dotted) lines.
Flowchart Predefined Process.svgP
r
e
d
e
f
i
n
e
d

P
r
o
c
e
s
s
Represented as rectangles with double-struck vertical edges; these are used to show complex processing steps which may be detailed in a separate flowchart. Example: process-files. One subroutine may have multiple distinct entry points or exit flows (see coroutine). If so, these are shown as labeled 'wells' in the rectangle, and control arrows connect to these 'wells'.
Flowchart Preparation.svgP
r
e
p
a
r
a
t
i
o
n
Represented as a hexagon. May also be called initialization. Shows operations which have no effect other than preparing a value for a subsequent conditional or decision step. Alternatively, this shape is used to replace the Decision Shape in the case of conditional looping.
Flowchart Connector.svgO
n
-
P
a
g
e

C
o
n
n
e
c
t
o
r
Generally represented with a circle, showing where multiple control flows converge in a single exit flow. It will have more than one arrow coming into it, but only one going out. In simple cases, one may simply have an arrow point to another arrow instead. These are useful to represent an iterativeprocess (what in Computer Science is called a loop). A loop may, for example, consist of a connector where control first enters, processing steps, a conditional with one arrow exiting the loop, and one going back to the connector. For additional clarity, wherever two lines accidentally cross in the drawing, one of them may be drawn with a small semicircle over the other, showing that no connection is intended.
Off page connector.pngO
f
f
-
P
a
g
e

C
o
n
n
e
c
t
o
r
Represented as a home plate-shaped pentagon. Similar to the on-page connector except allows for placing a connector that connects to another page.

Advantages:
-Easy to draw.
-Easy Technique to understand logic.
-Easy to identify the mistake by non computer person.
-Easy for branching and looping.

Disadvantages:
-Difficult for modification.
-Time consuming.
-Difficult task to draw flow charts for big programs.

4 comments:

  1. A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
    website: geeksforgeeks.org

    ReplyDelete
  2. A Computer Science portal for geeks. It contains well written, well thought and well
    explained computer science and programming articles, quizzes and practice/competitive
    programming/company interview Questions.
    website: geeksforgeeks.org

    ReplyDelete
  3. A Computer Science portal for geeks. It contains well written, well thought and well
    explained computer science and programming articles, quizzes and practice/competitive
    programming/company interview Questions.
    website: geeksforgeeks.org

    ReplyDelete
  4. A Computer Science portal for geeks. It contains well written, well thought and well
    explained computer science and programming articles, quizzes and practice/competitive
    programming/company interview Questions.
    website: geeksforgeeks.org

    ReplyDelete