Chapter 8
Computer
Languages & Problem Solving Techniques
C. Answer in short.
1. What are binary digits?
Ans – A
computer can understand only special signals, which are represented by 1s and
0s. These two digits are called binary digits.
2. Which generation uses a
visual or graphical interface?
Ans – Fifth Generation uses a visual or graphical interface.
3. What do you understand by an
algorithm?
Ans – Algorithm is the step-by-step instructions written in simple
language to perform a particular task.
4. What is a flowchart?
Ans – Flow chart is a step-by-step process of representing the solution
of a particular problem in a graphical or pictorial form.
D. Answer in detail.
1. What do you understand by computer languages? Name the different categories
of computer languages.
Ans – Computers
do not understand any other language that we speak. They understand programs
written in special languages. The language which helps the user to communicate
with computer is called Computer Language.
There are two categories of computer
languages:
i) Low Level Language: Low level languages are the machine codes in which the
instructions are given in machine language in the form of 0 & 1 to a
computer system. Low level language is also divided into parts:- Machine
language and Assembly language.
a) Machine
Language - It is the first generation
language developed for communicating with a computer. It is written in machine
code which represents 0 and 1 binary digits.
b) Assembly
Language - It is the second generation
programming language developed for communicating with a computer. These
language use letters and symbols instead of binary digits. Example- As
ii) High Level Language: The high level languages are the most used programming languages
that help a programmer to read, write and maintain the codes. It is also the
third generation language that is used by many programmers. Example – C,C++,
SQL, Visual Basic, etc.
2. What is the difference
between high level and low level languages?
Ans – The difference
between high level and low level languages are:
3. What are the rules for
writing an algorithm?
Ans – The
rules for writing the algorithm are-
1.
Always begin with the step START and finish with STOP.
2.
Number the statements such as Step 1, Step 2, etc.
3.
Write each step in a separate line.
4.
Function of each statement should be very clear.
4. What is use of flowchart
symbols- Processing box and Decision box?
Ans – Processing box: A
rectangle represents the processing of instructions.
Decision box:
A diamond symbol is used to choose between the two options, yes or no.
5. Write algorithm for the
following problems.
a. to read name and phone number
and print both.
Ans – To read name and phone number and print both:
Step
1: Start
Step
2: Read name, phone no
Step
3: Print name, phone. No
Step
4: Stop
b. to read marks and print grade
‘A’ if marks >80 otherwise ‘B’.
Ans – . To read marks and print grade ‘A’ if marks > 80 otherwise ‘B’:
Step 1: Start
Step 2: Read marks
Step 3: If mark > 80
THEN
grade
‘A’
ELSE
grade ‘B’
Step 4: Stop