Fill in the Blanks
a. ISA stands for ……………………….
Instruction Set Architecture
b. Programming is also known as ……………………….
Coding
c. The rules and regulations of a computer programming language is known as ……….
Syntax
d. In machine language, computer programs are written using only ……… numbers.
Binary (0 and 1)
e. In drawing flowchart, …………. is used for input/output operation.
Parallelogram
Short Answer Questions
a. How do we write programs in assembly level language?
We use mnemonics or symbolic codes (like ADD, MOV, SUB) instead of binary codes.
b. The expression a = b + c can be a statement of which type of programming languages?
High-level programming languages.
c. Name the two basic ingredients if we want to write a computer program for solving a problem.
Algorithm and Data.
d. Why is it easier for a human being to write programs in high level language than in machine level language?
Because high-level languages use English-like statements which are easy to understand and write.
Long Answer Questions
a. Define the term programming. Write the importance of computer programming.
Programming is the process of designing and writing instructions that a computer can execute. It is important because it enables us to solve problems, automate tasks, build applications, and control hardware efficiently.
b. Explain the importance of compiler in program execution.
A compiler translates high-level programming code into machine language so that the computer can understand and execute the program. Without a compiler, programs written in high-level language cannot run.
c. Differentiate between algorithm, flowchart and pseudocode.
- Algorithm: Step-by-step procedure to solve a problem.
- Flowchart: Diagrammatic representation of steps using symbols.
- Pseudocode: Informal English-like statements describing program logic.
Problem Solving and Algorithm Design
a. Draw a flowchart to find the larger number from two given numbers.
Use decision symbol: if A > B → A is larger, else B is larger.
b. Write a solution strategy for finding the largest number among three given numbers. Draw a flowchart for the same.
Compare numbers pairwise: if A>B and A>C then A is largest, else if B>C then B is largest, otherwise C is largest.
c. Design an algorithm to find the smallest of N given numbers. Write a pseudo code for the same. Draw a flowchart to represent the solution strategy.
Pseudocode:
SET Small = first number
FOR each number in list
IF number < Small
Small = number
END FOR
PRINT Small
d. Write a solution strategy for finding the greatest common divisor of two numbers. Draw a flowchart for the same.
Use Euclidean algorithm: repeatedly divide larger number by smaller until remainder is zero. The last divisor is the GCD.
e. Write pseudocode for finding the summation of N given numbers. Draw a flowchart for the same.
SET Sum = 0
FOR each number in list
Sum = Sum + number
END FOR
PRINT Sum
f. Write a solution strategy for arranging three numbers in ascending order of their values. Draw a flowchart for the same.
Compare and swap numbers step by step until arranged in ascending order (like bubble sort for 3 elements).
g. Write a solution strategy to announce all the even numbers from a given set of numbers. Draw a flowchart for the same.
FOR each number in list
IF number % 2 == 0
PRINT number
END FOR