Translate

Monday, August 26, 2019

Computer Organization


     BCA Practice Questions

Question Bank
(Computer Organization)
1 What is unicode ? state its relevance  .
2 Prove xy' +yz' +zx' =x'y + y'z + z'x algebraically .
3 Which number system is followed in digital computer and why ?
4 Explain  Venn diagram.
5 What is Boolean Theorems ?
6 what are digital signals ?Explain?
7 Explain Error detection and correction codes .
8 What are encoders ?
9 Explain Karnaugh Maps ?
10 What are de-multiplexers ?state their importance.
11 Explain Comparators ? 
12 What is the smallest and largest integer number represented in a 32-Bit computer ?
13 Explain Full Adder ? 
14 What are code Convertors ?
15 What is Parallel Adder ?
16 Explain Truth Table ?
17 Explain Canonical forms of Boolean functions .
18 Explain fixed point and floating point representation .
19 Explain Multi Level NOR circuit .
20 Explain Error detecting and Correction codes .
21 Explain Universal gates .
22 Explain Parallel Binary subtractor.
23 Explain EBCDIC .
24 Explain Characteristics of combinational Logic .
25 Explain BCD codes .
26 Explain Multi level NAND circuit .
27 what is a number system ? Which number system is followed in digital computer and why ?
28  CONVERT THE FOLLOWING :-----
  1. (11001001)2=(?)10
  2.  (BCD8)16 =(?)10
  3.  (F329)16= (?)2
  4.  (15359)10==(?)16

29 What do you mean by Binary number system . Also explain the binary Arithmetic in detail .
OR
     What do you mean by Binary Arithmetic ? Explain in Detail ? 

30 Find out the values of X,Y and Z in the following :---
  1. (A23.F)16=(X)2=(y)8=(z)10
  2. (95.750)10=(X)2=(Y)8=(Z)10
  3. (1046.25)10=(X)2=(Y)8=(Z)16
  4. (1101101100.001)2=(X)10=(Y)8=(Z)16
  5. (9B3A.A4)16=(X)2=(Y)8=(Z)10
  6. (A2B.75)16=(X)2=(Y)8=(Z)10
  7. (65.875)10=(X)2=(Y)8=(Z)16
  8. (125.750)10=(X)2=(Y)8=(Z)16
  9. (43.675)10=(X)2=(Y)8=(Z)16
  10. (75.875)10=(X)2=(Y)8=(z)16
  11. (BA.D4)16=(X)2=(y)8=(Z)10
  12. (75.025)10=(X)2=(Y)8=(Z)16
  13. (23.675)10=(X)2=(Y)8=(Z)16
  14. (F8A.B8)16=(X)2=(Y)8=(Z)10
31 What do you mean by fixed point and floating point representation of numbers ? Explain .
32 What are BCD codes ? What is their significance ? Discuss .
33 Explain the BCD codes in detail . Also explain Why these codes are used .
34 Explain error detection and correction codes .
OR
  What do you mean by error detection and correcting codes ? Explain in Detail .  
35 What do you mean by Hamming codes . in detail .
36 Explain character codes .
OR
  What do you mean by ASCII and EBCDIC ? Why these codes are normally used ? Explain .
OR
Explain the various character codes used to represent the data .

37 What is principle of duality ? Illustrate ?
38  Explain Boolean Algebra .
                         OR 
 What do you mean by boolean algebra ? Also explain some Boolean algebraic theorems ?
39 What is the difference between Boolean Algebra and Real Algebra ?
40 Explain De - Morgan's Law .
41 What is De - morgan's theorem ? How is it useful ? Illustrate its use with suitable example ?
42 State and prove De- Morgan's theorem mathematically ? 
43 What do you mean by Truth Table  ? Explain .
44 Simplify the function :---
Y = AB + A(B+C)+B(B+C)
45 Explain canonical form of Boolean function .
46 Explain standard form of boolean functions  .
OR
     What do you mean by canonical /standard form of boolean functions? Explain . 
47 Describe the concept of Karnaugh simplification with suitable example .
48 Explain venn diagrams . 
OR
  Explain in detail the venn diagram and also explain why is it used ? 
49 What do you mean by don’t care conditions? Explain with a suitable example?
50   Simplify the following Boolean Expression using K-Map:----
  • F = A’B’C’D’ + A’B’C’D’ + A’BCD + A’B’C’D + A’BC’D  and realize the same using NAND gates . 
51  What are universal gates ? Why are these named so ? just .
OR
      Give a brief explanation about the universal gates .
52 Explain the different Basic gates and universal gates with their Truth Tables . 
53 What do you mean by multilevel NAND and NOR circuits ? Illustrate .
54 What are AND –OR-INVERT and OR-AND-INVERT implementation ? Illustrate .                           
OR 
   Explain in detail AND-OR-INVERT and OR-AND-INVERT implementation of digital circuits . 
55 Differentiate between an OR and an XOR gate .
56 What do you mean by Digital signals . give a brief description ?
OR 
   What do you mean by Digital signals ? Explain . 
57 What is an XOR gate ?
OR 
    Write short note on EX – OR logic gate with Truth Table .
58  Discuss two /three/different Ways for implementing an X-OR/EX-OR/Exclusive OR . 
59  Implement an OR gate with AND and NOT gates . 
60  What is combinational circuit ? What are its characteristics ? Detail out the procedure for design of combinational circuit .
OR 
What do you mean by combinational logic ? Also explain its Design procedures , analysis procedures and its characteristics as well . 
61 Draw and Explain the operation of 3 inputs +ve NAND gate . 
62 Construct NAND gate from NOR gate . 
63 Explain half adder . 
64 What is full-adder ? Design a full- adder and implement the same using gates .
65 What is a full subtractor ? Design a full subtractor and implement the same using gates . 
OR 
   Explain full subtractor . 
66 differentiate between a multiplexer and a demultiplexer . 
67 Explain Multiplexer . 
OR 
    What is a Multiplexer ? How does it work ? What are its applications ? Explain . 
68 Explain demultiplexer .
OR 
    Explain Working of demultiplexer by sketching suitable block diagram . 
69 Design a 1*8 line demultiplexer . Explain it by Truth Table and logic circuit .
70 What do you mean by code convertors ? Explain in detail . 
71 Explain comparators ?
72 Give a brief description about encoders .
OR 
   Define an encoder . Explain Working of an encoder by Drawing a suitable diagram . 
73 Discuss encoder decimal to BCD .
74 What is a BCD to seven – segment Decoder ? Design and implement it . 
OR 
   Explain BCD to seven – segment Decoder .
OR 
   What do you mean by BCD to 7 segment Decoder ? Explain .
75 Explain working of 3*8 line decoder with logic diagram . 
OR 
   Define a decoder and explain its operation with the help of a suitable block Diagram .
OR 
 76  What is Decoder ? Discuss 3 to 8 line decoder with logic diagram .
77 Explain Operation of BCD to decimal decoder with the help of a suitable diagram.
OR 
   Define the process of decoding and explain the operation of a BCD to decimal decoder by sketching suitable diagrams . 
OR 
  Explain the Working of a BCD to decimal decoder with the help of a suitable diagram and Draw its     truth table .   


Thursday, August 8, 2019

Saturday, August 3, 2019

Sets



Sets Theory


Q1 Define Sets

Collection of things are  that are related and well defined are called sets. For example
list of fruits, vegetables, sports equipment, natural numbers etc

Q2 What are the different types of sets?

a) Universal Sets
b) Equal Sets
c) Null Sets
d) Subsets
e) Equivalent Sets
f) Empty Sets
g) Singleton Sets
h) Infinite Sets
i) Finite Sets

Q 3 How do we name a set?
Ans Sets are denoted by capital letter
A={1,2,3}={3,2,1}
Order of elements is not important here.

Q4 Is repetition of elements or member in the set allowed?
Ans No, repeat elements are not allowed in set. The single of each repeated element will be considered.
To write set for word school
B={s,c,h,o,l} is correct
B={s,c,h,o,o,l} is incorrect

Q5 Write the different forms of Sets.
Ans a) List form and Set builder form

Q6 Write a set of first 5 natural numbers.
Ans {1,2,3,4,5}. Here number inside the curly braces are known as elements or
members. It is one of the most common method of listing elements.

Q7 Write a set of first 5 natural numbers in another way?
Ans {x:x < 6, x  N}

Q8 What are finite and infinite sets?

Ans Let us take an example to understand
{...,-3,-2,-1,0,1,2,3...} is a infinite set
List of subjects in class XII
{maths, english, physics, chemistry, biology} is a finite set.
set of week days is a finite set
set of real numbers.

Q9 What are Singleton and Empty sets?

Ans Set with one element is called Singleton.
 Set with no element is called empty set.
List of prime numbers which is even
{2} only one element hence it is called singleton set.
List the colors that comes after 7 colors in rainbow
{void}

Q10 What is  a cardinal number?

Ans The number of elements or members is called cardinal number.
A={1,2,3,4,5}
number of elements is 5
n(A)=3
Cardinality is also know as the size of the set. 

Q11 What are equivalent sets?

Ans Any two sets are equivalent  if they have the same cardinal number
A={1,2,3} B={3,5,6}
n(A)=n(B)=3
Here sets A and B are equivalent

Q12 What are equal sets?

Ans Two sets are equal if they have precisely the same elements or members.
order does not matter.
A={5,6,7} B={5,6,7}
C={6,7,5}
Here A=B
B=C and C=A
Let us take another case
D={1,2,3} E={1,2,3,4}
As n(D) is not equal to n(E)
Here D is not equal to E

Q 13 Are all equal sets are equivalent?
Yes

Q 14 Are all equivalent sets are equal?
Ans Not always equal.

Q 15  Write an example of list form.
Ans  List first five natural numbers
{1,2,3,4,5}

Q 16 Write an example of set builder method.
{x:x < 6,xN} it is read as " All x such that x is less than 6, x belongs to natural numbers." 

Q 17 What are subsets?

Ans Let understand subsets by an example

A={1,2} B={1,2,3}
Here A is a part of B hence it is a subset of B. 
By definition every element in A is also present in B.
Every set is a subset of itself
  A
  B
It can also be written as A  B

Q 18 What are proper subsets or strict subsets?

Ans A={1,4,5} B={1,4,5.6,8}
Here all the elements of A are present in B but there are two elements of a B that are not present in A. Hence  A  B
C={1,2,3} D={1,2,3}
Here all elements of C are present in D but there is not even one element of D which is present in D but not in C. Hence by definition  C is not a proper subset of D
C D

Q 19 What are supersets?

Let us take an example
A={1,4,5} B={1,4,5.6,8}
Here B is a superset of A as it contains all the elements of A
BA
Q 20 What is a null set?
Ans A set with no elements  denoted by 
A={1,2,3}


Q 21 What is a Universal Set?

Let us take an example
A={1,2,3} B={4,5,6} C={7,8,9}
U={1,2,3,4,5,6,7,8,9}

Here U is a universal sets as all other sets are subsets of this universal set.

Q 22 What are Venn diagram?
Ans
Set of students like maths A={John, Sita, Pranav}
Set of students like english B={Mary, Babita, Charan}

Q23 How do you represent Union, intersection of sets through venn diagram?





Union = 


Intersection=





Q24 What do you mean by well-defined sets?

Well-defined means, it must be absolutely clear that which object belongs to the set and which does not.
Some common examples of well defined sets:
  • The collection of vowels in English alphabets. This set contains five elements, namely, a, e, i, o, u
  • N = {1,2,3,…} is the set of counting numbers, or naturals.
  • N = {1,2,3,…} is the set of counting numbers, or naturals.
  • Z = {…,−3,−2,−1,0,1,2,3,…} is the set of integers.
Q25 Define Intersection of Sets.
The intersection of sets A and B, denoted as A ∩ B, is the set of elements common to both A AND B.
For example:
A = {1,2,3,4,5}
B = {2,4,6,8,10}
The intersection of A and B (i.e. A∩B) is simply {2, 4}
Q 26 Define Union of Sets
The union of sets A and B, written as A∪B, is the set of elements that appear in either A OR B.
For example:
A = {1,2,3,4,5}
B = {2,4,6,8,10}
The union of A and B (i.e. A∪B) is {1, 2, 3, 4, 5, 6, 8, 10}
Q27 What do you understand by difference of Sets?
The difference of sets A and B, written as A-B, is the set of elements belonging to set A and NOT to set B.
For example:
A = {1,2,3,4,5}
B = {2,3,5}
The difference of A and B (i.e. A-B) is {1,4}
NOTE: A-B ≠ B-A
Q 28 What do you mean by Cartesian Product of Sets? How it is performed?
The Cartesian product of sets A and B, written A x B, is expressed as:
A x B = {(a,b)│a is every element in A, b is every element in B}
For example:
A = {1,2}
B = {4,5,6}
The Cartesian product of A and B (i.e. A x B) is {(1,4), (1,5), (1,6), (2,4), (2,5), (2,6)}
Now, lets us try doing some questions based on Set Theory.
 
Q 29: If ∪ = {1, 3, 5, 7, 9, 11, 13}, then which of the following are subsets of U.
B = {2, 4}
A = {0}
C = {1, 9, 5, 13}
D = {5, 11, 1}
E = {13, 7, 9, 11, 5, 3, 1}
F = {2, 3, 4, 5}
Answer: Here, we can see that C, D and E have the terms which are there in ∪. Therefore, C, D and E are the subsets of ∪.
Q 30: Let A and B be two finite sets such that n(A) = 20, n(B) = 28 and n(A ∪ B) = 36, find n(A ∩ B).
Solution: Using the formula n(A ∪ B) = n(A) + n(B) - n(A ∩ B).
then n(A ∩B) = n(A) + n(B) - n(A ∪B)
= 20 + 28 - 36
= 48 - 36
= 12

 Q31 What do you mean by complement of set, explain with the help of example.


Ans  When all sets under consideration are considered to be subsets of a given set U, the absolute complement of A is the set of elements in U but not in A.


 Let U be a universal set such 
 U={1,2,3,4,5,6,7,8}
P={1,2,3}
P'={4,5,6,7,8}









Thursday, August 1, 2019

Relations and functions

Q Define function.

Q What is domain and range of a function?
Ans Domain means all possible input values and range is all possible output values.

Let us take an example

y=f(x)=4x

all the possible values or given value of x is called domain
and all possible respective output values is called range

If x={1,2,3} is domain
then y=f(x)={4,8,12} is range

Q Can a function in the form of P/Q have zero in denominator?

No

Q Function with root (root cannot be negative)

Q What is relation?

Let us understand this with an example

A={3,5} B={6,10,9,15,12,20}

Now the cartesian product of the sets is

A X B= {(3,6),(3,10),(3,9),(3,15),(3,12),(3,20),(5,6),(5,10),(5,9),(5,15),(5,12),(5,15)}

Let R be a relation ------> For all(a,b) satisfies R

R-->element b of set :B is multiple of  element a in set A
R-->{a,b}:b is a multiple of a, a belongs to A, b belongs to B
therefore  relation gives us a set of ordered pair that satisfies a relationship

Now herfe (3,6),(3,9),(3,12),(5,10),(5,15),(5,20) satisfy relation R
R'={(3,6),(3,9),(3,12),(5,10),(5,15),(5,20)}

Q Find image, domain , range and co domain in above example?

Ref to last question example
Image: For every (a,b) belongs to R'  ,  b is an image of its a where a belongs to A and b belongs to B
above 6 is an image of 3, 9 is a image of 3 etc

Domain
a of (a,b) in R'
here domain is (3,5)

Range  is b of (a,b) in R'
here range is (6,9,12,10,15,20)


Co domain is whole B Set
co domain is (6,10,9,15,12,20)

From above Range is a subset of Co Domain.

Q What are the different types of relations?

Ans  The different types of relations are

a) Empty relation

b) Universal relation

c) Reflexive, symmetric and transitive

d) Equivalence relation


Empty and Universal relations are called trivial relation

Empty relation
A={0,1,2,3,4,5}
R={(a,b):a+b>50} a,b belongs to A

Here condition in relation is not satisfied and hence the relation is
an empty relation.



Universal relation

A={0,1,2,3,4}
R={(a,b):a+b>0} a,b belongs to A

since for all elements in set A the condition in the relation is satisfied
therefore R is said to have universal relation



Let us understand   through an example

Reflexive

P={p,q}
Possible reflexive pattern is
{(p,p),(q,q)}

A={1,2,3}

i){(1,1),(2,2),(3,3)} is a reflexive set
ii) {(1,1),(2,2),(3,3),(1,2),(2,3)} is also a reflexive set
iii){(1,1),(1,2),(3,3)} is not a reflexive set
iv){ } empty set is also not reflexive set

Symmetric
P={p,q}
{(p,p},(q,q),(p,q),(q,p)}
A reflexive relation is always symmetric but all symmetric relation need not be reflexive

A={1,2,3,4}

i) { } empty set is symmetric
ii){1,2} is not symmetric
iii){(1,1),(2,2),(1,2),(2,1)} is symmetric

Transitive relation

A={1,2,3}

i){1,1} is a transitive relation
ii) {(1,2),(2,3)} it is not a transitive relation
iii){(1,1),(2,3),(3,1),(2,1)} is a transitive relation


Equivalence relation:  For a set A, where A={a,b,c} relation 'R' is an equivalent  relation
in set 'A' if and only if

i) R is reflexive ie for all a belongs to R,(a,a) belongs to R
ii) R is symmetric ie (a,b) belongs then (b,a) belongs R
iii) R is transitive  ie (a,b) belongs to R and (b,c) belongs to R then
(a,c) belongs to R



One to One Function(Injective Function) Here for  each element of set A there is  only one image/distinct element in set B
Consider if a1 ∈ A and a2 ∈ B, f is defined as f: A → B such that f (a1) = f (a2)
If f(a1) =  f(a2)
 then (a1) =  (a2)

types of functions
Many to one function : If two or more different elements of a A have the same image in B. It is called many to one function.


Image result for many to one function

Onto Function(surjective function) If each element of B has its preimage in A. The function is called onto or surjective function


types of functions

Bijective Function :One – One and Onto Function

A function, f is One – One and Onto or Bijective if the function f is both One to One and Onto function. In other words, the function f associates each element of A with a distinct element of B and every element of B has a pre-image in A.
types of functions
In mathematics, the composition of a function is a stepwise application. For example, the function f: A→ B & g: B→ C can be composed to form a function which maps x in A to g(f(x)) in C. All sets are non-empty sets. A composite function is denoted by (g o f) (x) = g (f(x)). The notation g o f is read as “g of f”.
composite functions
Consider the functions f: A→B and g: B→C. f = {1, 2, 3, 4, 5}→ {1, 4, 9, 16, 25} and g = {1, 4, 9, 16, 25} → {2, 8, 18, 32, 50}. A = {1, 2, 3, 4, 5}, B = {16, 4, 25, 1, 9}, C = {32, 18, 8, 50, 2}.Here, g o f = {(1, 2), (2, 8), (3, 18), (4, 32), (5, 50)}.

composite functions

composite functions
The composition of functions is associative in nature i.e., g o f = f o g. It is necessary that the functions are one-one and onto for a composition of functions.

Invertible Function

A function is invertible if on reversing the order of mapping we get the input as the new output. In other words, if a function, f whose domain is in set A and image in set B is invertible if f-1 has its domain in B and image in A.
f(x) = y ⇔ f-1 (y) = x.
composite functions
Not all functions have an inverse. For a function to have an inverse, each element b∈B must not have more than one a ∈ A. The function must be an Injective function. Also, every element of B must be mapped with that of A. The function must be a Surjective function. It is necessary that the function is one-one and onto to be invertible, and vice-versa.
It is interesting to know the composition of a function and its inverse returns the element of the domain.
f-1 o f = f -1 (f(x)) = x                                                                 

Problem: If f: A → B, f(x) = y = x2 and g: B→C, g(y) = z = y + 2 find g o f.
Given A = {1, 2, 3, 4, 5}, B = {1, 4, 9, 16, 25}, C = {2, 6, 11, 18, 27}.
Solution: g o f(x) = g(f(x))
g(f(1)) = g(1) = 2, g(f(2)) = g(4) = 6, g(f(3)) = g(9) = 11, g(f(4)) = g(16) = 18, g(f(5)) = g(25) = 27.
Problem: Write the inverse of the above g o f.
Solution: (g o f) -1 = f-1(g-1(z))
f-1(g-1(z)) = f-1(g-1(2)) = f-1(1) = 1, f-1(g-1(6)) = f-1(4) = 2, f-1(g-1(11)) = f-1(9) = 3, f-1(g-1(18)) = f-1(16) = 4 & f -1(g-1(27)) = f-1(25) = 5.
Partial Order: A relation 'R' on a Set 'A' is said to be  partial order if
1) R is reflexive ie (a,a) belongs R, for every a that belongs to A
2) R is anti-symmetric ie,for every a,b that belongs to A and


3) R is transitive ie, for every a, b,c for every a,ab



Let us take a example

If A= {1,2,3}
R1={ }
It is not reflexive hence it is not in partial or post order
R2={(1,1),(2,2),(3,3)}
It is reflexive, antisymmetric and transitive hence it is in partial order relation
R3={(1,1),(2,2),(3,3),(1,2)(2,1)}
It is reflexive but it is not anti symmetric hence it is not in partial  order relation
R4={(1,1),(2,2),(3,3),(1,3),(2,3)}
It is reflexive, anti symmetric and transitive, hence it is  in partial order relation

R5={(1,1),(1,2),(2,3),(1,3)}
R6=A X A={(1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3)}

R6 is reflexive, it is symmetric as you can see elements (1,2) and (2,1).
 As it is symmetric it cannot be anti symmetric. Therefore partial order does not hold.