0% found this document useful (0 votes)
25 views163 pages

FOAT JNU 3rd Edition

Uploaded by

foodbucket02013
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views163 pages

FOAT JNU 3rd Edition

Uploaded by

foodbucket02013
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 163

Father of Admission Test

JNU MSc in CSE

[Third Edition] Mail Me: mustakimbilla007@gmail.com

Prepared by: Mustakim Billah Bedar

www.youtube.com/c/NetComEducation

https://www.facebook.com/groups/858042971559671 https://www.facebook.com/groups/NetComEducation
This is an old Syllabus but You can get some idea from here
1 Semester
st

Four courses are to be enrolled for 1 semester selected by academic committee.


st

Total number of credits: (3x4) =12


Course Code Name of Course Credit Marks
CSE 5101 Graph Theory 3.00 100
CSE 5102 Simulation and Modeling 3.00 100
CSE 5103 Design and Analysis of Advanced Algorithms 3.00 100
CSE 5104 Digital Image Processing 3.00 100
CSE 5105 Internet Security and Policy 3.00 100
CSE 5106 Advanced Computer Architecture 3.00 100
CSE 5107 Network and OS Security 3.00 100
CSE 5108 Wireless Ad Hoc and Sensor Networks 3.00 100
2 Semester
nd

Four courses are to be enrolled for 2 semester selected by academic committee.


nd

Total number of credits: (3x4) =12


Course Code Name of Course Credit Marks
CSE 5201 Cloud Computing 3.00 100
CSE 5202 Bio-Informatics 3.00 100
CSE 5203 Digital Signal Processing 3.00 100
CSE 5204 Distributed Database Systems 3.00 100
CSE 5205 Neural Networks and Fuzzy Systems 3.00 100

CSE 5206 Advanced Database Systems 3.00 100

CSE 5207 Advanced Artificial Intelligence 3.00 100

CSE 5208 Digital Forensics and Investigation 3.00 100

CSE 5209 Advanced Data Mining and Machine Learning 3.00 100

3 Semester
rd

Thesis group students are to be enrolled thesis and viva-voce and Project group students are to be enrolled two courses, project and viva-voce.
Total number of credits: Thesis group: (12+3) =15, Project group: (3x2+6+3)=15
Course Code Name of Course Credit Marks

CSET 5300 Thesis 12.00 400

CSEP 5300 Project 6.00 200

CSE 5301 Computer Arithmetic 3.00 100

CSE 5302 Robotics and Intelligent Systems 3.00 100

CSE 5303 Cloud and Data center Security 3.00 100

CSE 5304 E-Commerce and E-Transaction Security 3.00 100

CSE 5305 Advanced Microprocessors and Microcomputer Design 3.00 100


CSE 5306 Embedded Systems 3.00 100
CSE 5307 Special Topics Related to Computer Science and Engineering 3.00 100
CSEV 5308 Viva-Voce 3.00 100
Subjects to crack MSc in CSE (professional) JNU Admission Test
1. Programing with OOP
2. Data Structured
3. Microprocessor
4. Database
5. Data communication and Networking
6. Software Engineering
7. Operating System
8. Digital Logic Design
9. Mathletics/Statistics and Probability
10. Basic Math (Percentage, Speed and distance etc.)

Admission Test Type

Written: Previously they took MCQ and 50 marks exam only. There were 12 sets (or single question) of questions
among them 10 sets are required to be answered. Each set contains 5 mark (5*10=50)

But nowadays the take full 80 mark Exam. You need to answer 10 set of questions from 12. Each set contains 8
mark. Total 80 marks. Time 1 hour 30 minutes. There is a sample given in this pdf.

Viva: For Viva voce you need to prepare for basic questions from CSE life. They can ask some additional things as
follows:

1. Your job experience (if any)


2. Your project work in bachelor.
3. Your family background and willingness of admission at JNU.
4. They may ask your opinion on current affairs.
https://www.facebook.com/groups/NetComEducation

C programming

1. What is syntax error?

Syntax errors are associated with mistakes in the use of a programming language. It may be a command that was
misspelled or a command that must br entered in lowercase mode but was instead entered with an upper case
character. A misplaced symbol, or lack of symbol, somewhere within a line of code can also lead to syntax error.

2. What are run-time errors?

These are errors that occur while the program is being executed. One common instance wherein run-time errors
can happen is when you are trying to divide a number by zero. When run-time errors occur, program execution
will pause, showing which program line caused the error.

3. Describe tokens of C

Tokens are the smallest elements of a program, which are meaningful to the compiler.

The following are the types of tokens: Keywords, Identifiers, Constant, Strings, Operators, etc.

4. What is Identifier? What are the rules for Identifier?

An identifier is used for any variable, function, data definition, labels in your program etc.

Rules:

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

5. What are the primary data types in C?

6. What is a nested loop?

A nested loop is a loop that runs within another loop. Put it in another sense, you have an inner loop that is inside
an outer loop. In this scenario, the inner loop is performed a number of times as specified by the outer loop. For
each turn on the outer loop, the inner loop is first performed.

If a loop exists inside the body of another loop, it's called a nested loop. Here's an example of the nested for loop.

// outer loop
for (int i = 1; i <= 5; ++i) {
// codes

// inner loop
for(int j = 1; j <=2; ++j) {
// codes
}
..
}

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

7. Can I use “int” data type to store the value 32768? Justify your answer?

No. “int” data type is capable of storing values from -32768 to 32767. To store 32768, you can use “long int”
instead. You can also use “unsigned int”, assuming you don’t intend to store negative values.

8. Why is it that not all header files are declared in every C program?

The choice of declaring a header file at the top of each C program would depend on what commands/functions
you will be using in that program. Since each header file contains different function definitions and prototype,
you would be using only those header files that would contain the functions you will need. Declaring all header
files in every program would only increase the overall file size and load of the program, and is not considered a
good programming style.

9. What are the operators in C?

An operator is a symbol that tells the compiler to perform specific mathematical or logical functions. C language
is rich in built-in operators and provides the following types of operators −

✓ Arithmetic Operators
✓ Relational Operators
✓ Logical Operators
✓ Increment and decrement operators
✓ Bitwise Operators
✓ Assignment Operators
✓ Conditional operators
✓ Special operators

10. What is debugging?

Debugging is the process of identifying errors within a program. During program compilation, errors that are
found will stop the program from executing completely. At this state, the programmer would look into the possible
portions where the error occurred. Debugging ensures the removal of errors, and plays an important role in
ensuring that the expected program output is met.

11. What is the difference between Call by Value and Call by Reference?

No. Call by value Call by reference


1 A copy of the value is passed into the function An address of value is passed into the function
2 Changes made inside the function is limited to the Changes made inside the function validate outside
function only. The values of the actual parameters of the function also. The values of the actual
do not change by changing the formal parameters. parameters do change by changing the formal
parameters.

3 Actual and formal arguments are created at the Actual and formal arguments are created at the
different memory location same memory location

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

12. Describe increment and decrement operators.

13. Describe conditional operator with example code

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

14. What does the format %10.2 mean when included in a printf statement?

This format is used for two things: to set the number of spaces allotted for the output number and to set the number
of decimal places. The number before the decimal point is for the allotted space, in this case it would allot 10
spaces for the output number. If the number of space occupied by the output number is less than 10, addition
space characters will be inserted before the actual output number. The number after the decimal point sets the
number of decimal places, in this case, it’s 2 decimal spaces.

15. What are logical errors and how does it differ from syntax errors?

Program that contains logical errors tend to pass the compilation process, but the resulting output may not be the
expected one. This happens when a wrong formula was inserted into the code, or a wrong sequence of commands
was performed. Syntax errors, on the other hand, deal with incorrect commands that are misspelled or not
recognized by the compiler.

16. What are the different types of control structures in programming?

There are 3 main control structures in programming: Sequence, Selection and Repetition. Sequential control
follows a top to bottom flow in executing a program, such that step 1 is first perform, followed by step 2, all the
way until the last step is performed. Selection deals with conditional statements, which mean codes are executed
depending on the evaluation of conditions as being TRUE or FALSE. This also means that not all codes may be
executed, and there are alternative flows within. Repetitions are also known as loop structures, and will repeat
one or two program statements set by a counter.

17. What is the difference between the expression “++a” and “a++”?

In the first expression, the increment would happen first on variable a, and the resulting value will be the one to
be used. This is also known as a prefix increment. In the second expression, the current value of variable a would
the one to be used in an operation, before the value of a itself is incremented. This is also known as postfix
increment.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

18. What is Dynamic Memory Allocation?

Dynamic memory allocation is a process of allocating memory at run time. There are four library routines,
calloc(), free(), realloc(), and malloc() which can be used to allocate memory and free it up during the program
execution. These routines are defined in the header file called stdlib.h.

Example: ptr = (int *) malloc (50)

19. What are the differences between malloc() and calloc()

malloc() calloc()
Malloc() function will create a single block of Calloc() function can assign multiple blocks of
memory of size specified by the user. memory for a variable.

Malloc function contains garbage value. The memory block allocated by a calloc function is
always initialized to zero.

Number of argument is 1. Number of arguments are 2.

Calloc is slower than malloc. Malloc is faster than calloc.


It is not secure as compare to calloc. It is secure to use compared to malloc.

Time efficiency is higher than calloc(). Time efficiency is lower than malloc().

Malloc() function returns only starting address Before allocating the address, Calloc() function
and does not make it zero. returns the starting address and make it zero.

It does not perform initialization of memory. It performs memory initialization.

20. What are the limitations of scanf() and how can it be avoided?

Ans: The Limitations of scanf() are as follows:

✓ scanf() cannot work with the string of characters.


✓ It is not possible to enter a multiword string into a single variable using scanf().

To avoid this the gets( ) function is used. It gets a string from the keyboard and is terminated when enter key is
pressed.

21. Differentiate between the macros and the functions.

Ans: The differences between macros and functions can be explained as follows:

✓ Macro call replaces the templates with the expansion in a literal way.
✓ The Macro call makes the program run faster but also increases the program size.
✓ Macro is simple and avoids errors related to the function calls.
✓ In a function, call control is transferred to the function along with arguments.
✓ It makes the functions small and compact.
✓ Passing arguments and getting back the returned value takes time and makes the program run at a
slower rate.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

22. What is mean by Operators precedence and associativity?

Operator precedence determines which operator is performed first in an expression with more than one operators
with different precedence.

For example: Solve

10 + 20 * 30

10 + 20 * 30 is calculated as 10 + (20 * 30) not as (10 + 20) * 30

Operators Associativity is used when two operators of same precedence appear in an expression. Associativity
can be either Left to Right or Right to Left.

For example: ‘*’ and ‘/’ have same precedence and their associativity is Left to Right, so the expression “100 /
10 * 10” is treated as “(100 / 10) * 10”.

23. How to create a two-dimensional array?

Two dimensional arrays are stored in a row-column matrix, where the left

index indicates the row and right matrix indicates the column.

Syntax : data_type array_name[row_size][column_size];

Example : int mat[3][3];

24. What is the advantage of an array over individual variables?

When storing multiple related data, it is a good idea to use arrays. This is because arrays are named using only 1
word followed by an element number. For example: to store the 10 test results of 1 student, one can use 10
different variable names (grade1, grade2, grade3… grade10). With arrays, only 1 name is used, the rest are
accessible through the index name (grade[0], grade[1], grade[2]… grade[9]).

25. State the advantages of user defined functions over pre-defined function.

✓ A user defined function allows the programmer to define the exact function of the module as per
requirement. This may not be the case with predefined function. It may or may not serve the desired
purpose completely.
✓ A user defined function gives flexibility to the programmer to use optimal programming instructions,
which is not possible in predefined function.
26. What are the properties of recursion?

A recursive function can go infinite like a loop. To avoid infinite running of recursive function, there are two properties
that a recursive function must have −

Base criteria − There must be at least one base criteria or condition, such that, when this condition is met the function
stops calling itself recursively.

Progressive approach − The recursive calls should progress in such a way that each time a recursive call is made it
comes closer to the base criteria.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

27. What is meant by Recursive function? Write the advantages and disadvantages of recursion.

If a function calls itself again and again, then that function is called Recursive function.

Example:
void recursion()
{
recursion(); /* function calls itself */
}
int main()
{
recursion();
}

Recursion makes program elegant and cleaner. All algorithms can be defined recursively which makes it
easier to visualize and prove.

If the speed of the program is vital then, you should avoid using recursion. Recursions use more memory and
are generally slow. Instead, you can use loop.

28. Is it better to use a macro or a function?

Macros are more efficient (and faster) than function, because their corresponding code is inserted directly at
the point where the macro is called.

There is no overhead involved in using a macro like there is in placing a call to a function. However, macros
are generally small and cannot handle large, complex coding constructs.

In cases where large, complex constructs are to handled, functions are more suited, additionally; macros are
expanded inline, which means that the code is replicated for each occurrence of a macro.

29. Difference between structure and union

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

30. Differentiate between for loop and while loop.

Comparison For loop While loop

Command The structure of for loop is Structure of while loop is

for(initial condition; number of While(condition)


iterations) {statements;//body}
{//body of the loop }
Iterations Iterates for a preset number of times. Iterates till a condition is met.

Condition In the absence of a condition, the loop In the absence of a condition, while loop shows
iterates for an infinite number of times an error.
till it reaches break command.

Initialization Initialization in for loop is done only Initialization is done every time the loop is
once when the program starts. iterated.
Use Used to obtain the result only when the Used to satisfy the condition when the number
number of iterations is known. of iterations is unknown.

31. Interpreter Vs Compiler

Interpreter Compiler
Interpreter translates just one statement of the program at a Compiler scans the entire program and translates the whole
time into machine code. of it into machine code at once.

An interpreter takes very less time to analyze the source code. A compiler takes a lot of time to analyze the source code.
However, the overall time to execute the process is much However, the overall time taken to execute the process is much
slower. faster.

An interpreter does not generate an intermediary code. A compiler always generates an intermediary object code. It
Hence, an interpreter is highly efficient in terms of its will need further linking. Hence more memory is needed.
memory.

Keeps translating the program continuously till the first error A compiler generates the error message only after it scans the
is confronted. If any error is spotted, it stops working and complete program and hence debugging is relatively harder
hence debugging becomes easy. while working with a compiler.

Interpreters are used by programming languages like Ruby Compliers are used by programming languages like C and
and Python for example. C++ for example.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

32. While Loop Vs Do While Loop

While Loop Do-While Loop


This is entry-controlled loop. It checks condition before This is exit control loop. Checks condition when coming
entering into loop out from loop
The while loop may run zero or more times Do-While may run more than one times but at least once.
The variable of test condition must be initialized prior to The variable for loop condition may also be initialized in
entering into the loop the loop also.
while(condition){ do{
//statement //statement
} }while(condition);

33. Array Vs Structure

ARRAY STRUCTURE

Array refers to a collection consisting of elements of Structure refers to a collection consisting of elements of
homogeneous data type. heterogeneous data type.

Array uses subscripts or “[ ]” (square bracket) for element Structure uses “.” (Dot operator) for element access
access

Array is pointer as it points to the first element of the Structure is not a pointer
collection.

Instantiation of Array objects is not possible. Instantiation of Structure objects is possible.

Array size is fixed and is basically the number of elements Structure size is not fixed as each element of Structure can
multiplied by the size of an element. be of different type and size.

Bit filed is not possible in an Array. Bit filed is possible in an Structure.

Array declaration is done simply using [] and not any Structure declaration is done with the help of “struct”
keyword. keyword.

Arrays is a non-primitive datatype Structure is a user-defined datatype.

Array traversal and searching is easy and fast. Structure traversal and searching is complex and slow.

data_type array_name[size]; struct sruct_name{ data_type1 ele1; data_type2 ele2; };

Array elements are accessed by their index number using Structure elements are accessed by their names using dot
subscripts. operator.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

Some Useful Codes for Exams

Write a program that solves the problem for Celsius Write a program that solves even/odd problem.
and Fahrenheit.
#include<stdio.h>
#include<stdio.h> int main()
#define PI 3.1416 {
int main() int value;
{
printf("Enter the digit\n");
float r,area;
scanf("%d",&value);
printf("Enter the value of
if(value%2==0)
radius:");
printf("%d is even",value);
scanf("%f",&r);
else
area=PI*r*r;
printf("%d is odd",value);
printf("Area of the circle
return 0;
is:%.2f",area);
}
return 0;
}

Write a program for swapping values of the Write a program for swapping values of the
variables. [with extra variables] variables. [without extra variables]
#include<stdio.h> #include<stdio.h>
int main() int main()
{ {
int first,second,temp; int first,second;
printf("Enter first integer:"); printf("Enter first integer:");
scanf("%d",&first); scanf("%d",&first);
printf("Enter second integer:"); printf("Enter second integer:");
scanf("%d",&second); scanf("%d",&second);
temp=first; first=first+second;
first=second; second=first-second;
second=temp; first=first-second;
printf("Now first integer printf("Now first integer
is=%d\n",first); is=%d\n",first);
printf("And second integer printf("And second integer
is=%d",second); is=%d",second);
return 0; return 0;
} }

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

Write a program to solve quadratic equation. Write a program to show the largest value among three
values.
#include<stdio.h>
#include<math.h> #include<stdio.h>
int main() int main()
{ {
float a,b,c,d,r1,r2; int a,b,c;
printf("Enter the value of a,b,c\n"); printf("Enter three value\n");
scanf("%f%f%f",&a,&b,&c); scanf("%d%d%d",&a,&b,&c);
d=b*b-4*a*c; printf("Largest value is:");
if(d<0) if(a>b)
printf("Roots are imagination"); {
else if(a>c)
{ printf("%d",a);
r1=(-b+sqrt(d))/(2*a); else
r2=(-b-sqrt(d))/(2*a); printf("%d",c);
}
printf("Root1=%.2f\nRoot2=%.2f",r1,r2); else
} {
return 0; if(b>c)
// Mustakim Billah // printf("%d",b);
} else
printf("%d",c);
}
return 0;
}

Write a program to show weather a number is Write a program to get prime numbers from
prime or not. 1 to n numbers.
#include<stdio.h> #include<stdio.h>
main() int main()
{ {
int n,i=2; int num,count,i,n;
printf("Enter a number to check printf("Enter maximum range:\n");
scanf("%d",&n);
if it is prime\n");
for(num=1;num<=n;num++)
scanf("%d",&n); {
for(i=2;i<n;i++) count=0;
{ for(i=2;i<=num/2;i++)
if(n%i==0) {
{ if(num%i==0)
printf("%d is not {
prime",n); count++;
break; break;
}
}
}
} if(count==0&&num!=1)
if(i==n) printf("%d ",num);
printf("%d is Prime",n); }
} return 0;
}

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

Write a program to check weather a number is Write a program that shows weather a given year
perfect or not. is a leap year or not.
#include<stdio.h> #include<stdio.h>
int main() int main()
{ {
int n,i,sum=0;
int year;
printf("Enter a number:");
scanf("%d",&n); printf("Enter a year:");
for(i=1;i<n;i++) scanf("%d",&year);
{
if(n%i==0) if(((year%4==0)&&(year%100!=0))||(year
{ %400==0))
sum=sum+i; printf("%d is a leap year",year);
} else
} printf("%d is not a leap
if(sum==n)
year",year);
printf("%d is a perfect
number",n); return 0;
else
printf("%d is Not a perfect }
number",n);
return 0;
}

Write a program to solve the following Write a program to show sum and average of
some given numbers.
1+2+3+………..+n
#include<stdio.h>
int main()
{
#include<stdio.h> float n,i,value,average,sum=0;
int main() printf("Enter integer number:");
{ scanf("%f",&n);
int i,n,sum=0; printf("Enter %.0f number\n",n);
printf("Enter the value of for(i=1;i<=n;i++)
n:"); {
scanf("%d",&n); scanf("%f",&value);
for(i=1;i<=n;i++) sum=sum+value;
{ average=sum/n;
sum=sum+i; }
} printf("sum is=%.0f \n",sum);
printf("sum=%.2d",sum); printf("Average
return 0; is=%.2f",average);
} return 0;
}

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

Write a program that shows the sum of the Write a program to show weather a string is
series that can be divided by 7 between 100 and palindrome or not.
200
#include<stdio.h>
#include<stdio.h> #include<string.h>
int main() int main()
{ {
int i,sum=0; char a[100],b[100];
printf("The numbers that can be
printf("Enter a string:");
divided by seven between 100 to 200
are\n"); gets(a);
for(i=100;i<=200;i++) strcpy(b,a);
{ strrev(b);
if(i%7==0) if(strcmp(a,b)==0)
{ printf("Entered string is
printf("%d\t",i); palindrome");
sum=sum+i; else
} printf("Entered string is not
}
palindrome");
printf("\nAnd Sum of the serious
is=%d",sum); return 0;
return 0; }
}

Write a program to solve Fibonacci series. Write a program to solve factorial of given
number using recursion.
#include<stdio.h>
int main() #include<stdio.h>
{ int factorial(int n)
int i,n; {
long int a=0,b=1,c; int fact;
printf("Enter the number range:"); if(n==1)
scanf("%d",&n); {
printf("Fibonacci series is:"); return 1;
printf("%ld\t%ld\t",a,b); }
for(i=2;i<n;i++) else
{ {
c=a+b; fact=n*factorial(n-1);
a=b; }
b=c; return fact;
printf("%ld\t",b); }
} int main()
return 0; {
} int n,fact;
printf("Enter a integer number:");
scanf("%d",&n);
fact=factorial(n);
printf("Factorial is=%d",fact);
return 0;
}

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

To practice small codes that comes in admission test these videos (follow the link) helped me a lot and I believe you
will correct most of the admission test mcq’s if you learn these examples shown in these two videos.

https://youtu.be/EmYvmSoTZko

https://youtu.be/AlOQMTr5zD0

References:

https://codeforwin.org/2018/11/c-preprocessor-directives-include-define-undef-conditional-directives.html

https://www.hellocodies.com/data-types-in-c-language/

https://www.tutorialspoint.com/declare-variable-as-constant-in-c

https://www.javatpoint.com/call-by-value-and-call-by-reference-in-c

https://www.guru99.com/c-programming-interview-questions.html

https://www.guru99.com/difference-between-malloc-and-calloc.html

https://www.edureka.co/blog/interview-questions/c-programming-interview-questions/

https://studymaterialz.in/

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

Object Oriented Programming

1. What do you know about OOPS concept? What are the Features of OOP?
Object Oriented programming (OOP) is a programming paradigm that relies on the concept of classes and objects. It
is used to structure a software program into simple, reusable pieces of code blueprints (usually called classes), which
are used to create individual instances of objects. There are many object-oriented programming languages including
JavaScript, C++, Java, and Python.
.
Object-oriented programming – As the name suggests uses objects in programming. Object-oriented programming
aims to implement real-world entities like inheritance, hiding, polymorphism, etc in programming. The main aim of
OOP is to bind together the data and the functions that operate on them so that no other part of the code can access
this data except that function.

Class: The building block of C++ that leads to Object-Oriented programming is a Class. It is a user-defined data
type, which holds its own data members and member functions, which can be accessed and used by creating an
instance of that class. A class is like a blueprint for an object.
For Example: Consider the Class of Cars. There may be many cars with different names and brand but all of them will
share some common properties like all of them will have 4 wheels, Speed Limit, Mileage range etc. So here, Car is
the class and wheels, speed limits, mileage are their properties. A Class is a user-defined data-type which has data
members and member functions. Data members are the data variables and member functions are the functions used to
manipulate these variables and together these data members and member functions define the properties and behaviour
of the objects in a Class.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

Object: An Object is an identifiable entity with some characteristics and behavior. An Object is an instance of a
Class. When a class is defined, no memory is allocated but when it is instantiated (i.e. an object is created) memory
is allocated.

class person
{
char name[20];
int id;
public:
void getdetails(){}
};
int main()
{
person p1; // p1 is a object
}

Object take up space in memory and have an associated address like a record in pascal or structure or union in C.
When a program is executed the objects interact by sending messages to one another. Each object contains data and
code to manipulate the data. Objects can interact without having to know details of each other’s data or code, it is
sufficient to know the type of message accepted and type of response returned by the objects.

Encapsulation: In normal terms, Encapsulation is defined as wrapping up of data and information under a single unit.
In Object-Oriented Programming, Encapsulation is defined as binding together the data and the functions that
manipulate them.
Consider a real-life example of encapsulation, in a company, there are different sections like the accounts section,
finance section, sales section etc. The finance section handles all the financial transactions and keeps records of all
the data related to finance. Similarly, the sales section handles all the sales-related activities and keeps records of all
the sales. Now there may arise a situation when for some reason an official from the finance section needs all the data
about sales in a particular month. In this case, he is not allowed to directly access the data of the sales section. He will
first have to contact some other officer in the sales section and then request him to give the particular data. This is
what encapsulation is. Here the data of the sales section and the employees that can manipulate them are wrapped
under a single name “sales section”.

Encapsulation also leads to data abstraction or hiding. As using encapsulation also hides the data. In the above
example, the data of any of the section like sales, finance or accounts are hidden from any other section.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

Abstraction:
Data abstraction is one of the most essential and important features of object-oriented programming in C++.
Abstraction means displaying only essential information and hiding the details. Data abstraction refers to providing
only essential information about the data to the outside world, hiding the background details or implementation.
Consider a real-life example of a man driving a car. The man only knows that pressing the accelerators will increase
the speed of the car or applying brakes will stop the car but he does not know about how on pressing accelerator the
speed is actually increasing, he does not know about the inner mechanism of the car or the implementation of
accelerator, brakes etc in the car. This is what abstraction is.

Abstraction using Classes: We can implement Abstraction in C++ using classes. The class helps us to group data
members and member functions using available access specifiers. A Class can decide which data member will be
visible to the outside world and which is not.

Abstraction in Header files: One more type of abstraction in C++ can be header files. For example, consider the
pow() method present in math.h header file. Whenever we need to calculate the power of a number, we simply call
the function pow() present in the math.h header file and pass the numbers as arguments without knowing the
underlying algorithm according to which the function is actually calculating the power of numbers.

Polymorphism:
The word polymorphism means having many forms. In simple words, we can define polymorphism as the ability of a
message to be displayed in more than one form.
A person at the same time can have different characteristic. Like a man at the same time is a father, a husband, an
employee. So the same person posses different behaviour in different situations. This is called polymorphism.
An operation may exhibit different behaviours in different instances. The behaviour depends upon the types of data
used in the operation.

Inheritance:
The capability of a class to derive properties and characteristics from another class is called Inheritance. Inheritance
is one of the most important features of Object-Oriented Programming.

• Sub Class: The class that inherits properties from another class is called Sub class or Derived Class.
• Super Class:The class whose properties are inherited by sub class is called Base Class or Super class.
• Reusability: Inheritance supports the concept of “reusability”, i.e. when we want to create a new class and
there is already a class that includes some of the code that we want, we can derive our new class from the
existing class. By doing this, we are reusing the fields and methods of the existing class.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

Dynamic Binding: In dynamic binding, the code to be executed in response to function call is decided at runtime.
C++ has virtual functions to support this.

Message Passing: Objects communicate with one another by sending and receiving information to each other. A
message for an object is a request for execution of a procedure and therefore will invoke a function in the receiving
object that generates the desired results. Message passing involves specifying the name of the object, the name of the
function and the information to be sent.

2. What do you mean by operator overloading and function overloading?

Operator Overloading: The process of making an operator to exhibit different behaviours in different instances is
known as operator overloading.
Function Overloading: Function overloading is using a single function name to perform different types of tasks.

Example: Suppose we have to write a function to add some integers, some times there are 2 integers,
some times there are 3 integers. We can write the Addition Method with the same name having different
parameters, the concerned method will be called according to parameters.

3. What is Function Overloading and Overriding?


Function Overloading is when multiple function with same name exist in a class. Function Overriding is when function
have same prototype in base class as well as derived class. Function Overloading can occur without inheritance.
Function Overriding occurs when one class is inherited from another class. Overloaded functions must differ in either
number of parameters or type of parameters should be different. In Overridden function parameters must be same.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

4. Differentiate between Constructor and Destructor.


Constructor
• It helps to allocate memory to an object.
• It can take arguments.
• It is called automatically when an object is created.
• It allows an object to initialize a value before it is used.
• They are called in the successive order of their creation.
• There can be multiple constructors in a single class.
• The copy constructor allows the constructor to declare and initialize an object from another object.
• It can be overloaded.
Example:
class_name( arguments if any )
{
};
Destructor
• It deallocates the memory of an object.
• It doesn’t take any argument.
• It is called automatically when the block is exited or when the program terminates.
• They allow objects to execute code when it is being destroyed.
• They are called in the reverse order of their creation.
• There is a single destructor in a class.
• Destructor can’t be overloaded.
Example:
~ class_name( no arguments )
{
};

5. What is inline function?


C++ provides an inline function to reduce the function call overhead. Inline function is a function that is expanded in
line when it is called. When the inline function is called whole code of the inline function gets inserted or substituted
at the point of inline function call. This substitution is performed by the C++ compiler at compile time. Inline function
may increase efficiency if it is small.
syntax:
inline return-type function-name(parameters)
{
// function code
}

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

6. What are the advantages and disadvantages of inline function?


advantages:
✓ Function call overhead doesn’t occur.
✓ It also saves the overhead of push/pop variables on the stack when function is called.
✓ It also saves overhead of a return call from a function.
✓ When you inline a function, you may enable compiler to perform context specific optimization on the body
of function. Such optimizations are not possible for normal function calls. Other optimizations can be
obtained by considering the flows of calling context and the called context.
✓ Inline function may be useful (if it is small) for embedded systems because inline can yield less code than
the function call preamble and return.

disadvantages:
✓ If you use too many inline functions then the size of the binary executable file will be large, because of the
duplication of same code.
✓ Too much inlining can also reduce your instruction cache hit rate, thus reducing the speed of instruction fetch
from that of cache memory to that of primary memory.
✓ Inline functions may not be useful for many embedded systems. Because in embedded systems code size is
more important than speed.
✓ 6) Inline functions might cause thrashing because inlining might increase size of the binary executable file.
Thrashing in memory causes performance of computer to degrade.

7. What do you mean by dynamic binding? Why it is useful in OOP?

Dynamic binding
The general meaning of binding is linking something to a thing. Here linking of objects is done. In a programming
sense, we can describe binding as linking function definition with the function call. So the term dynamic binding
means to select a particular function to run until the runtime. Based on the type of object, the respective function will
be called. As dynamic binding provides flexibility, it avoids the problem of static binding as it happened at compile
time and thus linked the function call with the function definition. On that note, dynamic binding also helps us to
handle different objects using a single function name. It also reduces the complexity and helps the developer to debug
the code and errors.

The concept of dynamic programming is implemented with virtual functions.

Virtual functions
A function declared in the base class and overridden(redefined) in the child class is called a virtual function. When
we refer derived class object using a pointer or reference to the base, we can call a virtual function for that object and
execute the derived class's version of the function.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

Characteristics

✓ Run time function resolving


✓ Used to achieve runtime polymorphism
✓ All virtual functions are declared in the base class
✓ Assurance of calling correct function for an object regardless of the pointer(reference) used for function
call.
✓ A virtual function cannot be declared as static
✓ No virtual constructor exists but a virtual destructor can be made.
✓ Virtual function definition should be the same in the base as well as the derived class.
✓ A virtual function can be a friend of another class.
✓ The definition is always in the base class and overrides in the derived class.

8. What do you know about access modifiers in C++?


Access modifiers are used to implement an important aspect of Object-Oriented Programming known as Data
Hiding.
There are 3 types of access modifiers available in C++:

✓ Public
✓ Private
✓ Protected
Public:
All the class members declared under the public specifier will be available to everyone. The data members and member
functions declared as public can be accessed by other classes and functions too. The public members of a class can be
accessed from anywhere in the program using the direct member access operator (.) with the object of that class.
Private:
The class members declared as private can be accessed only by the member functions inside the class. They are not
allowed to be accessed directly by any object or function outside the class. Only the member functions or the friend
functions are allowed to access the private data members of a class.
Protected:
Protected access modifier is similar to private access modifier in the sense that it can’t be accessed outside of it’s class
unless with the help of friend class, the difference is that the class members declared as Protected can be accessed by
any subclass(derived class) of that class as well.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

9. What is friend function? What are its characteristics?


Friend Class A friend class can access private and protected members of other class in which it is declared as friend.
It is sometimes useful to allow a particular class to access private members of other class. For example, a LinkedList
class may be allowed to access private members of Node.
Characteristics:
✓ Friends should be used only for limited purpose. too many functions or external classes are declared as friends
of a class with protected or private data, it lessens the value of encapsulation of separate classes in object-
oriented programming.
✓ Friendship is not mutual. If class A is a friend of B, then B doesn’t become a friend of A automatically.
✓ Friendship is not inherited (See this for more details)
✓ The concept of friends is not there in Java.

10. What is copy constructor?


A copy constructor is a member function that initializes an object using another object of the same class. A copy
constructor has the following general function prototype:

ClassName (const ClassName &old_obj);

11. Why is JAVA a platform independent language?


Java compiler produces a unique type of code called bytecode unlike c compiler where compiler produces only
natively executable code for a particular machine. When the Java program runs in a particular machine it is sent to
java compiler, which converts this code into intermediate code called bytecode. This bytecode is sent to Java virtual
machine (JVM) which resides in the RAM of any operating system. JVM recognizes the platform it is on and converts
the bytecodes into native machine code. Hence java is called platform independent language.

12. What is JVM?


JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime environment in which
java bytecode can be executed. JVMs are available for many hardware and software platforms (i.e. JVM is platform
dependent).
The JVM performs following operation:

✓ Loads code
✓ Verifies code
✓ Executes code
✓ Provides runtime environment

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

13. What are the differences between java and C++?


Comparison C++ Java

Platform- C++ is platform-dependent. Java is platform-independent.


independent

Mainly used for C++ is mainly used for system Java is mainly used for application programming. It
programming. is widely used in Windows-based, web-based,
enterprise, and mobile applications.

Goto C++ supports the goto statement. Java doesn't support the goto statement.

Multiple C++ supports multiple inheritance. Java doesn't support multiple inheritance through
inheritance class. It can be achieved by using interfaces in java.

Operator C++ supports operator overloading. Java doesn't support operator overloading.
Overloading

Pointers C++ supports pointers. You can write a Java supports pointer internally. However, you
pointer program in C++. can't write the pointer program in java. It means
java has restricted pointer support in java.

Compiler and C++ uses compiler only. C++ is Java uses both compiler and interpreter. Java
Interpreter compiled and run using the compiler source code is converted into bytecode at
which converts source code into compilation time. The interpreter executes this
machine code so, C++ is platform bytecode at runtime and produces output. Java is
dependent. interpreted that is why it is platform-independent.

Call by Value C++ supports both call by value and Java supports call by value only. There is no call by
and Call by call by reference. reference in java.
reference
Structure and C++ supports structures and unions. Java doesn't support structures and unions.
Union

Thread Support C++ doesn't have built-in support for Java has built-in thread support.
threads. It relies on third-party
libraries for thread support.

Virtual Keyword C++ supports virtual keyword so that Java has no virtual keyword. We can override all
we can decide whether or not to non-static methods by default. In other words,
override a function. non-static methods are virtual by default.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/858042971559671/

Data Structure and Algorithm

1. What is Linear and Non-Linear data structure?

Linear data structure: Elements are organized in a sequence.

Non-Linear data structure: Elements are not organized sequentially but they have their own approaches.

2. Write an algorithm that finds the location LOC and the value MAX of the largest element
of an array.
Algorithm: Given a nonempty array DATA with N numerical values, this algorithm finds the location LOC
and the value MAX of the largest element of DATA.

1. Set K = 1, LOC = 1 and MAX =DATA [1].

2. Repeat Steps 3 and 4 while K<=N

3. If MAX < DATA [K], then

Set LOC = K and MAX = DATA [K].

[End of if structure]

4. Set K = K+1.

[End of Step 2 loop]

5. Write: LOC, MAX.

6. Exit.

3. What is Big O Notation?

Suppose M is an algorithm, and suppose n is the size of the input data. Clearly the complexity f(n) of M
increases as n increases. The rate of increase of f(n) is usually done by comparing f(n) with some standard
function, such as

log2n, n, n log2n, n2, n3, 2n

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/858042971559671/

4. Write an algorithm that finds the solutions of a quadratic equation.

Algorithm: This algorithm inputs the coefficients A, B, C of a quadratic equation and outputs the real
solutions, if any.

Step 1. Read: A, B, C.
Step 2. Set D = B2 – 4AC.
Step 3. If D > 0, then
Set X1 = (-B + root D)/2A and X2 = (-B - root D)/2A.
Write: X1, X2.
Else if D = 0, then
Set X = -B/2A.
Write: ‘UNIQUE SOLUTION’, X.
Else
Write: ‘No REAL SOLUTIONS’
[End of If structure.]
Step 4. Exit.

5. Show the Complexity of Linear Search Algorithm.

Best case: The best case occurs when ITEM is the first element in the array DATA. In this situation, we have

C(n) = 1

Worst case: The worst case occurs when ITEM is the last element in the array DATA or is not there at all. In
either situation, we have

C(n) = n

Average case: The ITEM may appear at any position in the array. The number of comparisons can be any of
the numbers 1, 2, 3, . . . , n and each number occurs with probability p = 1/n. Then

The average number of comparisons needed to find the location of ITEM is approximately equal to half the
number of elements in the DATA list.

6. Write complexity of BUBBLE SORT algorithm.

The time for a sorting algorithm is measured in terms of the number of comparisons. The number f(n) of
comparisons in the bubble sort is easily computed. Specifically, there are n-1 comparisons during first pass, which
places the largest element in the last position, there are n-2 comparisons in the second pass, which places the
second largest element in the next to last position, and so on. Thus,

f(n) = (n-1) + (n-2) +. . . + 2 + 1 = n(n-1)/2=n2/2+O(n) = O(n2)

In other words, the time required to execute bubble sort algorithm is proportional to n2, where n is the number
of input items.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/858042971559671/

7. Describe memory representation of linear array.

Let LA be a linear array in the memory of the computer. The memory of the computer is a sequence of addressed
locations. The computer does not need to keep track of the address of every element of LA, but needs to keep
track only of the first element of LA, denoted by

Base (LA), called the base address of LA.

Using this address Base (LA), the computer calculates the address of any element of LA by the following formula:

LOC(LA[k]) = Base(LA) + w(K – lower bound)

Where w is the number of words per memory cell for the array LA

8. Write an algorithm for inserting an item into a linear array.

Algorithm 4.2: (Inserting into a linear array)

Here LA is linear array with N elements and K is a positive integer such that K<=N. This algorithm inserts an
element ITEM into the K-th position in LA.

Step 1. Set J:=N

Step 2. Repeat Steps 3 and 4 while J>=K

Step 3. Set LA [J+1]: =LA [J]

Step 4. Set J:=J-1

[End of step 2 loop]

Step 5. Set LA [K]: =ITEM

Step 6. Set N:=N+1

Step 7. Exit

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/858042971559671/

9. Write the complexity of Binary Search algorithm and mention its limitations.

The algorithm requires two conditions: The list must be sorted and One must have direct access to the
middle element in any sub list.

10. What do you mean by Garbage collection?

Suppose some memory space becomes reusable because a node is deleted from a list or an entire list is deleted
from a program. Clearly, we want the space to be available for future use. One way to bring this about is to
immediately reinsert the space into the free-storage list.

The operating system may periodically collect all the deleted space onto the free-storage list. Any technique which
does this collection is called garbage collection. Garbage collection usually takes place in two steps. First the
computer runs through all lists, tagging those cells which are currently in use, and then computer runs through
the memory, collecting all untagged space onto the free-storage list. The garbage collection may take place when
there is only some minimum amount of space or no space at all left in the free-storage list, or when the CPU is
idle and has time to do the collection. The garbage collection is invisible to the programmer.

11. Distinguish between Array and Linked List.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/858042971559671/

12. Suppose the following sorted 13 elements are stored in an array


A: 11, 22, 30, 33, 40, 44, 55, 60, 66, 77, 80, 88, 99

Now apply the binary search to array A for

i) ITEM = 40 and
ii) ii) ITEM= 85.

For ITEM = 40

1. BEG = 1 and END =13

MID = INT [(1+13)/2] = 7. So, A [MID] = 55 ≠ ITEM

2. Since 40<55, BEG=1 and END = MID-1 = 7-1 = 6

MID = INT [(1+6)/2] = 3. So, A[MID] = 30 ≠ ITEM

3. Since 40>30, BEG = MID+1 = 3+1= 4 and END = 6

MID= INT [(4+6)/2] = 5. So, A[MID] = 40 = ITEM

We have found ITEM in location LOC = MID = 5

For ITEM = 85

1. BEG = 1 and END =13

MID = INT [(1+13)/2] = 7. So, A [MID] = 55 ≠ ITEM

2. Since 85>55, BEG=MID+1=7+1=8 and END = 13

MID = INT [(8+13)/2] = 10. So, A[MID] = 77 ≠ ITEM

3. Since 85>77, BEG = MID+1 = 10+1= 11 and END = 13

MID= INT [(11+13)/2] = 12. So, A[MID] = 88 ≠ ITEM

4. Since 85<88, BEG = 11 and END = MID-1 =12-1=11

MID= INT [(11+11)/2] = 11. So, A[MID] = 80 ≠ ITEM

5. Since 85>80, BEG = MID + 1 =11 + 1 =12 and END = 11

Since BEG > END, ITEM does not belong to A.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/858042971559671/

13. Write an algorithm for Binary Search.

Algorithm 4.6: (Binary Search) BINARY (DATA, LB, UB, ITEM, LOC)

Here DATA is a sorted array with lower bound LB and upper bound UB, and ITEM is a given item of information.
The variables BEG, END and MID denote respectively the beginning, end and middle locations of a segment of
elements of DATA.

This algorithm finds the location LOC of ITEM in DATA or sets LOC=NULL.

1. Set BEG=LB, END=UB and MID=INT ((BEG+END)/2).

2. Repeat Steps 3 and 4 while BEG ≤ END and DATA[MID] ≠ ITEM

3. If ITEM < DATA[MID], then

Set END= MID - 1

Else

Set BEG= MID + 1

[End of If structure]

4. Set MID= INT((BEG+END)/2)

[End of Step 2 loop]

5. If ITEM = DATA[MID], then

Set LOC= MID

Else

Set LOC= NULL

[End of If structure]

6. Exit.

14. What do you mean by Overflow and Underflow?

Overflow

– Sometimes new data are to be inserted into a data structure but there is no available space. This
situation is usually called overflow.

– Overflow will occur in linked list when AVAIL = NULL and there is an insertion.

Underflow

– Underflow refers to the situation where one wants to delete data from a data structure that is empty.

– Underflow will occur in linked lists when START= NULL and there is a deletion.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/858042971559671/

15. Write an algorithm for finding the k-th smallest element in an array of n element. Analyze the time-
complexity of your algorithm.
https://afteracademy.com/blog/kth-smallest-element-in-an-array

Solution Steps

1. Build a min-heap of size n of all elements


2. Extract the minimum elements K-1 times, i.e. delete the root and perform heapify operation K times.
3. Return the root of the heap (A[0] would be the root element in the array implementation of the heap)

Pseudo-Code
int kthSmallest(int A[], int n, int K)
{
build_minHeap(A, n)
for( i = 0 to K-1 )
extractMin(A)
return A[0]
}

Complexity Analysis

Time Complexity: Building the min heap of n elements + Extracting min element K-1 times = O(n) + (K-1) *
log(n) = O( n + Klogn)

16. Describe Two-way Linked List

A two-way list is a new list structure which can be traversed in two directions:

A two-way list is a linear collection of data element, called nodes, where each node N is divided into three
parts:

✓ An information field INFO which contains the data of N


✓ A pointer field FORW which contains the location of the next node in the list
✓ A pointer field BACK which contains the location of the preceding node in the list.

The list requires two pointer variables:

✓ FIRST which point to the first node in the list and LAST which points to the last node in the list.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/858042971559671/

17. Write a procedure that finds the number of elements in a linked list.

COUNT (INFO, LINK, START, NUM)

This procedure finds the number of elements in a linked list.

Step 1. Set NUM = 0

Step 2. Set PTR = START

Step 3. Repeat Step 4 and 5 while PTR ≠ NULL

Step 4. NUM = NUM + 1

Step 5. Set PTR = LINK [PTR]

[End of Step 3 loop.]

Step 6. Return.

18. Show how to insert into a linked list.

Let LIST be a linked list with successive nodes A and B as pictured below. Suppose a node N is to be inserted
into the list between nodes A and B. The schematic diagram of such an insertion appears below.

Three pointer fields are changed as follows:

– The next pointer field of node A now points to the new node N, to which AVAIL previously
pointed.

– AVAIL now point to the second node in the free pool, to which node N previously pointed.

– The next pointer field of node N now points to node B, to which node A previously pointed.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/858042971559671/

19. Define Binary Tree, Complete Binary Tree and Extended Binary Tree

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/858042971559671/

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/858042971559671/

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/858042971559671/

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

Computer Network

1. Define Computer Network.

Computer network is the collection of autonomous computers interconnected by a single technology. Two computers
are said to be interconnected if they are able to exchange information. Network uses low level protocols such as
TCP/IP. Network uses standardized hardware.

2. Write down the usage of computer network.

The uses of computer networks are:

Business applications: Many Companies have a substantial number of computers. All computer may require to be
connected. ‘Resource sharing’ such as printer is one of the issue here. Client server model is also based on networking.
Email, Video conferencing also plays a vital role in business application which Is based on certain computer network.

Home applications:
Home users uses computer network for followings:
1. Person to person communication
2. Interactive entertainment
3. E-Commerce
4. Access to remote information

Mobile users: Mobile users generally uses wireless network. They use network for
1. Calls
2. Faxes
3. E-mail
4. Web browsing etc.

Social issues: Networking introduces new social, ethical and political problems. High resolution photographs or even
short video clips can now easily be transmitted over computer networks which is a social issue nowadays.

3. Differentiate between Computer Network and Distributed system.

In a distributed system, a collection of independent computers appears to its users as a single coherent system. Usually,
it has a single model or paradigm that it presents to the users. Often a layer of software on top of the operating system,
called middleware, is responsible for implementing this model. A well-known example of a distributed system is the
World Wide Web. It runs on top of the Internet and presents a model in which everything looks like a document (Web
page). In a computer network, this coherence, model, and software are absent. If the machines have different hardware
and different operating systems, that is fully visible.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

4. Describe LAN, MAN, WAN, PAN

LAN: (Local Area Network)

LAN’s are confined to a geographical area such as a single building or a college campus.

➢ LAN’s are based on Ethernet technology.


➢ Twisted pair is used as connection.
➢ Repeater is used as networking device.
➢ It covers generally 1-3 KM’s.
➢ Connection is relatively week.

MAN: (Metropolitan Area Network)

Man connects two or more LAN’s

Example: Cable TV network.

➢ Coaxial cables are used as connection.


➢ Switch and Bridge are used as networking device.
➢ It can cover a town or a city.
➢ Connection is relatively stronger than LAN’s.

WAN: (Wide Area Network)

WAN covers broad area or large distance.

Example: Internet.

➢ Optical cable and submarine cable are used as wire connection.


➢ Microwave and Radio wave are used as wireless connection.
➢ Routers and gateway are used as networking device.
➢ It can cover world-wide.
➢ Connection is stronger than LAN’s and MAN’s.

PAN: Personal Area Network

A personal area network (PAN) connects electronic devices within a user's immediate area. The size of a PAN
ranges from a few centimeters to a few meters. One of the most common real-world examples of a PAN is the
connection between a Bluetooth earpiece and a smartphone. PANs can also connect laptops, tablets, printers,
keyboards, and other computerized devices. PAN network connections can either be wired or wireless. Wired
connection methods include USB and FireWire; wireless connection methods include Bluetooth (the most
common), WiFi, IrDA, and Zigbee.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

5. Differentiate between connection oriented and connectionless services.

Connection Oriented:

Connection-oriented service is modeled after the telephone system. To talk to someone, you pick up the phone, dial
the number, talk, and then hang up. Similarly, to use a connection-oriented network service, the service user first
establishes a connection, uses the connection, and then releases the connection. The essential aspect of a connection
is that it acts like a tube: the sender pushes objects (bits) in at one end, and the receiver takes them out at the other
end. A typical situation in which a reliable connection-oriented service is appropriate is file transfer. The owner of the
file wants to be sure that all the bits arrive correctly and in the same order they were sent.

Connectionless:

connection-oriented service, connectionless service is modeled after the postal system. Each message (letter) carries
the full destination address, and each one is routed through the intermediate nodes inside the system independent of
all the subsequent messages. There are different names for messages in different contexts; a packet is a message at the
network layer. When the intermediate nodes receive a message in full before sending it on to the next node, this is
called store-and-forward switching.

6. Describe OSI model with appropriate diagram.

The model is called the ISO OSI (Open Systems Interconnection) Reference Model because it deals with connecting
open systems—that is, systems that are open for communication with other systems.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

Physical Layer:

• Does the job of carrying bit streams(bit by bit) over a physical medium.
• Keeps track of signals.
• Defines the duration of a bit.
• Bit encoding
• Protocols/connection: Ethernet, HUB, Repeater

Data Link Layer:

• Transforms bits into frames.


• Provides node to node data transfer.
• Defines the error detection and correction schemes.
• Protocols/connection: ATM,SWITCH,BRIDGE

Network Layer:

• Does the job of data transmission from source to destination.


• Translates logical network address in physical machine address.
• Routing and subnetting.
• Reliable message delivery.
• Protocols/connection: IP,IPX,Routing

Transport layer:

• End to end communication.


• Provides logical communication between application process running and hosts.
• Management of error correction.
• Transmission reliability.
• Protocols/connection: TCP,UDP

Session Layer:

• Does the job of control over network.


• Establishes, maintains and terminates connections.
• Provides the mechanism for opening, closing and managing a session.
• Protocols/connection: Apple talk

Presentation Layer:

• Concerns with syntax and semantics of the information.


• Translates data into suitable format.
• Data encryption
• Protocols/connection: JPEG, GIF

Application Layer:

• Provides user interface.


• Provides mail services.
• Protocols/connection: HTTP, FTP, SMPT, DNS etc

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

7. Describe TCP/IP model with appropriate diagram.

TCP/IP is a protocol suit or framework for Internet. TCP is used for reliable connection and IP is used for
addressing hosts. It has four layers. They are:

The Link Layer

The lowest layer in the model, the link layer describes what links such as serial lines and classic Ethernet must
do to meet the needs of this connectionless internet layer. It is not really a layer at all, in the normal sense of the
term, but rather an interface between hosts and transmission links.

The Internet Layer

The internet layer is the linchpin that holds the whole architecture together. Its job is to permit hosts to inject
packets into any network and have them travel independently to the destination (potentially on a different
network). They may even arrive in a completely different order than they were sent, in which case it is the job of
higher layers to rearrange them, if in-order delivery is desired. The internet layer defines an official packet format
and protocol called IP (Internet Protocol), plus a companion protocol called ICMP (Internet Control Message
Protocol) that helps it function. The job of the internet layer is to deliver IP packets where they are supposed to
go. Packet routing is clearly a major issue here, as is congestion (though IP has not proven effective at avoiding
congestion).

The Transport Layer

The layer above the internet layer in the TCP/IP model is now usually called the transport layer. It is designed to
allow peer entities on the source and destination hosts to carry on a conversation, just as in the OSI transport
layer. Two end-to-end transport protocols have been defined here. The first one, TCP (Transmission Control
Protocol), is a reliable connection-oriented protocol that allows a byte stream originating on one machine to be
delivered without error on any other machine in the internet. It segments the incoming byte stream into discrete
messages and passes each one on to the internet layer. At the destination, the receiving TCP process reassembles
the received messages into the output stream. TCP also handles flow control to make sure a fast sender cannot
swamp a slow receiver with more messages than it can handle. The second protocol in this layer, UDP (User
Datagram Protocol), is an unreliable, connectionless protocol for applications that do not want TCP’s sequencing
or flow control and wish to provide their own.

The Application Layer

The TCP/IP model does not have session or presentation layers. No need for them was perceived. On top of the
transport layer is the application layer. It contains all the higher-level protocols. The early ones included virtual
terminal (TELNET), file transfer (FTP), and electronic mail (SMTP).

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

8. Differentiate TCP/IP and OSI model.

9. What do you know about ARPANET?

A packet-switched network connecting a number of LANs, called Arpanet developed by ARPA (Advanced Research
Projects Agency). Originally, Arpanet was strictly military and defense-oriented. Arpanet was converted to use the
new standard TCP/IP protocol set (1980)

ARPANET is the grandparent of all wide area computer networks. The ARPANET was a research network sponsored
by the DoD (U.S. Department of Defense). It eventually connected hundreds of universities and government
installations, using leased telephone lines. When satellite and radio networks were added later, the existing protocols
had trouble interworking with them, so a new reference architecture was needed. Thus, from nearly the beginning, the
ability to connect multiple networks in a seamless way was one of the major design goals. This architecture later
became known as the TCP/IP Reference Model, after its two primary protocols.

The Defense Communication Agency (DCA) split Arpanet into two networks (1983):

Arpanet: To be used for internetworking research projects


Milnet: To be used strictly for military purposes

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

10. What is RFID?

RFID:

RFID (radio frequency identification) is a form of wireless communication that incorporates the use of
electromagnetic or electrostatic coupling in the radio frequency portion of the electromagnetic spectrum to
uniquely identify an object, animal or person. Use cases for RFID technology include healthcare, manufacturing,
inventory management, shipping, retail sales and home use.
Every RFID system consists of three components: a scanning antenna, a transceiver and a transponder. When the
scanning antenna and transceiver are combined, they are referred to as an RFID reader or interrogator. The RFID
reader is a network-connected device that can be portable or permanently attached. It uses radio frequency waves
to transmit signals that activate the tag. Once activated, the tag sends a wave back to the antenna, where it is
translated into data.
The transponder is located in the RFID tag itself. The read range for RFID tags varies based on factors including
the type of tag, type of reader, RFID frequency and interference in the surrounding environment or from other
RFID tags and readers. Generally speaking, tags that have a stronger power source also have a longer read range.

11. Write short Note on Twisted Pair.

One of the oldest and still most common transmission media is twisted pair. A twisted pair consists of two
insulated copper wires, typically about 1 mm thick. The wires are twisted together in a helical form, just like a
DNA molecule. Twisting is done because two parallel wires constitute a fine antenna. When the wires are twisted,
the waves from different twists cancel out, so the wire radiates less effectively. A signal is usually carried as the
difference in voltage between the two wires in the pair. This provides better immunity to external noise because
the noise tends to affect both wires the same, leaving the differential unchanged. The most common application
of the twisted pair is the telephone system.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

12. Write Short Notes on Coaxial Cable.

Another common transmission medium is the coaxial cable (known to its many friends as just ‘‘coax’’ and pronounced
‘‘co-ax’’). It has better shielding and greater bandwidth than unshielded twisted pairs, so it can span longer distances
at higher speeds. Two kinds of coaxial cable are widely used. One kind, 50-ohm cable, is commonly used when it is
intended for digital transmission from the start. The other kind, 75-ohm cable, is commonly used for analog
transmission and cable television. This distinction is based on historical, rather than technical, factors (e.g., early
dipole antennas had an impedance of 300 ohms, and it was easy to use existing 4:1 impedance-matching transformers).
Starting in the mid1990s, cable TV operators began to provide Internet access over cable, which has made 75-ohm
cable more important for data communication. A coaxial cable consists of a stiff copper wire as the core, surrounded
by an insulating material. The insulator is encased by a cylindrical conductor, often as a closely woven braided mesh.
The outer conductor is covered in a protective plastic sheath.

13. Describe fibre optics cables.

A fiber optic cable is a network cable that contains strands of glass fibers inside an insulated casing. They're designed
for long-distance, high-performance data networking, and telecommunications. Compared to wired cables, fiber optic
cables provide higher bandwidth and transmit data over longer distances. Fiber optic cables support much of the
world's internet, cable television, and telephone systems.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

14. Describe VSATs.

A recent development in the communication satellite world is the development of low-cost microstations, sometimes
called VSATs (Very Small Aperture Terminals). These tiny terminals have 1-meter or smaller antennas (versus 10 m
for a standard GEO antenna) and can put out about 1 watt of power. The uplink is generally good for up to 1 Mbps,
but the downlink is often up to several megabits/sec. Direct broadcast satellite television uses this technology for one-
way transmission. In many VSAT systems, the microstations do not have enough power to communicate directly with
one another (via the satellite, of course). Instead, a special ground station, the hub, with a large, high-gain antenna is
needed to relay traffic between VSATs.

15. Describe Circuit switching and packet switching with diagram.

Circuit Switching: Circuit switching is defined as the method of switching which is used for establishing a dedicated
communication path between the sender and the receiver. The link which is established between the sender and the
receiver is in the physical form. Analog telephone network is a well-known example of circuit switching.

Advantages of Circuit Switching

✓ The bandwidth used is fixed.


✓ The quality of communication is increased as a dedicated communication channel is used.
✓ The rate at which the data is transmitted is fixed.
✓ While switching, no time is wasted in waiting.
✓ It is preferred when the communication is long and continuous.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

Disadvantages of Circuit Switching

✓ Since dedicated channels are used, the bandwidth required is more.


✓ The utilization of resources is not full.
✓ Since a dedicated channel has been used, the transmission of other data becomes impossible.
✓ The time taken by the two stations for the establishment of the physical link is too long.
✓ Circuit switching is expensive because every connection uses a dedicated path establishment.
✓ The link between the sender and the receiver will be maintained until and unless the user terminates the link.
This will also continue if there is no transfer of data taking place.

Packet Switching

Packet switching is defined as the connectionless network where the messages are divided and grouped together and,
this is known as a packet. Each packet is routed from the source to the destination as individual packets. The actual
data in these packets are carried by the payload. When the packet arrives at the destination, it is the responsibility of
the destination to put these packets in the right order.

Advantages of Packet Switching

✓ There is no delay in the delivery of the packets as they are sent to the destination as soon as they are available.
✓ There is no requirement for massive storage space as the information is passed on to the destination as soon
as they are received.
✓ Failure in the links does not stop the delivery of the data as these packets can be routed from other paths too.
✓ Multiple users can use the same channel while transferring their packets.
✓ The usage of bandwidth is better in case of packet switching as multiple sources can transfer packets from
the same source link.

Disadvantages of Packet Switching

✓ Installation costs of packet switching are expensive.


✓ The delivery of these packets becomes easy when complicated protocols are used.
✓ High-quality voice calls cannot use packet switching as there is a lot of delay in this type of communication.
✓ Connectivity issues may lead to loss of information and delay in the delivery of the information.

16. Mansion some error correcting codes.

four different error-correcting codes are:

✓ Hamming codes.
✓ Binary convolutional codes.
✓ Reed-Solomon codes.
✓ Low-Density Parity Check codes.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

17. What is MAC? Write down the importance of MAC.

MAC: MAC stands for Media Access Control. It is a unique identifier for network interfaces.

The MAC address is usually assigned by the manufacturer of a Network Interface Controller (NIC), and it is stored in
the hardware. The NIC is a computer circuit card that allows a computer to connect to a network. During network
communication the Address Resolution Protocol (ARP) for the Internet Protocol Version 4 (IPv4) or the Neighbor
Discovery Protocol (NDP) for IPv6 translates the IP into a NIC.

The MAC address is formed in accordance to the rules of the three numbering name spaces, which are managed by
the Institute of Electrical and Electronic Engineers (IEEE). The format is six sets of two digits or characters, separated
by hyphens. An example of a MAC address is 30-65-EC-6F-C4-58.

Importance of MAC address:

One of the applications of MAC addresses is in the filtering process on wireless networks. In order to prevent strangers
from accessing a network, the router is set to accept only specific MAC addresses. In this manner, if the IP address
changes, as for example in the case of dynamic IP addresses, the MAC address can still identify the device.

Filtering can be used to track network users, and to limit their access. It can also have other uses, such as identifying
when a stolen device connects to the network. For these reasons, many companies and institutions require the MAC
addresses of their members’ devices. Therefore, it is important for device owners not to reveal their MAC addresses
to anyone, except to authorized personnel.

18. Describe SMTP

SMTP is part of the application layer of the TCP/IP protocol. Using a process called “store and forward,” SMTP
moves your email on and across networks. It works closely with something called the Mail Transfer Agent (MTA)
to send your communication to the right computer and email inbox.

SMTP spells out and directs how your email moves from your computer’s MTA to an MTA on another computer,
and even several computers. Using that “store and forward” feature mentioned before, the message can move in
steps from your computer to its destination. At each step, Simple Mail Transfer Protocol is doing its job. Lucky for
us, this all takes place behind the scenes, and we don’t need to understand or operate SMTP.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

19. What is DNS? Describe briefly how DNS Work.

DNS: The Domain Name System (DNS) is the phonebook of the Internet. Humans access information online
through domain names, like nytimes.com or espn.com. Web browsers interact through Internet Protocol (IP)
addresses. DNS translates domain names to IP addresses so browsers can load Internet resources.

Each device connected to the Internet has a unique IP address which other machines use to find the device. DNS
servers eliminate the need for humans to memorize IP addresses such as 192.168.1.1 (in IPv4), or more complex
newer alphanumeric IP addresses such as 2400:cb00:2048:1::c629:d7a2 (in IPv6).

How does DNS work?

The process of DNS resolution involves converting a hostname (such as www.example.com) into a computer-friendly
IP address (such as 192.168.1.1). An IP address is given to each device on the Internet, and that address is necessary
to find the appropriate Internet device - like a street address is used to find a particular home. When a user wants to
load a webpage, a translation must occur between what a user types into their web browser (example.com) and the
machine-friendly address necessary to locate the example.com webpage.

In order to understand the process behind the DNS resolution, it’s important to learn about the different hardware
components a DNS query must pass between. For the web browser, the DNS lookup occurs “ behind the scenes” and
requires no interaction from the user’s computer apart from the initial request.

20. Describe Bluetooth Architecture with figure.


The IEEE 802.15. 1 standard is the basis for the Bluetooth wireless communication technology. Bluetooth is an open
wireless technology standard for transmitting fixed and mobile electronic device data over short distances. Bluetooth
communicates with a variety of electronic devices and creates personal networks operating within the unlicensed 2.4
GHz band. Operating range is based on device class. A variety of digital devices use Bluetooth, including MP3 players,
mobile and peripheral devices and personal computers. The basic unit of a Bluetooth system is a piconet, which
consists of a master node and up to seven active slave nodes within a distance of 10 meters. Multiple piconets can
exist in the same (large) room and can even be connected via a bridge node that takes part in multiple piconets. An
interconnected collection of piconets is called a scatternet.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

21. Explain Full-duplex, Half-duplex and Simplex transmission technique.

Simplex: In simplex mode the communication is unidirectional like a one way street. Only one of the two devices
can transmit, the other can only receive.
Example: Keyboards, traditional monitors, Radios etc.

Half Duplex: In half duplex mode each station can transmit and receive but not at the same time. When one
device is sending the other can only receive and vice versa.
Example: Walky-Talky, CB (Citizen Band)

Full Duplex: In full duplex mode both station can transmit and receive data simultaneously.
Example: Telephone network.

22. Define cyclic redundancy check (CRC).


The cyclic redundancy check (CRC) is a technique used to detect errors in digital data. As a type of checksum,
the CRC produces a fixed-length data set based on the build of a file or larger data set. In terms of its use, CRC
is a hash function that detects accidental changes to raw computer data commonly used in digital
telecommunications networks and storage devices such as hard disk drives. In the cyclic redundancy check, a
fixed number of check bits, often called a checksum, are appended to the message that needs to be transmitted.
The data receivers receive the data, and inspect the check bits for any errors.

23. What is hamming code?


Hamming code is a set of error-correction codes that can be used to detect and correct the errors that can occur
when the data is moved or stored from the sender to the receiver. Redundant bits are extra binary bits that are
generated and added to the information-carrying bits of data transfer to ensure that no bits were lost during the
data transfer.
The number of redundant bits can be calculated using the following formula:

2r ≥ m + r + 1
where, r = redundant bit, m = data bit

24. What is Firewall?


A firewall is a division between a private network and an outer network, often the internet, that manages traffic
passing between the two networks. It’s implemented through either hardware or software. Firewalls allow, limit,
and block network traffic based on preconfigured rules in the hardware or software, analyzing data packets that
request entry to the network. In addition to limiting access to computers and networks, a firewall is also useful
for allowing remote access to a private network through secure authentication certificates and logins.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

25. What is Repeater?


Repeaters are network devices operating at physical layer of the OSI model that amplify or regenerate an incoming
signal before retransmitting it. They are incorporated in networks to expand its coverage area. They are also
known as signal boosters.

When an electrical signal is transmitted via a channel, it gets attenuated depending upon the nature of the channel
or the technology. This poses a limitation upon the length of the LAN or coverage area of cellular networks. This
problem is alleviated by installing repeaters at certain intervals. Repeaters amplifies the attenuated signal and then
retransmits it. Digital repeaters can even reconstruct signals distorted by transmission loss. So, repeaters are
popularly incorporated to connect between two LANs thus forming a large single LAN.

26. What is domain name system (DNS)?


The domain name system (DNS) is a naming database in which internet domain names are located and translated
into Internet Protocol (IP) addresses. The domain name system maps the name people use to locate a website to
the IP address that a computer uses to locate that website. For example, if someone types "example.com" into a
web browser, a server behind the scenes maps that name to the corresponding IP address. An IP address is similar
in structure to 203.0.113.72. DNS servers convert URLs and domain names into IP addresses that computers can
understand and use. They translate what a user types into a browser into something the machine can use to find a
webpage. This process of translation and lookup is called DNS resolution.

27. What is TELNET?


TELNET stands for TErminaL NETwork. It is a type of protocol that enables one computer to connect to local
computer. It is a used as a standard TCP/IP protocol for virtual terminal service which is given by ISO. Computer
which starts connection known as the local computer. Computer which is being connected to i.e. which accepts
the connection known as remote computer. When the connection is established between local and remote
computer. During telnet operation whatever that is being performed on the remote computer will be displayed by
local computer. Telnet operates on client/server principle. Local computer uses telnet client program and the
remote computers uses telnet server program.

28. What is MANNET?


MANNET Stands for "Mobile Ad Hoc Network." A MANET is a type of ad hoc network that can change
locations and configure itself on the fly. Because MANETS are mobile, they use wireless connections to connect
to various networks. This can be a standard Wi-Fi connection, or another medium, such as a cellular or satellite
transmission

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

29. What do you understand by unicast, multicast and broadcast?

Unicast Address: Each host or each interface of a router is assigned a unicast address. Unicasting means one-to-one
communication. A frame with a unicast address destination is destined only for one entity in the link.

Multicast Address: Link-layer protocols define multicast addresses. Multicasting means one-tomany
Communication but not all.

Broadcast Address: Link-layer protocols define a broadcast address. Broadcasting means oneto-all communication.
A frame with a destination broadcast address is sent to all entities in the link

30. What do you know about HUB, Repeater, Bridge, Switch, Router and gateway?

HUBS
Several networks need a central location to connect media segments together. These central locations are called as
hubs. The hub organizes the cables and transmits incoming signals to the other media segments.

The three types of hubs are:


i) Passive hub: It is a connector, which connects wires coming from the different branches. By using passive hub, each
computer can receive the signal which is sent from all other computers connected in the hub.
ii) Active Hub: It is a multiport repeater, which can regenerate the signal. It is used to create connections between two
or more stations in a physical star topology.
iii) Intelligent Hub: Intelligent hub contains a program of network management and intelligent path selection.

REPEATERS
A repeater receives the signal and it regenerates the signal in original bit pattern before the signal gets too weak or
corrupted. It is used to extend the physical distance of LAN. Repeater works on physical layer. A repeater has no
filtering capability. A repeater is implemented in computer networks to expand the coverage area of the network,
repropagate a weak or broken signal and or service remote nodes. Repeaters amplify the received/input signal to a
higher frequency domain so that it is reusable, scalable and available.

BRIDGES
Bridges operate in physical layer as well as data link layer. As a physical layer device, they regenerate the receive
signal. As a data link layer, the bridge checks the physical (MAC) address (of the source and the destination) contained
in the frame. The bridge has a filtering feature. It can check the destination address of a frame and decides, if the
frame should be forwarded or dropped. Bridges are used to connect two or LANs working on the same protocol.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

SWITCHES
A switch is a small hardware device which is used to join multiple computers together with one local area network
(LAN). A switch is a mechanism that allows us to interconnect links to form a large network. Switch is data link layer
device. A switch is a multi port bridge with a buffer. Switches are used to forward the packets based on MAC
addresses. It is operated in full duplex mode. Packet collision is minimum as it directly communicates between source
and destination. It does not broadcast the message as it works with limited bandwidth. A switch’s primary job is to
receive incoming packets on one of its links and to transmit them on some other link. A Switch is used to transfer the
data only to the device that has been addressed.

ROUTERS
A router is a three-layer device. It operates in the physical, data-link, and network layers. As a physical-layer device,
it regenerates the signal it receives. As a link-layer device, the router checks the physical addresses (source and
destination) contained in the packet. As a network-layer device, a router checks the network-layer addresses. A router
is a device like a switch that routes data packets based on their IP addresses. A router can connect networks. A router
connects the LANs and WANs on the internet. A router is an internetworking device. It connects independent networks
to form an internetwork. The key function of the router is to determine the shortest path to the destination. Router has
a routing table, which is used to make decision on selecting the route. The routing table is updated dynamically based
on which they make decisions on routing the data packets.

GATEWAY
A gateway is a device, which operates in all five layers of the internet or seven layers of OSI model. It is usually a
combination of hardware and software. Gateway connects two independent networks. Gateways are generally more
complex than switch or router. Gateways basically works as the messenger agents that take data from one system,
interpret it, and transfer it to another system. Gateways are also called protocol converters A gateway accepts a packet
formatted for one protocol and converts it to a packet formatted to another protocol before forwarding it. The gateway
must adjust the data rate, size and data format.

31. What do you understand by Multiplexing and Demultiplexing?


Whenever an entity accepts items from more than one source, this is referred to as multiplexing (many to one).
Whenever an entity delivers items to more than one source, this is referred to as demultiplexing (one to many). The
transport layer at the source performs multiplexing The transport layer at the destination performs demultiplexing.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

32. What do you mean by flow control and error control?

Flow Control: Flow Control is the process of managing the rate of data transmission between two nodes to prevent a
fast sender from overwhelming a slow receiver. It provides a mechanism for the receiver to control the transmission
speed, so that the receiving node is not overwhelmed with data from transmitting node.

Error Control: Error control at the transport layer is responsible for


• Detecting and discarding corrupted packets.
• Keeping track of lost and discarded packets and resending them.
• Recognizing duplicate packets and discarding them.
• Buffering out-of-order packets until the missing packets arrive.
Error Control involves Error Detection and Error Correction.

Congestion Control: Congestion in a network may occur if the load on the network (the number of packets sent to
the network) is greater than the capacity of the network (the number of packets a network can handle). Congestion
control refers to the mechanisms and techniques that control the congestion and keep the load below the capacity.
Congestion Control refers to techniques and mechanisms that can either prevent congestion, before it happens, or
remove congestion, after it has happened. Congestion control mechanisms are divided into two categories,
1. Open loop - prevent the congestion before it happens.
2. Closed loop - remove the congestion after it happens.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

33. From this IP address 192.168.10.2/28, Answer the following questions consider IPV4 address –

a) Subnet Mask
b) Network address
c) Broadcast address
d) First Network address
e) Last Network Address

Solution:

Subnet Mask

= 11111111.11111111.11111111.11110000

=255.255.255.240 (Ans – a)

We get change in 4th octet of subnet mask

4th octet of IP = 0 = 00000010

4th octet of subnet mask = 11110000

ANDing 4th octet of IP with subnet mask

we get 00000000 = 0,

So, Network address = 192.168.10.0 (Ans – b)

Here, CIDR = 28

So, making last (32 – 28) = 4 bits into 1 of network address

We get 00001111 = 15

So, broadcast address = 192.168.10.15 (Ans – c)

First address is the next immediate address of Network address

So, First address = 192.168.10.1 (Ans – d)

Last address is the prior immediate address of Broadcast address

So, Last address = 192.168.10.14 (Ans – e)

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

34. In the following IP address 172.20.0.0/27, find how many subnets and hosts per subnet?

Solution:
Here, given IP address = 172.20.0.0
=172.20.0.00000000
Subnet Mask = 11111111.11111111.11111111.11100000
=255.255.255.224
(Technique: 11100000 = (23 – 1)*25 = 7*32 = 224)

From 4th octet of subnet mask we get Network bit = 3 and host bit = 5
So, Number of subnet = 23 = 8 (Ans -1)
And hosts per subnet = 25 = 32
And, valid host per subnet = 32-2 = 30 (Ans -2)

35. A network address is given 172.18.10.0/23, divide this network address into 4 subnets and find every
subnet address, start address, subnet mask, broadcast address etc.

Solution:
As we should divide the given network address into 4 subnets, we have to find a fixed CIDR for this operation.
Here, total hosts = 2^(32-23) = 2^9 = 512
Now, 512/4 = 128
We can write 2^7 = 128
We see, every subnet block will have 128 hosts.
So, our network bit will be (32-7) = 25
So, our new CIDR or subnet prefix = /25

1st Subnet:
Subnet address = 172.18.10.0/25
Start address = 172.18.10.1
Subnet mask = 255.255.255.128 (as new CIDR = \25, and 2^7 = 128)
Broadcast address = 172.18.10.127

2nd Subnet:
Subnet address = 172.18.10.128/25
Start address = 172.18.10.129
Subnet mask = 255.255.255.128 (as new CIDR = \25, and 2^7 = 128)
Broadcast address = 172.18.10.255

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

3rd Subnet:
Subnet address = 172.18.11.0/25 (as 4th octet is filled up in previous subnet block, so 3rd octet is changed)
Start address = 172.18.11.1
Subnet mask = 255.255.255.128 (as new CIDR = \25, and 2^7 = 128)
Broadcast address = 172.18.11.127

4th Subnet:
Subnet address = 172.18.11.128/25
Start address = 172.18.11.129
Subnet mask = 255.255.255.128 (as new CIDR = \25, and 2^7 = 128)
Broadcast address = 172.18.11.255

36. Given IP address 211.17.180.0/24, Administrator wants to divide it into 32 subnets, so what will be the
subnet mask and how many hosts belongs to every subnet, what is the first and last address of 1st and
last subnet address?
Solution:
As we should divide the given network address into 32 subnets, we have to find a fixed CIDR for this operation.
Here, total hosts = 2^(32-24) = 2^8 = 256
Now, 256/32 = 8
We can write 2^3 = 8
We see, every subnet block will have 8 hosts.
So, our network bit will be (32-3) = 29
So, our new CIDR or subnet prefix = /29
So, subnet mask
255.255.255.11111000
=255.255.255.248 (Ans -1)

1st subnet:
Host number per subnet = 2^3 – 2 = 6 (Ans -2)
First address = 211.17.180.1 (Ans -3)
Last address = 211.17.180.6 (Ans -4)

Last subnet:
Host number per subnet = 2^3 – 2 = 6 (Ans -5)
First address = 211.17.249 (Ans -6)
Last address = 211.17.180.254 (Ans -7)
(As total host is 256, x.x.x.255 is reserved for broadcast in this case)

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

37. You have been asked to create a subnet mask for the 172.16.0.0 network. Your organization requires
900 subnets, with at least 50 hosts per subnet. What subnet mask should you use?
Solution:
Given network address is Class B, so 16 bit network address and 16 bit host address.
900 subnets need minimum 10 bits for 3rd and 4th octet. The rest 6 bits (4th octet) is enough for 50 hosts.
So, subnet mask = 255.255.11111111.11000000
= 255.255.255.192 (Ans.)

If you are not getting how these maths are solved then watch my following videos.

https://youtu.be/ae19qk4loWs

https://youtu.be/xpPgQIiWtiE

https://youtu.be/do3L6fCnI-U

https://youtu.be/ND6Tf-9qNrI

https://youtu.be/K-e5IeBwyX8

If you want to learn Maximum knowledge from Computer Network then visit my playlist

https://www.youtube.com/playlist?list=PLVA1KKAISfrTMXDWTwjLwG0aVf20A5T0M

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/858042971559671

Database

1. Why DBMS is a better choice than traditional file-based systems?


The absence of indexing in a traditional file-based system leaves us with the only option of scanning the full page and
hence making the access of content tedious and super slow. The other issue is redundancy and inconsistency as files
have many duplicate and redundant data and changing one of them makes all of them inconsistent. Accessing data is
harder in traditional file-based systems because data is unorganized in them.
Another issue is the lack of concurrency control, which leads to one operation locking the entire page, as compared to
DBMS where multiple operations can work on a single file simultaneously. Integrity check, data isolation, atomicity,
security, etc. are some other issues with traditional file-based systems for which DBMSs have provided some good
solutions.

2. Explain different languages present in DBMS.

DDL (Data Definition Language)


It contains commands which are required to define the database.
E.g., CREATE, ALTER, DROP, TRUNCATE, RENAME, etc.

DML (Data Manipulation Language):


It contains commands which are required to manipulate the data present in the database.
E.g., SELECT, UPDATE, INSERT, DELETE, etc.

DCL (Data Control Language)


It contains commands which are required to deal with the user permissions and controls of the database system.
E.g., GRANT and REVOKE.

3. Explain different types of relationships amongst tables in a DBMS.

Following are different types of relationship amongst tables in a DBMS system:

One to One Relationship: This type of relationship is applied when a particular row in table X is linked to a singular
row in table Y.

One to Many Relationships: This type of relationship is applied when a single row in table X is related to many rows
in table Y.

Many to Many Relationships: This type of relationship is applied when multiple rows in table X can be linked to
multiple rows in table Y.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/858042971559671

4. What is meant by ACID properties in DBMS?

ACID stands for Atomicity, Consistency, Isolation, and Durability in a DBMS these are those properties that ensure
a safe and secure way of sharing data among multiple users.
Atomicity: This property reflects the concept of either executing the whole query or executing nothing at all, which
implies that if an update occurs in a database, then that update should either be reflected in the whole database or
should not be reflected at all.
Consistency: This property ensures that the data remains consistent before and after a transaction in a database.
Isolation: This property ensures that each transaction is occurring independently of the others. This implies that the
state of an ongoing transaction doesn’t affect the state of another ongoing transaction.
Durability: This property ensures that the data is not lost in cases of a system failure or restart and is present in the
same state as it was before the system failure or restart.

5. Explain different levels of data abstraction in a DBMS.

The process of hiding irrelevant details from users is known as data abstraction. Data abstraction can be divided into
3 levels:

Physical Level: it is the lowest level and is managed by DBMS. This level consists of data storage descriptions and
the details of this level are typically hidden from system admins, developers, and users.

Conceptual or Logical level: it is the level on which developers and system admins work and it determines what
data is stored in the database and what is the relationship between the data points.

External or View level: it is the level that describes only part of the database and hides the details of the table schema
and its physical storage from the users. The result of a query is an example of View level data abstraction. A view is
a virtual table created by selecting fields from one or more tables present in the database.

6. Explain different types of DBMS.

The different types of DBMS are as follows:

Relational DBMS (RDBMS): This type of DBMS, uses a structure which allows the users to access data in relation
to another piece of data in a database. In this type of DBMS, data is stored in the form of tables.

Hierarchical DBMS: As the name suggests, this type of DBMS has a structure similar to that of a tree, wherein the
nodes represent records and the branches of the tree represent fields.

Network DBMS: This type of DBMS supports many-to-many relations wherein multiple member records can be
linked.

Object-oriented DBMS: Uses small individual software called object to store pieces of data and the instructions for
the actions to be done with the data.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/858042971559671

7. What is meant by an entity-relationship (E-R) model? Explain the terms Entity, Entity Type, and
Entity Set in DBMS.

An entity-relationship model is a diagrammatic approach to a database design where real-world objects are represented
as entities and relationships between them are mentioned.

Entity: An entity is defined as a real-world object having attributes that represent characteristics of that particular
object. For example, a student, an employee, or a teacher represents an entity.

Entity Type: An entity type is defined as a collection of entities that have the same attributes. One or more related
tables in a database represent an entity type. Entity type or attributes can be understood as a characteristic which
uniquely identifies the entity. For example, a student represents an entity that has attributes such as student_id,
student_name, etc.

Entity Set: An entity set can be defined as a set of all the entities present in a specific entity type in a database. For
example, a set of all the students, employees, teachers, etc. represent an entity set.

8. What do you understand by functional dependency and transitive dependency in DBMS?

Functional Dependency: A functional dependency is a constraint that is used in describing the relationship among
different attributes in a relation.

Example: Consider a relation “A1” having attributes X and Y. The functional dependency among these two attributes
will be X -> Y, this implies that Y is functionally dependent on X.

Transitive Dependency: A transitive dependency is a constraint that can only occur in a relation of three or more
attributes.

Example: Consider a relation “A1” having attributes X, Y and Z. Now, X->Z is said to hold transitive dependency,
only if the following functional dependencies holds true:

X -> Y
Y doesn’t ->X
Y -> Z

9. Discuss the basic concept of indexing.


A data structure that improves the speed of data retrieval operations on a database table at the cost of slower writes
and the use of more storage space.

An index for a file in a database system works in much the same way as the index in this textbook. If we want to learn
about a particular topic, we can search for the topic in the index at the back of the book, find the pages where it occurs,
and then read the pages to find the information we are looking for. The words in the index are in sorted order, making
it easy to find the word we are looking for. Moreover, the index is much smaller than the book, further reducing the
effort needed to find the words we are looking for.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/858042971559671

10. What is meant by normalization? Explain different types of Normalization forms in a DBMS.

Normalization is a process of reducing redundancy by organizing the data into multiple tables. Normalization leads
to better usage of disk spaces and makes it easier to maintain the integrity of the database.

Following are the major normalization forms in a DBMS:

1NF: It is known as the first normal form and is the simplest type of normalization that you can implement in a
database. A table to be in its first normal form should satisfy the following conditions:

Every column must have a single value and should be atomic.

Duplicate columns from the same table should be removed.

Separate tables should be created for each group of related data and each row should be identified with a unique
column.

2NF: It is known as the second normal form. A table to be in its second normal form should satisfy the following
conditions:

The table should be in its 1NF i.e. satisfy all the conditions of 1NF.

Every non-prime attribute of the table should be fully functionally dependent on the primary key i.e. every non-key
attribute should be dependent on the primary key in such a way that if any key element is deleted then even the
non_key element will be saved in the database.

3NF: It is known as the third normal form. A table to be in its second normal form should satisfy the following
conditions:

The table should be in its 2NF i.e. satisfy all the conditions of 2NF.

There is no transitive functional dependency of one attribute on any attribute in the same table.

BCNF: BCNF stands for Boyce-Codd Normal Form and is an advanced form of 3NF. It is also referred to as 3.5NF
for the same reason. A table to be in its BCNF normal form should satisfy the following conditions:

The table should be in its 3NF i.e. satisfy all the conditions of 3NF.

For every functional dependency of any attribute A on B

(A->B), A should be the super key of the table. It simply implies that A can’t be a non-prime attribute if B is a prime
attribute

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/858042971559671

11. Explain different types of keys in a database.

Candidate Key: The candidate key represents a set of properties that can uniquely identify a table. Each table may
have multiple candidate keys. One key amongst all candidate keys can be chosen as a primary key.

Super Key: The super key defines a set of attributes that can uniquely identify a tuple. Candidate key and primary
key are subsets of the super key, in other words, the super key is their superset.

Primary Key: The primary key defines a set of attributes that are used to uniquely identify every tuple

Unique Key: The unique key is very similar to the primary key except that primary keys don’t allow NULL values
in the column but unique keys allow them. So essentially unique keys are primary keys with NULL values.

Alternate Key: All the candidate keys which are not chosen as primary keys are considered as alternate Keys.

Foreign Key: The foreign key defines an attribute that can only take the values present in one table common to the
attribute present in another table.

Composite Key: A composite key refers to a combination of two or more columns that can uniquely identify each
tuple in a table.

12. Explain multilevel indexing with example. When is it preferable to use a multilevel index rather than
a single level index?
Multi-Level Indices

▪ If primary index does not fit in memory, access becomes expensive.

▪ Solution: treat primary index kept on disk as a sequential file and construct a sparse index on it.

- Outer index – a sparse index of primary index

- Inner index – the primary index file

▪ If even outer index is too large to fit in main memory, yet another level of index can be created, and so on.

▪ Indices at all levels must be updated on insertion or deletion from the file.

Multi-Level Indices: An Example

▪ Consider 100,000 records, 10 per block, at one index record per block, that's 10,000 index records. Even if
we can fit 100 index records per block, this is 100 blocks. If index is too large to be kept in main memory, a
search results in several disk reads.

▪ For very large files, additional levels of indexing may be required.

▪ Indices must be updated at all levels when insertions or deletions require it.

▪ Frequently, each level of index corresponds to a unit of physical storage.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/858042971559671

13. Construct an E-R diagram for a car-insurance company whose customers own one or more cars
each. Each car has associated with it zero to any number of recorded accidents.

https://www.ques10.com/p/3847/construct-an-er-diagram-for-car-insurance-company-/?

14. Create a table called STUDENT with STUD_ID as primary key and STUD_NAME that can't accept
null values and a DEPT_ID column as a foreign key to DEPT_ID in DEPT table. (BUET)

https://www.mycompiler.io/view/0rsB2iL

Click the link where sql statements given and you will get the idea how answer these type of question

15. Distinguish between primary and secondary indexing.


➢ A sequential scan in primary index order is efficient because records in the file are stored physically in the same
order as the index order.

➢ Secondary indices improve the performance of queries that use keys other than the search key of the primary
index. However, they impose a significant overhead on modification of the database. The designer of a database
decides which secondary indices are desirable on the basis of an estimate of the relative frequency of queries and
modifications.

➢ The primary index is on the field which specifies the sequential order of the data file.

➢ There can be only one primary index while there can be many secondary indices.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/858042971559671

16. Discuss distributed deadlock detection technique with appropriate figure.


Distributed deadlock detection and recovery Method

Deadlock detection and recovery is the most popular and most suitable technique for deadlock management in a
database environment.

In deadlock detection and recovery method, first it is checked whether any deadlock has occurred in the system. After
detection of a deadlock situation in the system, one of the involved transactions is chosen as the victim transaction
and is aborted to resolve the deadlock situation. Deadlock situations are detected by explicitly constructing a wait-for
graph and searching it for cycles. A cycle in the wait-for graph indicates that a deadlock has occurred, and one
transaction in the cycle is chosen as the victim, which is aborted and restarted. To minimize the cost of restarting, the
victim selection is usually based on the number of data items used by each transaction in the cycle.

The principal difficulty in implementing deadlock detection in a distributed database environment is constructing the
GWFG efficiently. In a distributed DBMS, a LWFG for each local DBMS can be drawn easily; however, these LWFGs
are not sufficient to represent all deadlock situations in the distributed system. For example, consider that there are
three different sites in a distributed system, and each site has constructed a LWFG as shown in figure. The LWFG for
each site is constructed in the usual manner using local transactions and data items stored at that particular site. A
cycle in a LWFG indicates that a deadlock has occurred locally. The LWFGs in Fig. illustrate that no deadlock has
occurred locally in the three different sites, as there are no cycles in the LWFGs, but this does not guarantee that no
deadlock has occurred globally. To detect a deadlock situation in the distributed system, it is necessary to construct a
GWFG from these different LWFGs and to search it for cycles.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/858042971559671

17. What do you mean by RAID? Discuss at least three RAID levels in brief

Redundant Arrays of Independent Disks (RAID)

RAID or Redundant Array of Independent Disks, is a technology to connect multiple secondary storage devices and
use them as a single storage media. RAID consists of an array of disks in which multiple disks are connected together
to achieve different goals. RAID levels define the use of disk arrays.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/858042971559671

18. Explain the following terms: Transaction Failure, System Crash, Disk Failure

Transaction Failure. There are two types of errors that may cause a transaction to fail:

Logical error. The transaction can no longer continue with its normal execution because of some internal condition,
such as bad input, data not found, overflow, or resource limit exceeded.

System error. The system has entered an undesirable state (for example, deadlock) as a result of which a transaction
cannot continue with its normal execution. The transaction, however, can be re-executed at a later time.

System Crash. There is a hardware malfunction, or a bug in the database software or the operating system, that
causes the loss of the content of volatile storage, and brings transaction processing to a halt. The content of nonvolatile
storage remains intact, and is not corrupted.

Disk Failure. A disk block loses its content as a result of either a head crash or failure during a data transfer
operation. Copies of the data on other disks, or archival backups on tertiary media, such as tapes, are used to recover
from the failure.

19. Define the term: Partial FD and Transitive dependency.


Partial Dependencies

– Given a relation r(R), the sets of attributes X and Y ( X,Y R), and X → Y, we will say that attribute Y is fully
dependent on attribute X if only if there is no proper subset W of X such that W → Y.
– If there is a proper subset W of X such that W → Y then attribute Y is said to be partially dependent on attribute
X.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/858042971559671

20. What are different JOINS used in SQL?

INNER JOIN: It is also known as SIMPLE JOIN which returns all rows from BOTH tables when it has at least one
matching column.

Syntax:

SELECT column_name(s)
FROM table_name1&nbsp;
INNER JOIN table_name2
ON column_name1=column_name2;

LEFT JOIN (LEFT OUTER JOIN): This join returns all rows from the LEFT table and its matched rows from a
RIGHT table.

Syntax:

SELECT column_name(s)
FROM table_name1
LEFT JOIN table_name2
ON column_name1=column_name2;

RIGHT JOIN (RIGHT OUTER JOIN): This joins returns all rows from the RIGHT table and its matched rows
from the LEFT table.

Syntax:

SELECT column_name(s)
FROM table_name1
RIGHT JOIN table_name2
ON column_name1=column_name2;

FULL JOIN (FULL OUTER JOIN): This joins returns all results when there is a match either in the RIGHT table
or in the LEFT table.

Syntax:

SELECT column_name(s)
FROM table_name1
FULL OUTER JOIN table_name2
ON column_name1=column_name2;

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/858042971559671

21. What are triggers?

Triggers in SQL is kind of stored procedures used to create a response to a specific action
performed on the table such as INSERT, UPDATE or DELETE. You can invoke triggers
explicitly on the table in the database. Action and Event are two main components of SQL
triggers. When certain actions are performed, the event occurs in response to that action.

Syntax:

CREATE TRIGGER name {BEFORE|AFTER} (event [OR..]}


ON table_name [FOR [EACH] {ROW|STATEMENT}]
EXECUTE PROCEDURE functionname {arguments}

22. What is View in SQL? How we can update the view?

A View can be defined as a virtual table that contains rows and columns with fields from one or more tables.

Syntax:

CREATE VIEW view_name AS


SELECT column_name(s)
FROM table_name
WHERE condition

SQL CREATE and REPLACE can be used for updating the view.

Syntax:

CREATE OR REPLACE VIEW view_name AS


SELECT column_name(s)
FROM table_name
WHERE condition

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/858042971559671

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/858042971559671

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/858042971559671

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/858042971559671

Students are highly advised to learn SQL related


problems. Almost every season it has seen that SQL
related problems were there in the question paper.
[Specially Student, Teacher, Employee related SQL]

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/858042971559671

Some Examples:

• Write a query to find all the employees whose salary is between 50000 to 100000.

SELECT * FROM EmployeePosition WHERE Salary BETWEEN '50000' AND '100000';

• Write a query to find the names of employees that begin with ‘S’

SELECT * FROM EmployeeInfo WHERE EmpFname LIKE 'S%';

• Write an SQL query to find the maximum, minimum, and average salary of the employees.

SELECT Max(Salary),
Min(Salary),
AVG(Salary)
FROM EmployeeSalary;

• Write an SQL query to find the employee id whose salary lies in the range of 9000 and 15000.

SELECT EmpId, Salary


FROM EmployeeSalary
WHERE Salary BETWEEN 9000 AND 15000;

• Write an SQL query to fetch common records between two tables.

SELECT * FROM EmployeeSalary


INTERSECT
SELECT * FROM ManagerSalary;

• Write an SQL query to fetch records that are present in one table but not in another table.

SELECT EmployeeSalary.*
FROM EmployeeSalary
LEFT JOIN
ManagerSalary USING (EmpId)
WHERE ManagerSalary.EmpId IS NULL;

• Write an SQL query to fetch all the Employees details from EmployeeDetails table who joined in
the Year 2020.

SELECT * FROM EmployeeDetails


WHERE DateOfJoining BETWEEN '2020/01/01'
AND '2020/12/31';

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

Microprocessor and Computer Architecture

1. What are the differences between microprocessor and micro-controller?


https://www.javatpoint.com/microprocessor-vs-microcontroller

Microprocessor Microcontroller
Microprocessor acts as a heart of computer system. Microcontroller acts as a heart of embedded system.
It is a processor in which memory and I/O output It is a controlling device in which memory and I/O
component is connected externally. output component is present internally.
Since memory and I/O output is to be connected Since on chip memory and I/O output component is
externally. Therefore, the circuit is more complex. available. Therefore, the circuit is less complex.
It cannot be used in compact system. Therefore, It can be used in compact system. Therefore,
microprocessor is less efficient. microcontroller is more efficient.
Microprocessor has a smaller number of registers. Microcontroller has a greater number of registers.
Therefore, most of the operations are memory based. Therefore, a program is easier to write.
A microprocessor having a zero status flag. A microcontroller has no zero flag.
It is mainly used in personal computers. It is mainly used in washing machines, air conditioners
etc.

2. What are the differences between RISC and CISC?


https://www.geeksforgeeks.org/computer-organization-risc-and-cisc/

RISC CISC
Focus on software Focus on hardware
Uses only Hardwired control unit Uses both hardwired and microprogrammed control unit
Transistors are used for more registers Transistors are used for storing complex Instructions
Fixed sized instructions Variable sized instructions
Can perform only Register to Register Arithmetic Can perform REG to REG or REG to MEM or MEM to
operations MEM
Requires more number of registers Requires less number of registers
Code size is large Code size is small
An instruction executed in a single clock cycle Instruction takes more than one clock cycle
An instruction fit in one word Instructions are larger than the size of one word

3. What is flag register of 8086/8085 microprocessors?

https://www.tutorialspoint.com/flag-register-of-8086-microprocessor

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

4. What are the differences between paging and segmentation?


https://www.tutorialspoint.com/difference-between-paging-and-segmentation

Key Paging Segmentation

Memory Size In Paging, a process address In Segmentation, a process address


space is broken into fixed sized space is broken in varying sized
blocks called pages. blocks called sections.

Accountability Operating System divides the Compiler is responsible to calculate


memory into pages. the segment size, the virtual address
and actual address.
Size Page size is determined by Section size is determined by the
available memory. user.
Speed Paging technique is faster in Segmentation is slower than paging.
terms of memory access.
Fragmentation Paging can cause internal Segmentation can cause external
fragmentation as some pages may fragmentation as some memory block
go underutilized. may not be used at all.
Logical Address During paging, a logical address During segmentation, a logical
is divided into page number and address is divided into section
page offset. number and section offset.
Table During paging, a logical address During segmentation, a logical
is divided into page number and address is divided into section
page offset. number and section offset.
Data Storage Page table stores the page data. Segmentation table stores the
segmentation data.

5. What is Program counter?

Program counter holds the address of either the first byte of the next instruction to be fetched for execution or the
address of the next byte of a multi byte instruction, which has not been completely fetched. In both the cases it gets
incremented automatically one by one as the instruction bytes get fetched. Also Program register keeps the address
of the next instruction.

6. What is Stack Pointer?


Stack pointer is a special purpose 16-bit register in the Microprocessor, which holds the address of the top of the
stack.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

7. What are the flags in 8086?


Carry flag, Parity flag, Auxiliary carry flag, Zero flag, Overflow flag, Trace flag, Interrupt flag, Direction flag, and
Sign flag.

8. What are the various registers in 8085?


Accumulator register, Temporary register, Instruction register, Stack Pointer, Program Counter

An arithmetic logic unit (ALU) is a digital circuit used to perform arithmetic and logic operations. It represents the
fundamental building block of the central processing unit (CPU) of a computer. The ALU performs simple addition,
subtraction, multiplication, division, and logic operations, such as OR and AND. The memory stores the program’s
instructions and data.

10. What is page fault?

A page fault occurs when a program attempts to access a block of memory that is not stored in the physical memory,
or RAM. The fault notifies the operating system that it must locate the data in virtual memory, then transfer it from
the storage device, such as an HDD or SSD, to the system RAM.

11. What are the features of 8086 microprocessor?


Features of 8086 Microprocessor:
• The 8086 is a 16-bit microprocessor. The term “16-bit” means that its arithmetic logic unit, internal
registers and most of its instructions are designed to work with 16-bit binary words.
• The 8086 has a 16-bit data bus, so it can read data from or write data to memory and ports either 16 bits or
8 bits at a time. The 8088, however, has an 8-bit data bus, soil can only read data from or write data to
memory and ports 8 bits at a time.
• The 8086 has a 20-bit address bus, so it can directly access 220 or 10,48,576 (1Mb) memory locations.
Each of the 10, 48, 576 memory locations is byte Therefore, a sixteen-bit words are stored in two
consecutive memory locations. The 8088 also has a 20-bit address bus, so it can also address 220 or 10, 48,
576 memory locations.
• The Features of 8086 Microprocessor can generate 16-bit I/O address, hence it can access 216 = 65536 I/O
ports.
• The 8086 provides fourteen 16-bit registers.
• The 8086 has multiplexed address and data bus which reduces the number of pins needed, but does slow
down the transfer of data (drawback).
• The 8086 requires one phase clock with a 33% duty cycle to provide optimized internal timing.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

12. What are the features of 8085 microprocessor?


Features of 8085 Microprocessor:

• It is an 8-bit microprocessor i.e. it can accept, process, or provide 8-bit data simultaneously.

• It operates on a single +5V power supply connected at Vcc; power supply ground is connected to Vss.

• It operates on clock cycle with 50% duty cycle.

• It has on chip clock generator. This internal clock generator requires tuned circuit like LC, RC or crystal. The

internal clock generator divides oscillator frequency by 2 and generates clock signal, which can be used for

synchronizing external devices.

• It can operate with a 3 MHz clock frequency. The 8085A-2 version can operate at the maximum frequency

of 5 MHz.

• It has 16 address lines, hence it can access (216) 64 Kbytes of memory.

• It provides 8 bit I/O addresses to access (28 ) 256 I/O ports.

• In 8085, the lower 8-bit address bus (A0 – A7) and data bus (D0 – D7) are Multiplexed to reduce number

of external pins. But due to this, external hardware (latch) is required to separate address lines and data

lines.

• It has 8-bit accumulator, flag register, instruction register, six 8-bit general purpose registers (B, C, D, E, H

and L) and two 16-bit registers.

• It provides five hardware interrupts : TRAP, RST 7.5, RST 6.5, RST 5.5 and INTR.

13. What are the functions of memory management Unit?

A computer’s memory management unit (MMU) is the physical hardware that handles its virtual memory and caching
operations. The MMU is usually located within the computer’s central processing unit (CPU), but sometimes operates
in a separate integrated chip (IC). All data request inputs are sent to the MMU, which in turn determines whether the
data needs to be retrieved from RAM or ROM storage. A memory management unit is also known as a paged memory
management unit.

The memory management unit performs three major functions:


✓ Hardware memory management
✓ Operating system (OS) memory management
✓ Application memory management

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

14. What are the differences between hardware and software interrupt?

Hardware Interrupt Software Interrupt


Hardware interrupt is an interrupt generated Software interrupt is the interrupt that is generated by
from an external device or hardware. any internal system of the computer.

It do not increment the program counter. It increment the program counter.

Hardware interrupt can be invoked with some Software interrupt can be invoked with the help of
external device such as request to start an I/O INT instruction.
or occurrence of a hardware failure.

It has lowest priority than software interrupts It has highest priority among all interrupts.

Hardware interrupt is triggered by external Software interrupt is triggered by software and


hardware and is considered one of the ways to considered one of the ways to communicate with
communicate with the outside peripherals, kernel or to trigger system calls, especially during
hardware. error or exception handling.

It is an asynchronous event. It is synchronous event.


Hardware interrupts can be classified into two Software interrupts can be classified into two types
types they are: 1. Maskable Interrupt. 2. Non they are: 1. Normal Interrupts. 2. Exception
Maskable Interrupt.

Keystroke depressions and mouse movements All system calls are examples of software interrupts
are examples of hardware interrupt.

15. Explain different type of bus.

A bus is a high-speed internal connection. Buses are used to send control signals and data between the processor and
other components.

Three types of bus are used.

• Address bus - carries memory addresses from the processor to other components such as primary storage
and input/output devices. The address bus is unidirectional.
• Data bus - carries the data between the processor and other components. The data bus is bidirectional.
• Control bus - carries control signals from the processor to other components. The control bus also carries
the clock's pulses. The control bus is unidirectional.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

16. What are the differences between microprocessor and CPU?

CPU: The CPU has a control unit, a logic and arithmetic unit and registers, plus a small bit of memory called cache.
The logic unit processes instructions one cycle at a time. It performs these instructions based on the computer program
that it is running. In that sense, the CPU performs individual instructions; and when combined to perform a task, this
is a computer program.

The arithmetic unit does math. If the computer program will seek out a mathematical computation, the logic unit sends
that instruction to the arithmetic unit to perform the task. Upon completion of the operation, the results get placed into
CPU cache or back into the logic unit for further operations. The control unit controls how and in what order the
instructions will be processed.

One final note on a different kind of processor, the vector processor, or array processor. This is a CPU that operates
on an instruction set containing one-dimensional arrays of data called vectors. In contrast to a processor known as a
scalar processor whose instructions operate on single data items. Today, most CPUs are scalar.

Microprocessor: The microprocessor is made of millions of transistors. These are tiny electronic devices that carry
an electric charge. They have an on and off switch (or open and close gate) which steers the current through a particular
path to produce a desired result.

Microprocessors have traditionally held the CPU. The circuitry of the both devices becomes entwined producing a
seamless operation. The microprocessor receives electrical signals from memory, external and internal hard drives,
from network cards, from graphics and video devices and from other input devices like a mouse or keyboard.

However, not all electrical currents end up in the CPU. Some signals go to specialized chips that have replaced the
CPU. The chips reside on their own microprocessors and process their own results. Nevertheless, the CPU acts as the
coordinator where all processed signals, even from different chips, are computed. These are the math operations (on
the CPU), or the end results that are displayed, like the network or video or audio operations. So even if there are other
performance chips on microprocessors, the result will be processed on the CPU.

The microprocessor is the holding circuitry that connects to the motherboard. The motherboard contains all the
different microprocessors, but they work in unison to produce what is known as a computer.

17. Explain the function of BIU and EU in 8086?

BIU stands for bus interface unit and EU stands for execution unit. In 8086 microprocessor BIU fetches the instructions
and places in the queue. The EU executes the fetched instruction and places the result in the registers.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

18. What are the multipurpose registers in 8086 microprocessors?

8086 has four multipurpose registers.

AX (Accumulator Register), BX (Base Register), CX (Count Register), DX (Data Register)

19. What are the advantages of memory segmentation of 8086 microprocessor?

Segmented memory allowed a bigger memory model than would otherwise be possible with a 16bit processor. In
effect, the physical address is found by shifting the segment by four and adding the 16-bit address. This gives a 20-bit
address space. If you know that your data, code, and stack are each going to fit into 64 kilobytes, then it is possible to
set up the segment registers and leave them alone, relying on the pointer registers to access memory with 16 bit values
and no explicit references to the segment registers.

20. Explain the use of Code Segment CS and data segment DS register in 8086 microprocessors?

Code segment (CS) is a 16-bit register containing address of 64 KB segment with processor instructions. The processor
uses CS segment for all accesses to instructions referenced by instruction pointer (IP) register. CS register cannot be
changed directly. The CS register is automatically updated during far jump, far call and far return instructions. Data
segment (DS) is a 16-bit register containing address of 64KB segment with program data. By default, the processor
assumes that all data referenced by general registers (AX, BX, CX, DX) and index register (SI, DI) is located in the
data segment. DS register can be changed directly using POP and LDS instructions.

21. What are index register and segment register?

A segment register is a register that contains the base address, or something related to the base address, of a region of
memory. In the 8086/8088, the four segment registers are multiplied by 16 and added to the effective address to form
the physical address.

An index register, on the other hand, is a register that contains an address that is added to another address to form the
effective address. In the 8086/8088, four address components are involved; 1.) the displacement contained within the
instruction, often called the offset, 2.) a base address specified by the r/m field, often the BP or BX register, 3.) an
index address specified by the r/m field, often the SI or DI register, and 4.) the segment address specified by context
or by a segment override prefix, often the CS, DS, SS, or ES register.

22. What is the maximum memory size that can be addressed by 8086?

In 8086, an memory location is addressed by 20 bit address and the address bus is 20 bit address and the address bus
is 20 bits. So it can address up to one mega byte (2^20) of memory space.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

23. What is the use of the extra segment in 8086 processor?

Extra segment is a 16-bit register containing address of 64KB segment, usually with program data. By default, the
processor assumes that the DI register points to the ES segment in string manipulation instructions. ES register can be
changed directly using POP and LES instructions. It is possible to change default segments used by general and index
registers by prefixing instructions with a CS, SS, DS or ES prefix.

24. Discuss the function of instruction queue in 8086?

In 8086, a 6-byte instruction queue is presented at the Bus Interface Unit (BIU). It is used to prefetch and store at the
maximum of 6 bytes of instruction code from the memory. Due to this, overlapping instruction fetch with instruction
execution increases the processing speed.

25. List the various addressing modes present in 8086?

• Register addressing modes • Based Indexed addressing modes


• Immediate addressing mode • String addressing modes
• Direct addressing modes • Direct addressing mode
• Register indirect addressing modes • Indirect addressing mode
• Based addressing modes • Relative addressing mode
• Indexed addressing modes • Implied addressing mode

26. What is the types of segment registers in 8086?

There are 4 segment registers present in 8086.

1. Code Segment (CS ) register - The code segment register gives the address of the current code segment. ie. It will
points out where the instructions, to be executed, are stored in the memory.

2. Data Segment (DS ) register - The data segment register points out where the operands are stored in the memory.

3. Stack Segment (SS ) register - The stack segment registers points out the address of the current stack, which is used
to store the temporary results.

4. Extra Segment (ES ) register - If the amount of data used is more the Extra segment register points out where the
large amount of data is stored in the memory.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

Operating System

1. What are the types of Operating System (OS)?

Types of Operating System (OS):

Batch OS – A set of similar jobs are stored in the main memory for execution. A job gets assigned to the CPU, only
when the execution of the previous job completes.

Multiprogramming OS – The main memory consists of jobs waiting for CPU time. The OS selects one of the
processes and assigns it to the CPU. Whenever the executing process needs to wait for any other operation (like
I/O), the OS selects another process from the job queue and assigns it to the CPU. This way, the CPU is never kept
idle and the user gets the flavor of getting multiple tasks done at once.

Multitasking OS – Multitasking OS combines the benefits of Multiprogramming OS and CPU scheduling to


perform quick switches between jobs. The switch is so quick that the user can interact with each program as it runs

Time Sharing OS – Time-sharing systems require interaction with the user to instruct the OS to perform various
tasks. The OS responds with an output. The instructions are usually given through an input device like the keyboard.

Real Time OS – Real-Time OS are usually built for dedicated systems to accomplish a specific set of tasks within
deadlines.

2. Discuss various CPU Scheduling algorithms.


First Come First Serve (FCFS) :Simplest scheduling algorithm that schedules according to arrival times
of processes.
Shortest Job First (SJF): Process which have the shortest burst time are scheduled first.
Shortest Remaining Time First (SRTF): It is preemptive mode of SJF algorithm in which jobs are
scheduled according to the shortest remaining time.
Round Robin (RR) Scheduling: Each process is assigned a fixed time, in cyclic way.
Priority Based scheduling (Non-Preemptive): In this scheduling, processes are scheduled according to
their priorities, i.e., highest priority process is schedule first. If priorities of two processes match, then
scheduling is according to the arrival time.
3. What are the functions of operating system?
An Operating System acts as a communication bridge (interface) between the user and computer hardware. The
purpose of an operating system is to provide a platform on which a user can execute programs in a convenient and
efficient manner. The main task an operating system carries out is the allocation of resources and services, such as the
allocation of memory, devices, processors, and information. The operating system also includes programs to manage
these resources, such as a traffic controller, a scheduler, memory management module, I/O programs, and a file system.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

4. What is system call in OS?

In computing, a system call is the programmatic way in which a computer program requests a service from the
kernel of the operating system it is executed on. A system call is a way for programs to interact with the operating
system. A computer program makes a system call when it makes a request to the operating system’s kernel.
System call provides the services of the operating system to the user programs via Application Program Interface
(API). It provides an interface between a process and operating system to allow user-level processes to request
services of the operating system. System calls are the only entry points into the kernel system. All programs
needing resources must use system calls.

5. What is Virtual Memory? How is it implemented?

Virtual Memory is a storage allocation scheme in which secondary memory can be addressed as though it were part
of the main memory. The addresses a program may use to reference memory are distinguished from the addresses the
memory system uses to identify physical storage sites, and program-generated addresses are translated automatically
to the corresponding machine addresses.

The size of virtual storage is limited by the addressing scheme of the computer system and the amount of secondary
memory is available not by the actual number of the main storage locations.

It is a technique that is implemented using both hardware and software. It maps memory addresses used by a program,
called virtual addresses, into physical addresses in computer memory.

• All memory references within a process are logical addresses that are dynamically translated into physical
addresses at run time. This means that a process can be swapped in and out of the main memory such that it
occupies different places in the main memory at different times during the course of execution.
• A process may be broken into a number of pieces and these pieces need not be continuously located in the
main memory during execution. The combination of dynamic run-time address translation and use of page
or segment table permits this.

If these characteristics are present then, it is not necessary that all the pages or segments are present in the main
memory during execution. This means that the required pages need to be loaded into memory whenever required.
Virtual memory is implemented using Demand Paging or Demand Segmentation.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

6. What is Deadlock? What are deadlock conditions?


Deadlock is a situation where two or more processes are waiting for each other. For example, let us assume, we have
two processes P1 and P2. Now, process P1 is holding the resource R1 and is waiting for the resource R2. At the same
time, the process P2 is having the resource R2 and is waiting for the resource R1. So, the process P1 is waiting for
process P2 to release its resource and at the same time, the process P2 is waiting for process P1 to release its resource.
And no one is releasing any resource. So, both are waiting for each other to release the resource. This leads to infinite
waiting and no work is done here. This is called Deadlock. There are four different conditions that result in Deadlock.
These four conditions are also known as Coffman conditions and these conditions are not mutually exclusive. Let's
look at them one by one.

Mutual Exclusion: A resource can be held by only one process at a time. In other words, if a process P1 is using
some resource R at a particular instant of time, then some other process P2 can't hold or use the same resource R at
that particular instant of time. The process P2 can make a request for that resource R but it can't use that resource
simultaneously with process P1.

Hold and Wait: A process can hold a number of resources at a time and at the same time, it can request for other
resources that are being held by some other process. For example, a process P1 can hold two resources R1 and R2 and
at the same time, it can request some resource R3 that is currently held by process P2.

No preemption: A resource can't be preempted from the process by another process, forcefully. For example, if a
process P1 is using some resource R, then some other process P2 can't forcefully take that resource. If it is so, then
what's the need for various scheduling algorithm. The process P2 can request for the resource R and can wait for that
resource to be freed by the process P1.

Circular Wait: Circular wait is a condition when the first process is waiting for the resource held by the second
process, the second process is waiting for the resource held by the third process, and so on. At last, the last process is
waiting for the resource held by the first process. So, every process is waiting for each other to release the resource
and no one is releasing their own resource. Everyone is waiting here for getting the resource. This is called a circular
wait.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

7. What do you understand by avoidance of deadlock and resolve of deadlock?

Deadlock Prevention:
Deadlock prevention means to block at least one of the four conditions required for deadlock to occur. If we are able
to block any one of them then deadlock can be prevented.

Spooling and non-blocking synchronization algorithms are used to prevent the above conditions. In deadlock
prevention all the requests are granted in a finite amount of time.

Deadlock Avoidance:
In Deadlock avoidance we have to anticipate deadlock before it really occurs and ensure that the system does not go
in unsafe state. It is possible to avoid deadlock if resources are allocated carefully. For deadlock avoidance we use
Banker’s and Safety algorithm for resource allocation purpose. In deadlock avoidance the maximum number of
resources of each type that will be needed are stated at the beginning of the process.

8. What is Virtual Memory? How is it implemented?

Virtual Memory is a storage allocation scheme in which secondary memory can be addressed as though it were part
of the main memory. The addresses a program may use to reference memory are distinguished from the addresses the
memory system uses to identify physical storage sites, and program-generated addresses are translated automatically
to the corresponding machine addresses.

The size of virtual storage is limited by the addressing scheme of the computer system and the amount of secondary
memory is available not by the actual number of the main storage locations.

It is a technique that is implemented using both hardware and software. It maps memory addresses used by a program,
called virtual addresses, into physical addresses in computer memory.

• All memory references within a process are logical addresses that are dynamically translated into physical
addresses at run time. This means that a process can be swapped in and out of the main memory such that it
occupies different places in the main memory at different times during the course of execution.
• A process may be broken into a number of pieces and these pieces need not be continuously located in the
main memory during execution. The combination of dynamic run-time address translation and use of page
or segment table permits this.

If these characteristics are present then, it is not necessary that all the pages or segments are present in the main
memory during execution. This means that the required pages need to be loaded into memory whenever required.
Virtual memory is implemented using Demand Paging or Demand Segmentation.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

9. Calculate the size of memory if its address consists of 22 bits and the memory is 2-byte
addressable.

https://www.gatevidyalay.com/paging-formulas-practice-problems/

10. Calculate the number of bits required in the address for memory having size of 16 GB. Assume
the memory is 4-byte addressable.
https://www.gatevidyalay.com/paging-formulas-practice-problems/

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

11. In a virtual memory system, size of virtual address is 32-bit, size of physical address is 30-bit, page
size is 4 Kbyte and size of each page table entry is 32-bit. The main memory is byte addressable.
What is the maximum number of bits that can be used for storing protection and other information
in each page table entry?
https://www.gatevidyalay.com/paging-formulas-practice-problems/

12. Define multitasking, multi programming, and multi-threading.


https://www.geeksforgeeks.org/difference-between-multitasking-multithreading-and-
multiprocessing/

Multi programming
In a modern computing system, there are usually several concurrent application processes which want to execute. Now
it is the responsibility of the Operating System to manage all the processes effectively and efficiently. One of the most
important aspects of an Operating System is to multi program. In a computer system, there are multiple processes
waiting to be executed, i.e. they are waiting when the CPU will be allocated to them and they begin their execution.
These processes are also known as jobs. Now the main memory is too small to accommodate all of these processes or
jobs into it. Thus, these processes are initially kept in an area called job pool. This job pool consists of all those
processes awaiting allocation of main memory and CPU. CPU selects one job out of all these waiting jobs, brings it
from the job pool to main memory and starts executing it. The processor executes one job until it is interrupted by
some external factor or it goes for an I/O task.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

Multiprocessing

In a uni-processor system, only one process executes at a time. Multiprocessing is the use of two or more CPUs
(processors) within a single Computer system. The term also refers to the ability of a system to support more than one
processor within a single computer system. Now since there are multiple processors available, multiple processes can
be executed at a time. These multi processors share the computer bus, sometimes the clock, memory and peripheral
devices also.

Difference between Multi programming and Multi processing

A System can be both multi programmed by having multiple programs running at the same time and multiprocessing
by having more than one physical processor. The difference between multiprocessing and multi programming is that
Multiprocessing is basically executing multiple processes at the same time on multiple processors, whereas multi
programming is keeping several programs in main memory and executing them concurrently using a single CPU only.
Multiprocessing occurs by means of parallel processing whereas Multi programming occurs by switching from one
process to other (phenomenon called as context switching).

Multitasking

As the name itself suggests, multi-tasking refers to execution of multiple tasks (say processes, programs, threads etc.)
at a time. In the modern operating systems, we are able to play MP3 music, edit documents in Microsoft Word, surf
the Google Chrome all simultaneously, this is accomplished by means of multi-tasking.
Multitasking is a logical extension of multi programming. The major way in which multitasking differs from multi
programming is that multi programming works solely on the concept of context switching whereas multitasking is
based on time sharing alongside the concept of context switching.

Multi-threading

A thread is a basic unit of CPU utilization. Multi-threading is an execution model that allows a single process to have
multiple code segments (i.e., threads) running concurrently within the “context” of that process.
e.g. VLC media player, where one thread is used for opening the VLC media player, one thread for playing a particular
song and another thread for adding new songs to the playlist.
Multi-threading is the ability of a process to manage its use by more than one user at a time and to manage multiple
requests by the same user without having to have multiple copies of the program.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

13. Distinguish between process & threads. In what way thread can be more efficient than process?
https://www.guru99.com/difference-between-process-and-thread.html

Process: A process is the execution of a program that allows you to perform the appropriate actions specified in a
program. It can be defined as an execution unit where a program runs. The OS helps you to create, schedule, and
terminates the processes which is used by CPU. The other processes created by the main process are called child
process. A process operations can be easily controlled with the help of PCB(Process Control Block). You can consider
it as the brain of the process, which contains all the crucial information related to processing like process id, priority,
state, and contents CPU register, etc.

Thread: Thread is an execution unit that is part of a process. A process can have multiple threads, all executing at the
same time. It is a unit of execution in concurrent programming. A thread is lightweight and can be managed
independently by a scheduler. It helps you to improve the application performance using parallelism. Multiple threads
share information like data, code, files, etc. We can implement threads in three different ways: Kernel-level threads,
User-level threads, Hybrid threads.

Advantages of Multi-threading
Benefits of Multi-threading include increased responsiveness. Since there are multiple threads in a program, so if one
thread is taking too long to execute or if it gets blocked, the rest of the threads keep executing without any problem.
Thus, the whole program remains responsive to the user by means of remaining threads. Another advantage of multi-
threading is that it is less costly. Creating brand new processes and allocating resources is a time-consuming task, but
since threads share resources of the parent process, creating threads and switching between them is comparatively
easy. Hence multi-threading is the need of modern Operating Systems.

Parameter Process Thread


Definition Process means a program is in execution. Thread means a segment of a process.
Lightweight The process is not Lightweight. Threads are Lightweight.
Termination time The process takes more time to terminate. The thread takes less time to terminate.
Creation time It takes more time for creation. It takes less time for creation.
Communication Communication between processes needs Communication between threads requires less time
more time compared to thread. compared to processes.
Resource Process consumes more resources. Thread consumes fewer resources.
Treatment by OS Different process is treated separately by OS. All the level peer threads are treated as a single task
by OS.
Memory The process is mostly isolated. Threads share memory.
Sharing It does not share data Threads share data with each other.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

14. When page fault occurs? Describe the action taken by an operating system when page fault
occurs.

https://www.geeksforgeeks.org/page-fault-handling-in-operating-system/

A page fault occurs when a program attempts to access data or code that is in its address space, but is not currently
located in the system RAM. So, when page fault occurs then following sequence of events happens:

• The computer hardware traps to the kernel and program counter (PC) is saved on the stack. Current
instruction state information is saved in CPU registers.
• An assembly program is started to save the general registers and other volatile information to keep the OS
from destroying it.
• Operating system finds that a page fault has occurred and tries to find out which virtual page is needed.
Sometimes hardware register contains this required information. If not, the operating system must retrieve
PC, fetch instruction and find out what it was doing when the fault occurred.
• Once virtual address caused page fault is known, system checks to see if address is valid and checks if there
is no protection access problem.
• If the virtual address is valid, the system checks to see if a page frame is free. If no frames are free, the
page replacement algorithm is run to remove a page.
• If frame selected is dirty, page is scheduled for transfer to disk, context switch takes place, fault process is
suspended and another process is made to run until disk transfer is completed.
• As soon as page frame is clean, operating system looks up disk address where needed page is, schedules
disk operation to bring it in.
• When disk interrupt indicates page has arrived, page tables are updated to reflect its position, and frame
marked as being in normal state.
• Faulting instruction is backed up to state it had when it began and PC is reset. Faulting is scheduled,
operating system returns to routine that called it.
• Assembly Routine reloads register and other state information, returns to user space to continue execution.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

Compiler and Automata Theory

1. Difference between DFA & NFA

DFA NFA
Cannot have ε transition. Can have ε transition.
Can transition to only one state. Can transition to several state at once.
Difficult to design. Often easier to design than DFA
DFA is a special case for NFA in which for each NFA is a mathematical model that allow zero or
state there is unique transition on each symbol. multiple transition for a single state.

2. Reg exp for:


(i) All strings over {0,1} with the substring ‘0101’
(ii) All strings beginning with ’11 ‘and ending with ‘ab’
(iii) (Set of all strings over {a,b} with 3 consecutive b’s.
(iv) Set of all strings that end with ‘1’and has no substring ‘00’

Ans:
(i)(0+1)* 0101(0+1)*

(ii)11(1+a+b)* ab

(iii)(a+b)* bbb (a+b)*

(iv)(1+01)* (10+11)* 1

3. Construct a regular expression for the set of strings that consist alternate 0’s and 1’s

Ans: (01)* + (10)* + 0(10)* + 1(01)*

4. Write a regular expression to denote a language L which accepts all the strings which begin or end
with either 00 or 11.

The regular expression consists of two parts:

L1= (00+11) (any no of 0’s and 1’s) = (00+11) (0+1)*

L2= (any no of 0’s and 1’s) (00+11) = (0+1)*(00+11)

Hence regular expression R=L1+L2 = [(00+11)(0+1)*] + [(0+1)* (00+11)]

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

5. Show how language processing System Works.

6. What are the phases of compiler?

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

7. Why intermediate code generator is required between syntax analysis and semantic analysis?

In the process of translating a source program into target code, a compiler may construct one or more
intermediate representations, which can have a variety of forms. Syntax trees are a form of intermediate
representation; they are commonly used during syntax and semantic analysis. After syntax and semantic
analysis of the source program, many compilers generate an explicit low-level or machine-like
intermediate representation, which we can think of as a program for an abstract machine. This
intermediate representation should have two important properties: it should be easy to produce and it
should be easy to translate into the target machine. we consider an intermediate form called three-
address code, which consists of a sequence of assembly-like instructions with three operands per
instruction. Each operand can act like a register. The output of the intermediate code generator consists
of the three-address code sequence.
tl = inttofloat (60)
t2 = id3 * tl
t3 = id2 + t2
id1 = t3
There are several points worth noting about three-address instructions. First, each three-address
assignment instruction has at most one operator on the right side. Thus, these instructions fix the order
in which operations are to be done; the multiplication precedes the addition in the source program (1.1).
Second, the compiler must generate a temporary name to hold the value computed by a three-address
instruction. Third, some "three-address instructions" like the first and last in the sequence (1.3), above,
have fewer than three operands. we cover the principal intermediate representations used in compilers.

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

www.youtube.com/c/NetComEducation
https://www.facebook.com/groups/NetComEducation

Discrete Mathematics and Digital Logics


All the candidates for JNU MSc in CSE (Professional) are highly recommended to learn this part as much as
possible. Because in Exams we have seen that this part contains 20% at least. HSC ICT chapter 3 is also
recommended for this topic.

Number System Practice

• Binary Addition/Subtraction practice.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

• Number system math practice.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

• Convert binary number 110001 in decimal


110001 is 49 in decimal form

Step 1: Write down the binary number: 110001


Step 2: Multiply each digit of the binary number by the corresponding power of two:
1x25 + 1x24 + 0x23 + 0x22 + 0x21 + 1x20
Step 3: Solve the powers:
1x32 + 1x16 + 0x8 + 0x4 + 0x2 + 1x1 = 32 + 16 + 0 + 0 + 0 + 1
Step 4: Add up the numbers written above:
32 + 16 + 0 + 0 + 0 + 1 = 49.
So, 49 is the decimal equivalent of the binary number 110001.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

1s and 2s Complement:

Example 1: 110100

For finding 2's complement of the given number, change all 0's to 1 and all 1's to 0. So the 1's
complement of the number 110100 is 001011. Now add 1 to the LSB of this number, i.e.,
(001011)+1=001100.

Example 2: 100110

For finding 1's complement of the given number, change all 0's to 1 and all 1's to 0. So, the 1's
complement of the number 100110 is 011001. Now add one the LSB of this number, i.e.,
(011001)+1=011010.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

• What is the basic difference between a shift register and a counter?


https://www.ahirlabs.com/difference/counter-shift-register/

COUNTER SHIFT REGISTER


Counter count the clock pulses. Shift register shifts the data left or right.
Type of counters are : Asynchronous , Types of shift register are: Serial in Parallel out, Serial in Serial
Synchronous , Decade ,MOD-N,Johnson out ,Parallel in Parallel Out , Parallel in Serial Out ,
, Ring etc. Bidirectional , Universal etc.
It uses T-Flip-Flop J-K Flip-Flop Its uses D-Flip Flop.
These Are used in Banks,Railway station etc. There Are used in Memories Like RAM,ROM etc.
A counter is a special case of a register. Shift registers are a type of sequential logic circuit, mainly for
Usually, it can only be loaded, stored, or storage of digital data. They are a group of flip-flops connected
incremented, or used for the stack or as the in a chain so that the output from one flip-flop becomes the
program counter. input of the next flip-flop.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

• What are the limitations of K-maps?

The Karnaugh map, also known as the K-map, is a method to simplify Boolean algebra expressions.

Limitations: The K map does not necessarily "fail" for higher dimensions. The problem is that it is so
difficult to visualize for more than five variables. A 4 variable K-map is 2 dimensional and easy to visualize.
A 5 variable is three dimensional, but is still manageable from a visualization standpoint, because the 2
states of the 5th variable only require visually moving from one plane to the next, without moving in the x
or y directions of either plane. Just getting equations correct with more than 5 variables is difficult enough
using the K map, much less considering an optimum set of terms ("core" prime implicants and "choice"
prime implicants).

• Why is the binary number system used in digital systems?

Because there are only two valid Boolean values for representing either a logic “1” or a logic “0”, makes the system
of using Binary Numbers ideal for use in digital or electronic circuits and systems.

The binary number system is a Base-2 numbering system which follows the same set of rules in mathematics as the
commonly used decimal or base-10 number system. So instead of powers of ten, ( 10n ) for example: 1, 10, 100,
1000 etc, binary numbers use powers of two, ( 2n ) effectively doubling the value of each successive bit as it goes,
for example: 1, 2, 4, 8, 16, 32 etc.

The voltages used to represent a digital circuit can be of any value, but generally in digital and computer systems
they are kept well below 10 volts. In digital systems theses voltages are called “logic levels” and ideally one voltage
level represents a “HIGH” state, while another different and lower voltage level represents a “LOW” state. A binary
number system uses both of these two states.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

Digital Systems 10th edition by Tocci Exercises from solution book from same
edition and writer
Page 17 parallel and serial transmission
Page 76 example 3-11 Page 112 3-30,3-31
Page 83 universality of NAND and NOR Page 115 3-48,3-49
Page 122 example 4-1 Page 195 4-5
Page 126 example 4-5 Page 200 4-33
Page 129 example 4-7 Page 287 5-33, 5-34
Page 133 KMAP [Very Important] Page 310 1.2
Page 144 exclusive OR and exclusive NOR Page 469 7-2, 7-3, 7-5, 7-7, 7-8
Page 305 example 6-3 and example 6-4 Page 476 7-43, a b 7-44, 7-45
Page 579 three to 8 decoder Page 604 q2
Page 592 8 to 3 encoder Page 609 q1
Page 792 example 12-4 Page 793 q1
Page 798 example 12-7 Page 829 q1
Page 827 example 12-12 Page 855 12-1, 12-3
Page 839 example 12-14

Discrete Mathematics and Its Applications Kenneth H Rosen fourth edition


Unfortunately, I don’t have 4th edition pdf but 7th edition is given for you. Find these by yourself if
possible.

Page 84,85,87 example 4,5,7,8


Page 111 exercise 7
Page 114 example 2
Page 115 theorem 3
Page 118 example 9
Page 175 example 14,15
Page 190 example 4,5
Page 216 example 4
Page 240 example 17
Page 244 pigeonhole principal
Page 245 example 3
Page 248 exercise 2,4
Page 251 example 2

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


Join this group: https://www.facebook.com/groups/858042971559671

Mathematics
Algebra, Geometry and Trigonometry

1. A man is 24 years older than his son. In two years, his age will be twice the age of his son. What is the
present age of his son?

Ans 22

2. Present ages of Kiran and Syam are in the ratio of 5 : 4 respectively. Three years hence, the ratio of
their ages will become 11:9 respectively. What is Syam's present age in years?

3. The sum of ages of 5 children born at the intervals of 3 years each is 50 years. Find out the age of the
youngest child.

Prepared By Mustakim Billah Bedar www.youtube.com/c/NetComEducation


Join this group: https://www.facebook.com/groups/858042971559671

4. At present, the ratio between the ages of Shekhar and Shobha is 4: 3. After 6 years, Shekhar's age
will be 26 years. Find out the age of Shobha at present?

5. The present ages of A,B and C are in proportions 4:7:9. Eight years ago, the sum of their ages was
56. What are their present ages (in years)?

6. In the first 10 overs of a cricket game, the run rate was only 3.2. What should be the run rate in the
remaining 40 overs to reach the target of 282 runs?

7. A train having a length of 240 metre passes a post in 24 seconds. How long will it take to pass a
platform having a length of 650 metre?

Prepared By Mustakim Billah Bedar www.youtube.com/c/NetComEducation


Join this group: https://www.facebook.com/groups/858042971559671

8. What is the largest 4-digit number exactly divisible by 88?

9. If a sweater sells for $48 after a 25% markdown, what was its original price?

(100-25) = 75% = 75/100 = 0.75

0.75*x = 48

x = $64 Ans:

10. If the side of a square is increased by a 20% then area increased by……

Let side of square =100 cms.

Then Area =100×100=10000 sq.cms.

Now after increase in side by 20 %. Area of Square =120×120=14400 sq.cms.

Increase in Area=14400 - 10000=4400 sq.cms.

Percentage change in area=( 4400/10000)×100= 44%

11. If the average of 5 numbers is 36 and the average of four of those numbers is 34, then what is the value
of the fifth number?

The average of 5 numbers is 36 --> the sum of 5 numbers is 5*36 = 180;


The average of 4 numbers is 34 --> the sum of 4 numbers is 4*34 = 136.

The difference = the omitted number = 180 - 136 = 44.

12. If two painters can complete two rooms in two hours, how many painters would it take to do 18
rooms in 6 hours?

2 painter takes 2 hours to Paint 2 rooms means, 1 painter takes 2 hours to paint 1 room.

So in 6 hours 1 painter can paint 3 rooms.

So to paint 18 rooms in 6 hours 6 painters are needed.

Prepared By Mustakim Billah Bedar www.youtube.com/c/NetComEducation


Join this group: https://www.facebook.com/groups/858042971559671

13. The difference between the squares of two consecutive numbers is 37. Find the numbers.... .........

If the difference between the squares of two consecutive numbers is x,

then the numbers are (x-1)/2 and (x+1)/2

So it's, (37-1)/2 and (37+1)/2

= 36/2 and 38/2

Answer: 18 and 19

14. In a certain store, the profit is 320% of the cost. If the cost increases by 25% but the selling price
remains constant, approximately what percentage of the selling price is the profit?

15. If m and n are whole numbers such that mn = 121, the value of (m - 1)n + 1 is:

We know that 112 = 121.

Putting m = 11 and n = 2, we get:

(m - 1)n + 1 = (11 - 1)(2 + 1) = 103 = 1000.

16. Sachin borrows Rs. 5000 for 2 years at 4% p.a. simple interest. He immediately lends money to
Rahul at 25/4% p.a. for 2 years. Find the gain of one year by Sachin.

Prepared By Mustakim Billah Bedar www.youtube.com/c/NetComEducation


Join this group: https://www.facebook.com/groups/858042971559671

17. A train 100 m long passes a bridge at the rate of 72 km/h in 25 s. The length of the bridge is

18. An observer 1.6 m tall is 20√3 away from a tower. The angle of elevation from his eye to the top of
the tower is 30º. The heights of the tower is:

19. The perimeter of a rectangle is 26 cm. If its length is 3 cm more than its breadth, find the dimensions
of the rectangle.

Let breadth be x cm.


Length = x+3 cm
Perimeter of rectangle = 26 cm
2(l+b) =26
x+3+x=13
2x=10
x=5
Therefore,
Breadth = 5 cm
Length = 8 cm

Prepared By Mustakim Billah Bedar www.youtube.com/c/NetComEducation


Join this group: https://www.facebook.com/groups/858042971559671

20. Mia has a large bag of sweets. If she shares the sweets equally among 2,3,4,5 or 6 people there will
always be 1 sweet left over. What is the smallest number of sweets there could be in the bag?

Mia has a large bag of sweets. If she shares the sweets equally among 2,3,4,5 or 6 people. First find the LCM
that will gives us the least number of sweets distributed equally among 2,3,4,5 or 6 people.

2=2
3=3
4=2×2
5=5
6=2×3

LCM = 2 × 2 × 3 × 5 = 60.
That means if she has 60 sweets, she can shares them equally among 2,3,4,5 or 6 people.
Now we want to be 1 sweet left over.
So add 1 and 60.
60+1=61.

21. A boy was asked to multiply a certain number by 25 He multiplied it by 52 and got his answer more
by 324 than the correct answer The number to be multiplied was?
Let the number is x
The if be multiply by 25 then correct answer =25x
But boy multiply with 52 then boys answer =52 x
As per question boy answer if more then 324 than correct answer
∴52x=25x+324
⇒52x−25x=324
⇒27x=324
⇒x=12

22. A two-digit number is such that the product of its digits is 8. When 18 is added to the number, the
digits are reversed. The number is:

Prepared By Mustakim Billah Bedar www.youtube.com/c/NetComEducation


Join this group: https://www.facebook.com/groups/858042971559671

Statistics and Probability

1. Out of 7 consonants and 4 vowels, how many words of 3 consonants and 2 vowels can be formed?

2. On the circle there are 9 points selected. How many triangles in these points exits?

Prepared By Mustakim Billah Bedar www.youtube.com/c/NetComEducation


Join this group: https://www.facebook.com/groups/858042971559671

3. Suppose a=2, b=8. Find the arithmetic mean and geometric mean.

AM = (a+b)/2 = (2+8)/2 = 5
GM = √(ab) = √(2*8) = 4

4. Find the mode of the following set of scores.


14 11 15 9 11 15 11 7 13 12

Solution:
The mode is 11 because 11 occurred more times than the other numbers.

If the observations are given in the form of a frequency table, the mode is the value that has the highest
frequency.

5. Find the mode of the following set of marks.

Marks 1 2 3 4 5

Frequency 6 7 7 5 3

Solution:
The marks 2 and 3 have the highest frequency. So, the modes are 2 and 3.

Note: The above example shows that a set of observations may have more than one mode.

6. The following frequency table shows the marks obtained by students in a quiz. Given that 4 is the
mode, what is the least value for x?

Marks 1 2 3 4 5 6

Number of students (Frequency) 7 9 10 x 9 11

Solution:
x is as least 12
(if x is less than 12 then 4 will not be the mode)

Prepared By Mustakim Billah Bedar www.youtube.com/c/NetComEducation


Join this group: https://www.facebook.com/groups/858042971559671

7. Find the median of the following set of points in a game:


15, 14, 10, 8, 12, 8, 16

When the number of observations is odd, the median is the middle value.

8. Find the median of the following set of points:


15, 14, 10, 8, 12, 8, 16, 13

When the number of observations is even, the median is the average of the two middle values.

9. x is the median for 4, 3, 8, x and 7. Find the possible values for x.

Solution:

Arrange the numbers in ascending order with x in the middle 3, 4, x, 7, 8

This tells us that the possible values of x are 4, 5, 6 and 7.

Prepared By Mustakim Billah Bedar www.youtube.com/c/NetComEducation


Join this group: https://www.facebook.com/groups/858042971559671

10. The set of scores 12, 5, 7, -8, x, 10 has a mean of 5. Find the value of x.

Solution:

11. 10 students of a class had a mean score of 70. The remaining 15 students of the class had mean score
of 80. What is the mean score of the entire class?

Solution:
Total score of first 10 students = 10 × 70 = 700
Total score of remaining 15 students = 15 × 80 = 1200
Mean score of whole class

12. A coin is thrown 3 times. what is the probability that at least one head is obtained?

Sample space = [HHH, HHT, HTH, THH, TTH, THT, HTT, TTT]

Total number of ways = 2 × 2 × 2 = 8. Fav. Cases = 7

P (of getting at least one head) = 1 – P (no head) ⇒ 1 – (1/8) = 7/8

13. What is the probability of getting a sum of 7 when two dice are thrown?

Total number of ways = 6 × 6 = 36 ways.

Favorable cases = (1, 6) (6, 1) (2, 5) (5, 2) (3, 4) (4, 3) --- 6 ways.

P (A) = 6/36 = 1/6

14. Three dice are rolled together. What is the probability as getting at least one '4'?

Total number of ways = 6 × 6 × 6 = 216.

Probability of getting number ‘4’ at least one time = 1 – (Probability of getting no number 4) = 1 – (5/6) x (5/6) x
(5/6) = 91/216

Prepared By Mustakim Billah Bedar www.youtube.com/c/NetComEducation


Join this group: https://www.facebook.com/groups/858042971559671

15. Find the probability of getting two heads when five coins are tossed.

Number of ways of getting two heads = 5C2 = 10.


Total Number of ways = 25 = 32
P (two heads) = 10/32 = 5/16

16. A die is rolled, find the probability that an even number is obtained.

Let us first write the sample space S of the experiment.


S = {1,2,3,4,5,6}
Let E be the event "an even number is obtained" and write it down.
E = {2,4,6}
We now use the formula of the classical probability.
P(E) = n(E) / n(S) = 3 / 6 = 1 / 2

17. A card is drawn at random from a deck of cards. Find the probability of getting a queen.

Let E be the event "getting a Queen".


An examination of the sample space shows that there are 4 "Queens" so that n(E) = 4 and n(S) = 52.
Hence the probability of event E occurring is given by
P(E) = 4 / 52 = 1 / 13

18. A jar contains 3 red marbles, 7 green marbles and 10 white marbles. If a marble is drawn from the
jar at random, what is the probability that this marble is white?

color frequency
red 3
green 7
white 10
total=3+7+10=20
P(E) = Frequency for white color / Total frequencies in the above table
= 10 / 20 = 1 / 2

19. Studenst in a math class where 40% are males and 60% are females took a test. 50% of the males
and 70% of the females passed the test. What percent of students passed the test?
Let events E1 "be a male" and E2 "be a female", and event A "passed the test".
P(A)=P(A|E1)P(E1)+P(A|E2)P(E2)
=50%×40%+70%×60%=62%

Prepared By Mustakim Billah Bedar www.youtube.com/c/NetComEducation


Join this group: https://www.facebook.com/groups/858042971559671

20. 5% of a population have a flu and the remaining 95% do not have this flu. A test is used to detect the
flu and this test is positive in 95% of people with a flu and is also (falsely) positive in 1% of the people
with no flu. If a person from this population is randomly selected and tested, what is the probability
that the test is positive?

Use the total probability theorem to find the percentage as follows:


5%×95%+95%×1%=5.7%

21. A card is drawn form a pack of 52 cards. What is the probability of getting a queen of club or a king
of heart

First, we will find the number of favorable outcomes and total outcomes. The total number of cards in the pack is 52.
Therefore, the total number of possible outcomes when a card is picked from the pack is 52. Next, we will find the
number of favorable outcomes. There are 4 queens (1 each of clubs, spades, diamonds, hearts) in a pack. Thus, there
is only 1 queen of clubs in a pack of 52 cards. Similarly, there are 4 kings (1 each of clubs, spades, diamonds, hearts)
in a pack. Thus, there is only 1 king of hearts in a pack of 52 cards. We need the probability of getting either a king
of hearts, or a queen of clubs when 1 card is drawn from a pack of 52 cards Therefore, the number of favorable
outcomes is 2. Finally, we will use the formula for probability of an event to calculate the probability of getting a card
of diamond. Let E be the event of getting a queen of clubs or a king of hearts. Substituting 2 for the number of favorable
outcomes, and 52 for the number of total outcomes in the formula, we get

⇒P(E)=2/52 = 1/26

22. A certain password must contain 3 distinct digits followed by 2 distinct capital letters. Given ten digits
and 26 capital letters, how many different passwords are possible?

List the number of possible options for each character in the password. There are 10 possibilities for the first digit, 9
left for the second, and 8 left for the third. There are 26 possibilities for the first letter and 25 for the second. There
are 10 × 9 × 8 × 26 × 25 = 468,000 possible passwords.

23. A bag contains 6 black and 8 white balls. One ball is drawn at random. What is the probability that
the ball drawn is white?

Prepared By Mustakim Billah Bedar www.youtube.com/c/NetComEducation


Join this group: https://www.facebook.com/groups/858042971559671

24. Find the probability that a number selected from the numbers 1 to 25 is not a prime number when
each of the given numbers is equally likely to be selected.

25. A box contains 3 red, 3 white and 3 green balls. A ball is selected at random. Find the probability
that the ball picked up is neither a white nor a red ball:

26. A letter is chosen at random from the letters of the English alphabet The probability that it is not a
vowel is?
There are 26 letters of which 21 are consonants Therefore
P(not a vowel)=21/26

27. What is the probability of selecting 'W' from the letters of the word SWORD?

28. If the letters of the word RANDOM be arranged at random, the probability that there are exactly 2
letters in between A and O is

Prepared By Mustakim Billah Bedar www.youtube.com/c/NetComEducation


Join this group: https://www.facebook.com/groups/858042971559671

Miscellaneous Math’s

Prepared By Mustakim Billah Bedar www.youtube.com/c/NetComEducation


Join this group: https://www.facebook.com/groups/858042971559671

Prepared By Mustakim Billah Bedar www.youtube.com/c/NetComEducation


Join this group: https://www.facebook.com/groups/858042971559671

Prepared By Mustakim Billah Bedar www.youtube.com/c/NetComEducation


Join this group: https://www.facebook.com/groups/858042971559671

Prepared By Mustakim Billah Bedar www.youtube.com/c/NetComEducation


Join this group: https://www.facebook.com/groups/858042971559671

Prepared By Mustakim Billah Bedar www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

Miscellanies (CSE/IT/ICT Specific)

Considered as Computer Basics

1. What are the functions of CDROM?

A CD-ROM drive (Compact Disk – Read Only Memory) is a type of device used by your computer to read CDs.
These CDs are used for a variety of purposes such as installing software and playing music. A CD-ROM drive operates
by using a laser to reflect light off the bottom of the CD or disc. The reflected light pulses are read by a photo detector.
These incoming pulses are decoded by the microprocessor and then sent as usable data to the rest of the computer
where it is processed and used.

CD-ROM drives can open documents on data CDs, such as music files, pictures, word documents and other files.
However, CD-ROM drives cannot write information to a CD (burn) because they are read-only drives; writing
information to a CD is done with a CD-R drive.

2. What are the types of errors?

There are three types of error: Logic, run-time and compile-time error:

Logic errors occur when programs operate incorrectly but do not terminate normally (or crash). Unexpected or
undesired outputs or other behavior may result from a logic error, even if it is not immediately recognized as such.
Logic errors occur when executed code does not produce the expected result. Logic errors are best handled by
meticulous program debugging.

A run-time error is an error that takes place during the execution of a program and usually happens because of
adverse system parameters or invalid input data. The lack of sufficient memory to run an application or a memory
conflict with another program and logical error is an example of this.

Compile-time errors rise at compile-time, before the execution of the program. Syntax error or missing file reference
that prevents the program from successfully compiling is an example of this.

Classification of Compile-time error

Lexical: This includes misspellings of identifiers, keywords or operators


Syntactical: a missing semicolon or unbalanced parenthesis
Semantical: incompatible value assignment or type mismatches between operator and operand
Logical: code not reachable, infinite loop.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

3. Describe briefly ROM, PROM, EPROM, EEPROM.

ROM
ROM stands for Read-only Memory. It is a type of memory that does not lose its contents when the power is turned
off. For this reason, ROM is also called non-volatile memory.

PROM (programmable ROM)


PROM refers to the kind of ROM that the user can burn information into. In other words, PROM is a user-
programmable memory. Programming ROM also called burning ROM, requires special equipment called a ROM
burner or ROM programmer. EPROM was invented to allow making changes in the contents of PROM after it is
burned. For every bit of the PROM, there exists a fuse. PROM is programmed by blowing the fuses. If the information
burned into PROM is wrong, that PROM must be discarded since its internal fuses are blown permanently. For this
reason, PROM is also referred to as OTP (One Time Programmable).

EPROM (erasable programmable ROM)


In EPROM, one can program the memory chip and erase it thousands of times. This is especially necessary during the
development of the prototype of a microprocessor-based project. A widely used EPROM is called UV-EPROM, where
UV stands for ultraviolet. The only problem with UV-EPROM is that erasing its contents can take up to 20 minutes.
All UV-EPROM chips have a window through which the programmer can shine ultraviolet (UV) radiation to erase
the chip’s contents. For this reason, EPROM is also referred to as UV-erasable EPROM or simply UV-EPROM.

EEPROM (electrically erasable programmable ROM)


EEPROM has several advantages over EPROM, such as the fact that its method of erasure is electrical and therefore
instant as opposed to the 20-minute erasure time required for UV-EPROM.
In addition, in EEPROM one can select which byte to be erased, in contrast to UV-EPROM, in which the entire
contents of ROM are erased. However, the main advantage of EEPROM is that one can program and erase its contents
while it is still in the system board. It does not require the physical removal of the memory chip from its socket. In
other words, unlike UV-EPROM, EEPROM does not require an external erasure and programming device.

4. What do you know about BCD?


Binary Coded Decimal, or BCD, is another process for converting decimal numbers into their binary equivalents. It
is a form of binary encoding where each digit in a decimal number is represented in the form of bits. This encoding
can be done in either 4-bit or 8-bit (usually 4-bit is preferred). It is a fast and efficient system that converts the
decimal numbers into binary numbers as compared to the existing binary system. These are generally used in digital
displays where is the manipulation of data is quite a task. Thus BCD plays an important role here because the
manipulation is done treating each digit as a separate single sub-circuit.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

5. What are the functions of GPU?

The graphics processing unit, or GPU, has become one of the most important types of computing technology, both for
personal and business computing. Designed for parallel processing, the GPU is used in a wide range of applications,
including graphics and video rendering. Although they’re best known for their capabilities in gaming, GPUs are
becoming more popular for use in creative production and artificial intelligence (AI).

GPUs were originally designed to accelerate the rendering of 3D graphics. Over time, they became more flexible and
programmable, enhancing their capabilities. This allowed graphics programmers to create more interesting visual
effects and realistic scenes with advanced lighting and shadowing techniques. Other developers also began to tap the
power of GPUs to dramatically accelerate additional workloads in high performance computing (HPC), deep learning,
and more.

6. What is Cache memory?

Cache memory is a small-sized type of volatile computer memory that provides high-speed data access to a processor
and stores frequently used computer programs, applications and data.

A temporary storage of memory, cache makes data retrieving easier and more efficient. It is the fastest memory in a
computer, and is typically integrated onto the motherboard and directly embedded in the processor or main random-
access memory (RAM).

7. Why Cache memory is expensive?

The cache memory is usually SRAM (Static RAM) where the principle of storing the bit is latching it between two
inverters. The output of one inverter in the input of another. This set up of two inverters when not accessed can
continue to store the bit till there is power. In addition to this, there are two more transistors to access the memory
cell. This makes 6 transistors in one memory cell which stores only 1 bit (6T SRAM). The latch provides the
advantages of speed and reliable storage but it needs 6 transistors for 1 bit.
On the other hand, the main memory is usually DRAM (Dynamic RAM) where the principle of storing the bit is
storing charge in the capacitor. The capacitor is hooked to one transistor to act as an access transistor. In such memory
cells, every bit is rewritten after every read operation. This makes it a bit slower but it requires a smaller space (since
it needs only 1 transistor and 1 capacitor to store 1 bit).
There are many other types of SRAMs and DRAMs but I guess you get the general idea and difference in the storing
principle between these two. And that is the simple reason why SRAMs (Cache) are usually more expensive than
DRAMs (Main Memory).

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

8. What is Unicode?

Unicode is a universal character encoding standard that assigns a code to every character and symbol in every language
in the world. Since no other encoding standard supports all languages, Unicode is the only encoding standard that
ensures that you can retrieve or combine data using any combination of languages. Unicode is required with XML,
Java, JavaScript, LDAP, and other web-based technologies.

9. What is CMOS?

CMOS (complementary metal-oxide semiconductor) is the semiconductor technology used in the transistors that are
manufactured into most of today's computer microchips. Semiconductors are made of silicon and germanium,
materials which "sort of" conduct electricity, but not enthusiastically. Areas of these materials that are "doped" by
adding impurities become full-scale conductors of either extra electrons with a negative charge (N-type transistors) or
of positive charge carriers (P-type transistors). In CMOS technology, both kinds of transistors are used in a
complementary way to form a current gate that forms an effective means of electrical control. CMOS transistors use
almost no power when not needed. As the current direction changes more rapidly, however, the transistors become
hot. This characteristic tends to limit the speed at which microprocessors can operate.

10. Why do we use Debugging?

Software programs undergo heavy testing, updating, troubleshooting, and maintenance during the development
process. Usually, the software contains errors and bugs, which are routinely removed. Debugging is the process of
fixing a bug in the software. It refers to identifying, analyzing and removing errors. This process begins after the
software fails to execute properly and concludes by solving the problem and successfully testing the software. But, it
is considered to be an extremely complex and tedious task because errors need to be resolved at all stages of debugging.

11. What do you understand by Universal Gate?

A universal gate is a logic gate which can implement any Boolean function without the need to use any other type of
logic gate. The NOR gate and NAND gate are universal gates. This means that you can create any logical Boolean
expression using only NOR gates or only NAND gates.

12. Why LIFO is used? Where LIFO is used?


LIFO stands for Last-In-First-Out. In this approach, the new element is inserted above the existing element, So that
the newest element can be at the top and taken out first. The data structure that implements LIFO is Stack.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

13. What is Linear and Non-Linear data structure?

Linear data structure: Elements are organized in a sequence.

Non-Linear data structure: Elements are not organized sequentially but they have their own approaches.

14. What is the difference between BCD and Binary?

In simple binary representation of any number we just convert the whole number into its binary form by repeteadly
dividing 2 again and again. But in the case of BCD, we need not to do this. If anyone knows the binary representation
of the numbers 0 to 9, he/she can make a BCD code of any number because, in BCD, we just convert each individual
digit of any number to binary and then write them together.

In the case of 946, the binary representation of this number is 01110110010. Here we convert the total number into its
binary form. But when we form the BCD code of the number 946, that'll be

9=1001

4=0100

6=0110

So BCD of 946 is 100101000110

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

15. Full form of RAID? Why do we use RAID? What are the Levels of RAID?

RAID stands for Redundant Array of Inexpensive/Independent Disks. RAID is a technique of data virtualization that
uses multiple hard disks or solid-state drives to provide for data redundancy and performance improvement.
Redundancy provides threat resilience to the data in case of unforeseen events, thus proving advantageous over the
conventional storage technique of having a “single large expensive disk” (SLED). So instead of having all the data on
one SLED, RAID instead makes use of multiple small-sized disks allowing faster I/O operations and providing
robustness to the whole system. In case one of the disks in the system crashes the others remain safe and the whole
system doesn’t collapse.
Advantages
• Data access speed: Data access speed in RAID systems is undeniably better that SLED systems. RAID
0, RAID 4 and RAID 5 are specially designed for fast and cheap data access.
• Reundant data: Data redundancy provided by RAID systems provides for a reliable storage system.
RAID 1 uses data mirroring to keep copies of data to ensure reliability.
• Error Correction: RAID 2, RAID 3, RAID 4 and RAID 5 use hamming code parity for error correction
in data.
• Simultaneous I/O requests: RAID 0, RAID 4 and RAID 5 use the striping storage techniques hence
support multiple I/O operations at the same time.
• Bulk data transfer: RAID 3 provides for quick bulk data transfers.
• Data security: Striping and continuous parity checks provide for high data security.

Disadvantages
• Cost: The cost of RAID systems is more than SLED systems.
• Data loss: The RAID systems that do not use mirroring are vulnerable to some data loss.
• Choice of RAID level: Given that there are so many RAID levels with each having some drawbacks and
features of their it is a difficult choice as to what system can be used.
• Improper use: If RAID is not use properly, the overall performance of the system as a whole may
decrease.
• Complex technology: RAID is a difficult to use architecture of data storage and requires skilled and
proficient people to unlock the full potential of RAID.

RAID levels:
RAID 0 – striping
RAID 1 – mirroring
RAID 5 – striping with parity
RAID 6 – striping with double parity
RAID 10 – combining mirroring and striping

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

16. What is BIOS? What are the Properties of BIOS? What happens when BIOS fails?

Every computer with a motherboard includes a special chip referred to as the BIOS or ROM BIOS (Read
Only Memory Basic Input/Output System). The BIOS includes instructions on how to load basic computer
hardware. The BIOS also includes a test referred to as a POST (Power On Self Test) which will ensure that
the computer meets requirements to boot up properly. If the computer does not pass the POST you will
receive a combination of beeps indicating what is malfunctioning within the computer.

The BIOS has 4 main functions:


• POST - Test computer hardware insuring hardware is properly functioning before starting process of
loading Operating System.
• Bootstrap Loader - Process of locating the operating system. If capable Operating system located BIOS
will pass the control to it.
• BIOS - Software / Drivers which interfaces between the operating system and your hardware. When
running DOS or Windows you are using complete BIOS support.
• CMOS Setup - Configuration program. Which allows you to configure hardware settings including
system settings such as computer passwords, time, and date.

BIOS is a piece of program. When the system starts, the register EIP is initialized to FFFF0 to execute the JMP
instruction there, which leads to the execution of the system BIOS code.
BIOS will initialize other devices; initialize the interrupt vector; find other BIOS programs and run them.

If your BIOS update procedure fails, your system will be useless until you replace the BIOS code.
You have two options:
Install a replacement BIOS chip (if the BIOS is located in a socketed chip).
Use the BIOS recovery feature (available on many systems with surface-mounted or soldered-in-place BIOS
chips).

17. What is VPN?

A virtual private network (VPN) gives you online privacy and anonymity by creating a private network from a
public internet connection. VPNs mask your internet protocol (IP) address so your online actions are virtually
untraceable. Most important, VPN services establish secure and encrypted connections to provide greater privacy
than even a secured Wi-Fi hotspot.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

18. What are the steps to build a software?

Software Development Life Cycle is the application of standard business practices to building software
applications. It’s typically divided into six to eight steps: Planning, Requirements, Design, Build, Document, Test,
Deploy, Maintain. Some project managers will combine, split, or omit steps, depending on the project’s scope.
These are the core components recommended for all software development projects.

SDLC is a way to measure and improve the development process. It allows a fine-grain analysis of each step of
the process. This, in turn, helps companies maximize efficiency at each stage. As computing power increases, it
places a higher demand on software and developers. Companies must reduce costs, deliver software faster, and
meet or exceed their customers’ needs. SDLC helps achieve these goals by identifying inefficiencies and higher
costs and fixing them to run smoothly.

Phases of SDLC:

1. Planning
2. Define Requirements
3. Design and Prototyping
4. Software Development
5. Testing
6. Deployment
7. Operations and Maintenance

19. What are the major operations of data structure?

The following four operations play a major role:

✓ Traversing: Accessing each record exactly once so that certain items in the record may be processed.
✓ Searching: Finding the location of the record with a given key value, or finding the locations of all such
records which satisfy one or more conditions.
✓ Inserting: Adding a new record to the structure.
✓ Deleting: Removing a record from the structure.

The following two operations, which are used in special situations:

– Sorting: Arranging the records in some logical order

– Merging: Combining the records in two different sorted files into a single sorted file.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

20. What do you mean by complexity?


Complexity

The complexity of an algorithm is the function which gives the running time and /or space in terms of the input size.
It describes the efficiency of the algorithm in terms of the amount of data the algorithm must process. There are two
main complexity measures of the efficiency of an algorithm:

• Time complexity
• Space complexity

21. What is Big O Notation?

Suppose M is an algorithm, and suppose n is the size of the input data. Clearly the complexity f(n) of M increases as
n increases. The rate of increase of f(n) is usually done by comparing f(n) with some standard function, such as

log2n, n, n log2n, n2, n3, 2n

22. What do you mean by Overflow and Underflow?

Overflow

Sometimes new data are to be inserted into a data structure but there is no available space. This situation is usually
called overflow. Overflow will occur in linked list when AVAIL = NULL and there is an insertion.

Underflow

Underflow refers to the situation where one wants to delete data from a data structure that is empty. Underflow will
occur in linked lists when START= NULL and there is a deletion.

23. Describe how computer represent negative numbers.

To store a negative integer, we need to follow the following steps. Calculate the two’s complement of the same
positive integer.

Eg: 1011 (-5)

Step-1 − One’s complement of 5: 1010

Step-2 − Add 1 to above, giving 1011, which is -5

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

24. What do you understand by BCD, ASCII and EBCDIC?

BCD

Another number system that is encountered occasionally is Binary Coded Decimal. In this system, numbers are
represented in a decimal form, however each decimal digit is encoded using a four bit binary number.

For example: The decimal number 136 would be represented in BCD as follows:

136 = 0001 0011 0110

1 3 6

ASCII

The name ASCII is an acronym for: American Standard Code for Information Interchange. It is a character encoding
standard developed several decades ago to provide a standard way for digital machines to encode characters. The
ASCII code provides a mechanism for encoding alphabetic characters, numeric digits, and punctuation marks for use
in representing text and numbers written using the Roman alphabet.

As originally designed, it was a seven bit code. The seven bits allow the representation of 128 unique characters. All
of the alphabet, numeric digits and standard English punctuation marks are encoded. The ASCII standard was later
extended to an eight bit code (which allows 256 unique code patterns) and various additional symbols were added,
including characters with diacritical marks (such as accents) used in European languages, which don’t appear in
English.

There are also numerous non-standard extensions to ASCII giving different encoding for the upper 128 character
codes than the standard. For example, The character set encoded into the display card for the original IBM PC had a
non-standard encoding for the upper character set. This is a non-standard extension that is in very wide spread use,
and could be considered a standard in itself.

EBCDIC

EBCDIC, in full extended binary-coded decimal interchange code, data-encoding system, developed by IBM and used
mostly on its computers, that uses a unique eight-bit binary code for each number and alphabetic character as well as
punctuation marks and accented letters and nonalphabetic characters. EBCDIC differs in several respects from
Unicode and ASCII, the most widely used systems of encoding text, dividing the eight bits for each character into two
four-bit zones, with one zone indicating the type of character, digit, punctuation mark, lowercase letter, capital letter,
and so on, and the other zone indicating the value—that is, the specific character within this type.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

25. Describe 2’s complement with example.

Generally, there are two types of complement of Binary number: 1’s complement and 2’s complement. To get 1’s
complement of a binary number, simply invert the given number. For example, 1’s complement of binary number
110010 is 001101. To get 2’s complement of binary number is 1’s complement of given number plus 1 to the least
significant bit (LSB). For example 2’s complement of binary number 10010 is (01101) + 1 = 01110.

Example: Find 2’s complement of binary number 10101110.

Simply invert each bit of given binary number, which will be 01010001. Then add 1 to the LSB of this result, i.e.,
01010001+1=01010010 which is answer.

Uses of 2’s Complement Binary Numbers

There are various uses of 2’s complement of Binary numbers, mainly in signed Binary number representation and
various arithmetic operations for Binary numbers, e.g., additions, subtractions, etc. Since 2’s complement
representation is unambiguous, so it’s very useful in Computer number representation.

Subtractions by 2’s Complement

Example (Case-1: When Carry bit 1) Evaluate 10101 - 00101

take 2’s complement of subtrahend 00101, which will be 11011, then add both of these. So, 10101 + 11011 =1 10000.
Since, there is carry bit 1, so dropped this carry bit 1, and take this result will be 10000 will be positive number.

Example (Case-2: When no Carry bit) −Evaluate 11001 - 11100

take 2’s complement of subtrahend 11110, which will be 00100. Then add both of these, So, 11001 + 00100 =11101.
Since there is no carry bit 1, so take 2’s complement of above result, which will be 00011, and this is negative number,
i.e, 00011, which is the answer.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

26. What do you understand by even and odd parity?

A parity bit is a check bit, which is added to a block of data for error detection purposes. It is used to validate the
integrity of the data. The value of the parity bit is assigned either 0 or 1 that makes the number of 1s in the message
block either even or odd depending upon the type of parity. Parity check is suitable for single bit error detection only.

The two types of parity checking are

• Even Parity − Here the total number of bits in the message is made even.
• Odd Parity − Here the total number of bits in the message is made odd.

Error Detection by Adding Parity Bit

Sender’s End − While creating a frame, the sender counts the number of 1s in it and adds the parity bit in following
way

• In case of even parity − If number of 1s is even, parity bit value is 0. If number of 1s is odd, parity bit
value is 1.
• In case of odd parity − If number of 1s is odd, parity bit value is 0. If number of 1s is even, parity bit
value is 1.

Receiver’s End − On receiving a frame, the receiver counts the number of 1s in it. In case of even parity check, if
the count of 1s is even, the frame is accepted, otherwise it is rejected. In case of odd parity check, if the count of 1s
is odd, the frame is accepted, otherwise it is rejected.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

27. What is universal gate? Prove that NAND gate is a universal gate.

A universal gate is a gate which can implement any Boolean function without need to use any other gate type. The
NAND and NOR gates are universal gates. In practice, this is advantageous since NAND and NOR gates are
economical and easier to fabricate and are the basic gates used in all IC digital logic families.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

28. What do you know about waterfall model?

Waterfall approach was first SDLC Model to be used widely in Software Engineering to ensure success of the project.
In "The Waterfall" approach, the whole process of software development is divided into separate phases. In this
Waterfall model, typically, the outcome of one phase acts as the input for the next phase sequentially.

The following illustration is a representation of the different phases of the Waterfall Model.

The sequential phases in Waterfall model are −

• Requirement Gathering and analysis − All possible requirements of the system to be developed are
captured in this phase and documented in a requirement specification document.

• System Design − The requirement specifications from first phase are studied in this phase and the system
design is prepared. This system design helps in specifying hardware and system requirements and helps in
defining the overall system architecture.

• Implementation − With inputs from the system design, the system is first developed in small programs
called units, which are integrated in the next phase. Each unit is developed and tested for its functionality,
which is referred to as Unit Testing.

• Integration and Testing − All the units developed in the implementation phase are integrated into a system
after testing of each unit. Post integration the entire system is tested for any faults and failures.

• Deployment of system − Once the functional and non-functional testing is done; the product is deployed in
the customer environment or released into the market.

• Maintenance − There are some issues which come up in the client environment. To fix those issues, patches
are released. Also to enhance the product some better versions are released. Maintenance is done to deliver
these changes in the customer environment.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

29. What is Pipelining?

Pipelining: Pipelining is a process of arrangement of hardware elements of the CPU such that its overall performance
is increased. Simultaneous execution of more than one instruction takes place in a pipelined processor.

Advantages of Pipelining

The cycle time of the processor is decreased. It can improve the instruction throughput. Pipelining doesn't lower the
time it takes to do an instruction. Rather than, it can raise the multiple instructions that can be processed together ("at
once") and lower the delay between completed instructions (known as 'throughput').

If pipelining is used, the CPU Arithmetic logic unit can be designed quicker, but more complex.

Pipelining increases execution over an un-pipelined core by an element of the multiple stages (considering the clock
frequency also increases by a similar factor) and the code is optimal for pipeline execution.

Pipelined CPUs frequently work at a higher clock frequency than the RAM clock frequency increasing the computer’s
global implementation.

30. Write an algorithm for push and pop.

PUSH:
Step 1: If Top=Max-1
Print “Overflow : Stack is full” and Exit
End If
Step 2: Top=Top+1
Step 3: Stack[TOP]=Element
Step 4: End

POP:
Step 1: If TOP=-1
Print “Underflow: Stack is empty” and Exit
End if
Step 2: Set Del_element=Stack[Top]
Step 3: Top=Top-1
Step 4: Del_Element
Step 5: End

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

31. What are the differences between Alpha and Beta testing?

Alpha Testing Beta Testing


This testing is performed by the employees of the This testing is done by clients who are not part of the
organization organization.
This kind of testing requires a specific environment This does not require any environment for testing.
for testing.
Robustness and security test is not performed in alpha These parameters are checked during beta testing.
testing
It is performed before the product launches into the It is performed at the time of product marketing.
market.
It performs many cycles to complete the testing. This It performs 1-2 cycles to complete the testing. This may
may vary with the number of issues found. vary with the user’s feedback.
The main goal is to evaluate the quality of the product The main goal is to evaluate customer satisfaction.
Both white-box and Black-box testing are involved. It only involves black-box testing.
Activities can be controlled since it’s performed on Activities can’t be controlled, since it’s performed in the
the developer’s site. real environment.
This testing is done by highly-skilled employees. This testing is done by the end-users. They don’t have
They have knowledge about the software product. the technical knowledge of the software product.
Stakeholders are the product management team, Stakeholders are the product management team, user
quality assurance team, and engineers. experience team, and quality management team.
Developers can resolve the bugs in alpha testing after The feedback collected from the users are implemented
testers inform them. in future or in the next version of the application.

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

Viva Practice
The following part will be helpful for Viva Voce. It can be also helpful for short
question answer if there is any in written exam.

Some important personal opinion to test your


English skill and interest of Master’s degree

• Tell me about yourself in brief in English.


• Tell Something about Zoom application or Google Classroom.
• Why do you want to admit here? what do you expect?
• Why JU in English/ Why should we give you the chance/ What are you expecting from US?
• Is online education beneficial?
• What is your future plan?
• Describe Summer season in BD.

www.youtube.com/c/NetComEducation

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

10 Most Important IQ from C Programming

➢ ➢

➢ ➢



Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

10 Most Important IQ from OOP

• •
• •




Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

10 Most Important IQ from Computer Network

➢ ➢



➢ •


• ➢

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

10 Most Important IQ from Data Structure

➢ ➢



➢ ➢

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

10 Most Important IQ from Database

➢ ➢


✓ ➢






Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

10 Most Important IQ from Microprocessor

➢ ➢







Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

10 Most Important IQ from Operating System







Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


https://www.facebook.com/groups/NetComEducation

10 Most Important IQ from Digital Logic Design



Some Basic Computer Knowledge

➢ ➢

➢ ➢

➢ ➢

➢ ➢

➢ ➢

➢ ➢

➢ ➢

Prepared By [Mustakim Billah Bedar] www.youtube.com/c/NetComEducation


Jagannath MSc in CSE (Professional)

Previous Years Questions

1. What are the differences between paging and segmentation

2. There is one father and when his age is reverse, then father age is twicer then son age. what are the
actual age of father or man? (Similar kind of question)

3. What is base in number system? Write down the base system of decimal, octal, hexa-decimal and
binary system.

4. Convert hexa-decimal to decimal 4FB.C4

5. What is flag register of 8086/8085 microprocessors?

6. What happens if a register holding a value and you need to assign value on memory register on micro-
processor 8086?

7. 192.128.8.0/26 (Something like this IP) was given: Calculate

a. total subnet

b. block size

c. total host

d. usable host

e. usable subnet per host

f. Which class method is used on this IP

8. What is adjacency matrix? Adjacency Matrix problem.

9. binary search tree from values.

10. What are the differences between switch and router?

11. Define with example about application software and utility software.

12 There was a L shape square given, if per unit cost of renovation is 20$, What the total cost? [similar
type question was given]

Collected by Mustakim Billah Bedar


JNU Previous Years questions (Only Topics)

• Logic gate expression with truth table.


• Morgan law er truth table.
• Database schema
• Ram and Rom,
• Winter er network same (question repeat) subnetting/26,
• Paging, switch, router, protocol, kernel, bootstrap, OSI, do while loop programming,
bipartite or non-bipartite
• program writing for Checking word palindrome or not
• What is CIDR
• Difference between basic logic gates and universal logic gates
• Difference between volatile and non volatile memory
• U={a,b,c,d,e,1,2,3,4}, logical gate and intersection, A={x,y,z}, B={x,y}, C={1,2,3} given,
what is C X A X B similar type question
• Implement OR logic gates based on NAND,
• Boolean algebra ABC + BC + CA and logical gates,
• Error tracing, Graph, Subnetting Purpose, flag 8086, BFT, Difference between truncate
drop and delete, left outer join, right outer join, full outer join,
• SQL query salary greater then 3000 and work in janata bank(3 tables)
• Describe different types of relationship in DBMS.

Collected by Mustakim Billah Bedar


Night before Exam

(Final Suggestion)

Prepared by Mustakim Billah Bedar

1. Number system Related Math. [ Binary addition, multiplication, decimal to binary, hex to
binary, hex to decimal, 1s and 2s complement, BCD and Binary etc. ]
2. Logic gates, Universal gates, gate simplification
3. Connecting devices [Switch, HUB, Repeater, Bridge, gatway]
4. IP address related math [ 1st address, last address, subnet mask, block size etc. ]
5. SQL related problems [sql command]
6. Internet, Intranet, Extranet, Arpanet
7. Call by value, call by reference
8. ++m and m++
9. OOP features
10. Database features
11. Deadlock conditions, avoidance and preventions
12. Virtual Memory
13. Primary key, Composite key, Foreign key
14. DDL, DML, DCL
15. Normalization
16. Function of OS
17. Page fault
18. Cache Memory
19. ACID properties
20. OSI model with layers and protocols

Collected by Mustakim Billah Bedar


Collected by Mustakim Billah Bedar
References:
https://www.javatpoint.com/ https://techdifferences.com/

https://www.guru99.com/ https://byjus.com/

https://onlinecomputertips.com/ https://study.com/

https://www.tutorialspoint.com/ https://www.maximintegrated.com/

https://techdifferences.com/ https://www.w3schools.com/

https://www.encyclopedia.com/ https://www.omnisci.com/

https://www.vedantu.com/ https://www.educba.com/

https://en.wikipedia.org/ https://www.examveda.com/

https://www.tutorialspoint.com/ https://www.javatpoint.com/

https://www.dictionary.com/ https://www.tutorialspoint.com/

https://www.geeksforgeeks.org/ https://www.sanfoundry.com/

https://www.webopedia.com/ https://www.examtray.com/

https://www.techtarget.com/ https://www.geeksforgeeks.org/

https://www.edureka.co/ https://tutorialslink.com/

https://www.diffen.com/ https://www.udemy.com/

https://studyelectrical.com/ https://studymaterialz.in/

https://www.programiz.com/ https://easyengineering.net/

https://www.programiz.com/ https://unacademy.com/

https://favtutor.com/ https://lastmomenttuitions.com/

https://www.computerhope.com/ https://www.examtray.com/

https://thirdspacelearning.com/ https://www.courseya.com/

http://flint.cs.yale.edu/ https://www.toppr.com

https://www.investopedia.com/
www.youtube.com/c/NetComEducation

Links to connect With Me:

https://www.facebook.com/groups/NetComEducation

https://www.facebook.com/groups/858042971559671

www.youtube.com/c/NetComEducation

Mail Me at: mustakimbilla007@gmail.com

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy