Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Q:1) Write a note on symbols used to construct a flowchart?

Start/End Symbol

This symbol also known as “terminator” symbol


represents the start points, end points and
potential outcomes of a path.

Input/output Symbol

This symbol represents data that is available for


input or output as well as representing sources
used or generated.

Decision Symbol

This symbol indicates a decision to be made.


The two outcomes are true and false, and the
flowchart path may split off into different
directions depending on the answer.
Process Symbol

This shape represents a process action or a


function. It is used for arithmetic operations
and data manipulation.

Flowline Symbol

This symbol denotes the direction of logic


flow in a program.

Q:2) Complete the table

Decimal Binary Octal Hexadecimal


33 100001 41 21

117 1110101 165 75

451 111000011 703 1C3

431 110101111 657 1AF


Q3) Write a note on the following and give an example of scenarios
where they can be applied:
a. Logical operators
b. Conditional operators
c. Bit wise operators

a) Logical operators:

Logical operators are used to combine two or more constraints. An


expression containing a logical operator returns either 0 or 1 depending
upon whether the expression results are true or false.
Ex: Let a=5 and b=10
Then we can say (a==5 && b>5), since both statements are true
(a==5||b<5), since one statement is true
(!(a==10&&b<5)), since both are false

b) Conditional operators:

Conditional operators are used to evaluate a condition that's applied to one or


two Boolean expressions. The result of the evaluation is either true or false. If
the Boolean expression is true, the ternary operator returns the value of
the second operand, otherwise it returns the value of the third operand.

c) Bit wise operators


During computation, mathematical operations like: addition, subtraction,
multiplication and division are converted to bit-level which makes
processing faster and saves power.

You might also like