Free Sample UGC NET Computer Science & Application
Free Sample UGC NET Computer Science & Application
p ∼p
F T
T F
Example-
If p : It is raining outside.
Then, Negation of p is-
∼p : It is not raining outside.
Conjunction-
If p and q are two propositions, then conjunction of p and q is a proposition which is-
True when both p and q are true
False when both p and q are false
Truth Table-
p q p∧q
F F F
F T F
T F F
T T T
Example-
If p and q are two propositions where-
p:2+4=6
q : It is raining outside.
Then, conjunction of p and q is-
p ∧ q : 2 + 4 = 6 and it is raining outside
3. Disjunction-
If p and q are two propositions, then disjunction of p and q is a proposition which is-
True when either one of p or q or both are true
False when both p and q are false
Truth Table-
p q p∨q
F F F
Examples-
If a = b and b = c then a = c.
If I will go to Australia, then I will earn more money.
Biconditional-
If p and q are two propositions, then-
Proposition of the type “p if and only if q” is called a biconditional or bi-implication
proposition.
It is true when either both p and q are true or both p and q are false.
It is false in all other cases.
Truth Table-
p q p↔q
F F T
F T F
T F F
T T T
Examples-
COMPUTER SYSTEM
ARCHITECTURE UNIT - 2
As per updated syllabus
DIWAKAR EDUCATION HUB
o The Central Processing Unit (CPU) contains an arithmetic and logic unit for manipulating
data, a number of registers for storing data, and a control circuit for fetching and
executing instructions.
o The memory unit of a digital computer contains storage for instructions and data.
o The Random Access Memory (RAM) for real-time processing of the data.
o The Input-Output devices for generating inputs from the user and displaying the final
results to the user.
OR GATE:
The OR gate is an electronic circuit which gives a high output if one or more of its inputs are
high. The operation performed by an OR gate is represented by a plus (+) sign.
NOR GATE:
The NOT-OR (NOR) gate which is equal to an OR gate followed by a NOT gate. The NOR gate
gives a low output if any of the inputs are high. The NOR gate is represented by an OR gate
with a small circle on the output. The small circle represents inversion.
EXCLUSIVE-NOR/Equivalence GATE:
The 'Exclusive-NOR' gate is a circuit that does the inverse operation to the XOR gate. It will give
a low output if one of its inputs is high but not both of them. The small circle represents
inversion.
Boolean Algebra
Boolean algebra can be considered as an algebra that deals with binary variables and logic
operations. Boolean algebraic variables are designated by letters such as A, B, x, and y. The
basic operations performed are AND, OR, and complement.
The Boolean algebraic functions are mostly expressed with binary variables, logic operation
symbols, parentheses, and equal sign. For a given value of variables, the Boolean function can
be either 1 or 0. For instance, consider the Boolean function:
F = x + y'z
The logic diagram for the Boolean function F = x + y'z can be represented as:
o The Boolean function F = x + y'z is transformed from an algebraic expression into a logic
diagram composed of AND, OR, and inverter gates.
o Inverter at input 'y' generates its complement y'.
o There is an AND gate for the term y'z, and an OR gate is used to combine the two terms
(x and y'z).
o The variables of the function are taken to be the inputs of the circuit, and the variable
symbol of the function is taken as the output of the circuit.
Note: A truth table can represent the relationship between a function and its binary variables.
To represent a function in a truth table, we need a list of the 2^n combinations of n binary
variables.
The truth table for the Boolean function F = x + y'z can be represented as:
COMPUTER SYSTEM
ARCHITECTURE UNIT – 2 MCQs
As per updated syllabus
DIWAKAR EDUCATION HUB
Basic theories like abstract syntax, interpretation, stack, heap organization, compilation
techniques, different types of 'type checking' and 'error checking' various for each
Programming language.
Algorithmic languages
Algorithmic languages are designed to express mathematical or symbolic computations. They
can express algebraic operations in notation similar to mathematics and allow the use of
subprograms that package commonly used operations for reuse. They were the first high-level
languages.
FORTRAN
The first important algorithmic language was FORTRAN (formula translation), designed in 1957
by an IBM team led by John Backus. It was intended for scientific computations with real
numbers and collections of them organized as one- or multidimensional arrays. Its control
DIWAKAR EDUCATION HUB Page 3
PROGRAMMING LANGUAGES AND COMPUTER GRAPHICS UNIT - 3
structures included conditional IF statements, repetitive loops (so-called DO loops), and a
GOTO statement that allowed nonsequential execution of program code. FORTRAN made it
convenient to have subprograms for common mathematical operations, and built libraries of
them.
FORTRAN was also designed to translate into efficient machine language. It was immediately
successful and continues to evolve.
ALGOL
ALGOL (algorithmic language) was designed by a committee of American and European
computer scientists during 1958–60 for publishing algorithms, as well as for doing
computations. Like LISP (described in the next section), ALGOL had recursive subprograms—
procedures that could invoke themselves to solve a problem by reducing it to a smaller
problem of the same kind. ALGOL introduced block structure, in which a program is composed
of blocks that might contain both data and instructions and have the same structure as an
entire program. Block structure became a powerful tool for building large programs out of
small components.
ALGOL contributed a notation for describing the structure of a programming language,
Backus–Naur Form, which in some variation became the standard tool for stating
the syntax (grammar) of programming languages. ALGOL was widely used in Europe, and for
many years it remained the language in which computer algorithms were published. Many
important languages, such as Pascal and Ada (both described later), are its descendants.
LISP
LISP (list processing) was developed about 1960 by John McCarthy at the Massachusetts
Institute of Technology (MIT) and was founded on the mathematical theory of
recursive functions (in which a function appears in its own definition). A LISP program is a
function applied to data, rather than being a sequence of procedural steps as in FORTRAN and
ALGOL. LISP uses a very simple notation in which operations and their operands are given in a
parenthesized list. For example, (+ a (* b c)) stands for a + b*c. Although this appears
awkward, the notation works well for computers. LISP also uses the list structure to represent
data, and, because programs and data use the same structure, it is easy for a LISP program to
operate on other programs as data.
LISP became a common language for artificial intelligence (AI) programming, partly owing to
the confluence of LISP and AI work at MIT and partly because AI programs capable of
“learning” could be written in LISP as self-modifying programs. LISP has evolved through
numerous dialects, such as Scheme and Common LISP.
C
The C programming language was developed in 1972 by Dennis Ritchie and Brian Kernighan at
the AT&T Corporation for programming computer operating systems. Its capacity to structure
data and programs through the composition of smaller units is comparable to that of ALGOL. It
uses a compact notation and provides the programmer with the ability to operate with the
addresses of data as well as with their values. This ability is important in systems
programming, and C shares with assembly language the power to exploit all the features of a
Imperative: Explicit sequence [such as assignment statements] of statements that change the
state of the computer.
It is one of the oldest programming paradigm. It features close relation relation to machine
architecture. It is based on Von Neumann architecture. It works by changing the program state
through assignment statements. It performs step by step task by changing state. The main
DATABASE MANAGEMENT
SYSTEMS UNIT – 4
AS PER UPDATED SYLLABUS
DIWAKAR EDUCATION HUB
Database (Data) Tier − At this tier, the database resides along with its query processing
languages. We also have the relations that define the data and their constraints at this
level.
Application (Middle) Tier − At this tier reside the application server and the programs
that access the database. For a user, this application tier presents an abstracted view of
the database. End-users are unaware of any existence of the database beyond the
application. At the other end, the database tier is not aware of any other user beyond
the application tier. Hence, the application layer sits in the middle and acts as a
mediator between the end-user and the database.
User (Presentation) Tier − End-users operate on this tier and they know nothing about
any existence of the database beyond this layer. At this layer, multiple views of the
database can be provided by the application. All views are generated by applications
that reside in the application tier.
Multiple-tier database architecture is highly modifiable, as almost all its components are
independent and can be changed independently.
Data Models
Data models define how the logical structure of a database is modeled. Data Models are
fundamental entities to introduce abstraction in a DBMS. Data models define how data is
connected to each other and how they are processed and stored inside the system.
The very first data model could be flat data-models, where all the data used are to be kept in
the same plane. Earlier data models were not so scientific, hence they were prone to
introduce lots of duplication and update anomalies.
Entity-Relationship Model
Entity-Relationship (ER) Model is based on the notion of real-world entities and relationships
among them. While formulating real-world scenario into the database model, the ER Model
creates entity set, relationship set, general attributes and constraints.
ER Model is best used for the conceptual design of a database.
DIWAKAR EDUCATION HUB Page 5
DATABASE MANAGEMENT SYSTEMS UNIT – 4
ER Model is based on −
Entities and their attributes.
Relationships among entities.
These concepts are explained below.
DATABASE MANAGEMENT
SYSTEMS UNIT – 4 MCQs
AS PER UPDATED SYLLABUS
DIWAKAR EDUCATION HUB