Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Presented by :- Anjali singh

Fathers name : Mr. Mahendra singh


Class :- BSC(CS)
Subject :- Computer System
Architecture(Major
paper)(Paper 1)
Serial no :- 04
TOPIC:- DATA TYPE
Ans:- Computer is an electronic equipment capable to
carrying high storage data , taking right decision and
receiving information in many forms and giving suitable
output. Any information stored or activated in the
computer is called data.
Numerical and non- numerical data
Types of Data
 Data is made up of a relevant group of letters. On the basis of utility of their
work space letter can be divide into three categories:-
(A) Numbers:- are used by user for mathematical calculations. They
are used by man in many areas in his day to day
activity. This is called numeric data.
(B) Letter:- by letter meant A,B,C,D……Z etc. these are
english alphabets. A string is generated with the help group of letters is
used by man to fulfill of his work . This is called character and string
data.
(C) Other symbols:- a computer uses other symbols or letters for
arithmetical calculation, logical computing and for its
own language. Except binary data all types of data
conerted into binary data . Because computer does not
understand A,B,+,$,2,3 or hindi letters directly.
TOPIC :- TRUTH TABLE
Ans – Truth table:-
A truth table is a tabular representation of all the
combination of values for input &output. It is mathematical table that
shows all possible outcomes. Truth table usually used for logic problem as in
boolean algebra & electronic circuit. All variations of input or argument
are listed to the left,while the output listed to the right.
Example:- The truth table for the logical AND operator(2-inputAND
gate).
A B AB
0 0 0
0 1 0
1 0 0
1 1 1
TOPIC :- DEMORGAN
THEOREM
Ans:- Demorgans proposed two theorems,that are an importantpart of
Boolean Algebra.
Theorem 1: It states that the complement of two or more varibles ANDed
is same as OR of the complement of each variable.
B.A = A +B
Theorem implies thatNAND gate perform same operation as an OR
gate whose input are inverted.

A+B
Demorgan`s first theorem in terms of gate
implementation
A B A.B A.B A B A B A+B
0 0 0 1 0 0 1 1 1
0 1 0 1 0 1 1 0 1
1 0 0 1 1 0 0 1 1
1 1 1 0 1 1 0 0 0

Truth table for Demorgans first theorem


Theorem2:- It states that the complement of two oe more variablesAND is same as Orof
the complement of each individual variable.
B+A=A.B
This gate implies that a NOR gate perform same operation as an AND gatewhose input
inverted.

A B A.B A.B A B A B A+B


0 0 0 1 0 0 1 1 1
0 1 1 0 0 1 1 0 0
1 0 1 0 1 0 0 1 0
1 1 1 0 1 1 0 0 0
Presented by:- Anjali Singh
Fathers name:(Mr. Mahendra Singh)
Class :- BSC(CS) 1st YEAR
Serial no. :- 04
Sub.:- Programming Methodologies&Data Structure(Minor
paper) (Paper 2nd)
Write a program for Switch case statement.

Ans:- Definition:-
The switch statement provides a way to
select a choice out of several choice based on the selection of choice.
The choice can either be any integer value or character. The choice
can be an expression which result in an integer value the control is
transferred to a particular case value.

PROGRAMING FOR SWITCH CASE:-


# include<iostream.h>
# include<conio.h>
void main()
int n;
Clrscr();
cout<<“enter number for day:”;
cin>>n;
Switch(n)
{
Case 1
Cout<<“Sunday”;
Break;
Case 2
Cout<<“Monday”;
Break;
Case 3
Cout<<“Tuesday”;
Break;
Case 4
Cout<<“Wednesday”;
Break;
Case 5
Cout<<“ Thursday”;
Break;
Case 6
Cout<<“ Friday”;
Break;
Case 7
Cout<<“Saturday”;
Break;
Default :
Cout<<“invalid number “;
Break;
}
Getch();
OUTPUT

Enter number for day : 5


Invalid number! Enter number for day :5
Thursday enter for day :7
Saturday
_
❖ FLOWCHART
A flowchart is a type of diagram
that represents a
workflow or process. A
Input
flowchart can also be defined as a
Number1,number2 diagrammatic representation of an
algorithm , a step by step
Ans=number1*number2 approach to solving a task _

Print answer

stop
Rules for making flowchart
 What are the 7 steps in developing a flowchart?
 Steps to creating a process map:
 Step 1: identify the problem: what is the process that need to be
visualized?
 Step 2: brainstorm all the activities that will be involved.
 Step 3 : figure out boundaries.
 Step 4: determine and sequence the st.eps
 Step5: draw basic flowchart symbols.
 Step6 : finalize the process flowchart.
 Step7 : flowchart can have only one start and one stop symbol.

You might also like