You are on page 1of 44

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


1


PES Institute of Technology Dept. of MCA
GENERAL GUIDELINES
1. The course information is to be brought to the classroom daily.
2. Students should be in time for the first class and subsequent classes thereafter.
3. Students should keep the classroom and Laboratories clean and tidy.
4. Students are informed to clarify their doubts in the respective subjects with the faculty
by taking prior appointments.
5. Students are advised to show due respect to all faculty regardless of the department
and maintain affable personality.

6. Students are to maintain absolute discipline and decorum, so as to promote the fair
name of their college in all its activities.

7. Students having less the 85% attendance in any subject (both Theory and Practical)
will not be allowed to take up the university examination.

8. Students who fail to get minimum of 25 marks in Internal assessment of any subject
will fall in NSSR category and / or not eligible to take up that particular subject.

9. Parents are to follow the progress of their wards by being in touch with the college
authorities at regular intervals.

10. Writing on desks and walls is strictly prohibited, failing which the students will be fined a
minimum of Rs. 500. If the identity of the individual is not established the entire class
will be fined ranging from Rs.100 to Rs.500

11. Attendance of the students will be displayed on the department notice board as well as
available in the Web site at the end of the 5
th
, 10
th
, and 16
th
week of the semester along
with list of students having shortage in attendance.

12. Students should bring the observation book as well as the laboratory record book
completed in all respect to the laboratory.

13. Take the print outs of the source listing and output of the code after execution and
delete your files.

14. Students are not supposed to alter the configuration / any software on the system.

15. Final examination is of 3 hours duration.
16. Students are supposed to fill details in the LOG BOOK at the time of entering and leaving
the lab.

17. Students should wear IDENTITY CARD all the time. Students without the same will not
be allowed to enter either the class room or the lab.

18. Those students who have less than 85% attendance should sign the undertaking given
by their class teachers from time to time.

19. Students are not allowed to bring the mobile phones and Ragging is strictly prohibited in
the campus.

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


2


I SEMESTER PROGRAMME STRUCTURE





Time Table









Class Teachers:
I SEM Section A Mrs. A.Lekha
I SEM Section B Mrs. Prema Latha H.M







Sl.
No
Sub
Code
SUBJECT
MARKS
Total Page #
IA UE
1 10MCA11 Problem solving using C 50 100 150
2 10MCA12 Discrete Mathematics 50 100 150
3 10MCA13
Fundamentals of Computer
Organization
50 100 150
4 10MCA14 Introduction to Unix 50 100 150
5 10MCA15
Professional
Communication & Ethics
50 100 150
6 10MCA16 C Programming Laboratory 50 50 100
7 10MCA17 Unix Laboratory 50 50 100
8 10MCA18
IT and Digital Electronics
Laboratory
50 50 100
Total 400 650 1050
Day/
Time
08:15-
09:15
09:15-
10:15
10.15-
10.45
10:45-
11:45
11.45-
12.45
12.45-
01.30
01.30-
02.30
02.30-
03.30
Mon

T
e
a

B
r
e
a
k



L
u
n
c
h

B
r
e
a
k


Tue
Wed
Thu
Fri

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


3

PROBLEM SOLVING USING C

Subject code : 10MCA11 Hours/week : 4
Faculty : Mrs. A Lekha Total Hours : 52

The subject focuses about the C language: to interact with the computer, solve the problems by
implementing logic in the language chosen, the flexibility and effective storage which C language
offers to the user. The purpose of C is to precisely define a series of operations that a computer
can perform to accomplish a task. Most of these operations involve manipulating numbers and
text, but anything that the computer can physically do can be programmed in C. The study also
deals about the features of C such as file management, dynamic allocation.

Class
No.
Chapter
No.
Topics Covered
% of portions
covered
Chapter
wise
Cumu
lative
1
1
Algorithms and
Flowcharts
T2 :Chapters
1.1, 1.3, 2.1,2.3
The meaning of algorithm, flowcharts and
their need, writing algorithms and
Flowcharts 6 6
2
Simple exercises
3
2
Constants
Variables and
Data types
T1: Chapter 2
Character set, C tokens, keywords and
identifiers, constants, variables, Data
types
8

14

4
Variable declarations, Declaration of
storage classes, Assigning values to
variables.
5
Declaring a variable as constant,
Declaring a variable as volatile
Overflow and underflow of data
6 Structure of a C program
7
3
Operators and
expressions
T1:Chapter 3
Arithmetic, Relational, Logical,
Assignment, Increment and Decrement,
Conditional, Bitwise, Special operators.
4 18
8
Arithmetic expressions, Evaluation of
expression, precedence of arithmetic
operators
9
Type conversions in expressions,
Operator precedence and associativity,
mathematical functions
10
4
Managing Input
and Output
operations
T1 :Chapter 4
Reading a character, writing a character,
6 24
11
Address operator & , formatted input
12 Formatted output using format specifiers
13
Simple C programs

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


4

14
5
Control
statements
T1 :Chapter 5
If Statement, Simple if, If..Else
statement, nesting of if..Else, Else-if
ladder.
6 30
15
Switch statement, The? : (conditional)
operator
16
go to statement, break statement
17
Programming examples
18
6
Loop control
structures
T1 :Chapter 6
While, do..while statements
6 36
19
For, nested loops, jumps in loops,
continue statement.
20 Programming examples
21
7
Arrays
T1 :Chapter 7
Introduction, One dimensional arrays,
Declaration, Initializing 1D array
6 42 22
Two dimensional arrays, Initializing 2D
array.
23
Multidimensional arrays, dynamic arrays,
Programming examples
24
8
Character
arrays and
strings
T1 :Chapter 8
Declaring and initializing string variables.
Reading string from terminal, writing
string to screen
6 48
25
Arithmetic Operations on characters,
Putting strings together, comparison of
two strings.
26
String handling functions, table of strings
and Programming examples
27
9
User defined
functions
T1 :Chapter 9
Need for user defined functions, A Multi-
Function program, Elements of User-
Defined Functions
12 60
28
Definition of Functions, its return values
and their types.
29
Function calls, Function Declaration,
Category of functions: Functions with No
arguments and No return values.
30
Arguments but no return values,
arguments with return values, no
arguments but returns a value.
31
Functions that return a multiple values,
Nesting of functions, recursion
32
Passing arrays to functions, passing
strings, Programming examples
33
10
Structures
and Unions
T1 :Chapter 10
Definition, Declaration of Structure
variables, Accessing of structure
variables. Structure initialization, copying
and comparing of structure variables.
6 66

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


5

34
Operations on individual members.
Arrays of structures, Arrays within
structures, structures within structures.
35
Structures and functions, Unions, size of
structures, bit fields, Programming
examples
36
11
Pointers
T1 :Chapter 11
Understanding pointers, accessing the
address of a variable, declaring and
initializing pointers.
10 76
37
Accessing a variable through its pointer,
chain of pointers, pointer expressions,
pointers and arrays.
38
Pointer and character strings, array of
pointers, pointers as function arguments.
39
Functions returning pointers, pointers to
functions, pointers and structures.
40 Programming examples
41
12
File
Management
in C
T1 :Chapter 12
Introduction, Defining, opening and
closing a file
12 88
42
I/O operations on files,
43 Error handling
44 Random access to files
45 Command line arguments
46 Programming examples
47
13
Dynamic
memory
allocation
T1 :Chapter 13.1
To 13.6
Dynamic memory allocation, allocating a
Block of memory: malloc


6


94
48
Allocating multiple blocks of memory:
calloc
49
releasing the used space: free, Altering
the size of a block: realloc
50 Programming examples
51
14
The
Preprocessor
T1 :Chapter 14
Introduction, macro substitution, file
inclusion, Compiler control directives,
6 100
52
ANSI additions, Programming examples





TEST SYLLABUS:

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


6

Test 1: Chapters:1,2,3,4,5 Test 2: Chapters:6,7,8,9 Test 3:Chapters:10,11,12,13, 14

LITERATURE:

Book
Type
Book
No.
Book Name Author
Publication Information
Edition Publisher Year
Text
Book
T1
Programming in
Ansi C
E Balagurusamy
3rd
Edition
McGraw
Hill
2003
Text
Book
T2
Computer
programming in C
V. Rajaraman
-
PHI 2000
Ref.
Book R1
Structured
Programming
Approach C
Behrouz A Forouzan
and Richard F Gilberg
2nd
Edition Thomson 2005






























QUESTION BANK


Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


7

Chapter1,2,3,4: Algorithms and Flowcharts, Constants Variables and
Data types, Operators and expressions, Managing Input and Output operations

Objective: The objective of this chapter is to familiarize you with the basic need for
algorithms/flowcharts. Writing algorithms and drawing flowcharts for simple programs is
explained. Structure of C program is discussed. The unit also gives an idea what are
variable, constant and operators. We also discuss the data types, expressions.
1. Draw the flowchart whether the given number is odd or even
2.
Write an algorithm to find the smallest and largest of given N numbers.
3.
What is an algorithm? What are its characteristics?
4. Write a flow chart for finding biggest among n-numbers
5. Write an algorithm to find roots of quadratic equation.
6. Write the different symbols used in flow chart
7. What for algorithms and/or flow charts are used?
8. C is a middle level language. Justify your answer.
9. What is a variable and what is meant by value of a variable?
10. What is an identifier? Explain. List the rules required to form variable names in C.
11. Write an explanatory note of fundamental data types in C.
12. What are trigraph characters? How are they useful?
13. How do variables and symbolic names differ? Give an example.
14. What is meant by initialization? Why is it important during execution of a program?
15. What is meant by const and volatile? Give examples.
16. What are C tokens?
17.
Find errors if any
1 int x;
2 float letter, DIGIT;
3 double =p,q
4 exponent alpha, beta;
5 m,n,z: INTEGER
6 short char c;
7 long int m; count;
8 long float temp;
18.
What are the steps that have to be taken to improve the accuracy of the
calculations involving very small or very large numbers?
19. Why are escape sequence characters used? Write their characteristics.
20. What are the qualifiers that an int can have at a time? Give examples.
21. Explain increment & decrement operators with suitable examples.
22. Explain the different relational operators in C with examples.
23.
Find errors if any and rectify
1 x = y = z = 0.5, 2.0, -5.75;
2 m = ++a * 5;
3 y = sqrt(100);
4 p *=x/y;
5 s =/5;
6 a = b++ -c *2


Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


8

24. Give the format of a C-program. Give a typical example.
25.
Find errors if any and rectify
1 if(m==1 & n!=0) printf(OK);
2 if(x=<5) printf(Jump);
3 int x=10; float y = 2.5; x =y%x;
26. Write a program to read a four digit number and print the sum of its digits.
27.
Briefly explain the following operators with examples
1. Bitwiseoperators
2. Relationaloperators
3. Increment&decrementoperators

Chapter 5,6: Control statements, Loop control structures

Objective: The unit deals with the reading, writing of data. It also describes the control
statement such as IF, Nested IF and switch. It also explains different types of loop controls
supported by C.
28.
With general C syntax, explain the getchar (), putchar () functions and the
address operator (&).
29.
Write the output of the following program :
# include <stdio.h>
main ()
{
int x=5, m , k=1,n;
float y=2.5;
m=x * 1000 + y * 10;
k= m/1000 + x;
n=(x==y)? k:m;
printf(%d/n%d/n%d ,m,k,n);
}
30. Explain printf() function with suitable examples.
31. Explain the scanf() function along with format specifiers.
32. What is the difference between getch() and getchar().
33.
How are control statements classified in C? Explain each one with general syntax
and an example.
34. Explain the use of break and continue statements in a loop.
35.
An electric power distribution company charges its domestic consumers as follows
Units consumed Rate of charge
0 200 Rs.0.50 per unit
201 400 Rs.100 plus Rs.0.65 per unit
Excess of 200
401 600 Rs.230 plus Rs.0.80 per unit
Excess of 400
601 & above Rs.390 plus Rs.1.00 per unit
Excess of 600
Write a C program using nested if statements to read in customer number and
power consumed and print out the amount to be paid by customer

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


9

36. Explain iterative constructs in C. Give an example for each construct.
37.
Write a program to list all the prime numbers between n1 and n2. Also make a
count of them.
38. Write a program to count number of 1s in a given binary number.
39. Give the syntax of ifelse statement and illustrate it with an example.
40. Write a C program to accept an integer number and print the digits using words.
41.
What will be the output for the following program?
int func(int i) {
if (i%2) return 0;
else return 1;
}
main() {
int i=3;
i=func(i);
printf(i=%d,i);
}
42.
Rewrite each of the following without using compound relationship.
a) if (number > 100) OR (number < 0) printf (out of range);
else sum + = number;
b) if ((M1 > 60) && (M2 > 60) OR (T > 200) printf (success);
else printf (Fail);
43. Explain the different kinds of loop statement available in C with example.
44.
What would be the output of each of the code segment
1 for(n=1;n!=10;n+=2)
sum = sum + n;
2 for(n=5;n<=m; n-=1)
sum = sum + n;
3 for(n=1;n<=5;)
sum = sum + n;
4 for(n=1;;n = n+1)
sum = sum + n;
5 for(n=1;n<5;n++)
n=n-1;

45.
Find errors if any
1 if(x+y = z && y>0) printf( );
2 if(code>1); a = b+c;
else a=0;
3 if(p<0) || (q<0) printf( sign is negative);
46.
Assuming x = 100, state whether the following logical expressions are true or false
1 x==100&&x>100&&!x
2 x==100||x>100&&!x
3 x==100&&x>100||!x
4 x==100||x>100||!x
47.
Assuming that x = 10, y = 0 and z = 5 initially what will be their values after the
code segments are executed?

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


10

1 if(x&&y) x = 100;
else y = 100;
2 if(x||y||z) y = 100;
else z = 100;
3 if(x)
if(y)
z = 100;
else z = 0;
4 if(x==0 ||x & & y)
if(!y)
z = 0;
else y = 5;
48. What is a null statement? Explain a typical use of it.
49. How is a for loop used when the number of iterations are not known?
50.
What is the output of the following code segments?
1 count =5;
while(count-- > 0) printf(%d,count);
2 count =5;
while(--count > 0) printf(%d,count);
3 count =5;
do printf(%d,count); while(count > 0) ;
4 for(m=10; m>7;m-=2)
printf(%d,m);
51.
Compare in terms of their execution
1. Whileanddowhile
2. Whileandfor
3. Breakandgoto
4. Breakandcontinue
5. Continueandgoto
52.
Write a for statement to print the following sequences of integers
1. 1,2,4,8,16,32
2. 1,3,9,27,81,243
3. 4,2,0,2,4
4. 10,12,14,18,26,42
53.
When do we use the following statements
1. for(;;)
2. while(true)
3. while(1)
54.
How does a programmer decide the use of one of the three loops in C for a given
problem?

Chapters 7,8,9: Arrays, Character arrays and strings, User defined functions

Objective: The unit describes the arrays and also discuss about the need for functions,
category of functions. The unit also deals with character arrays and the library functions
used to work on the arrays.

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


11

55. Briefly discuss how arrays are declared and initialized in C.
56.
Write a program in C to read N integers(N <=100), find the average of these and
print the average along with given N numbers and amount by which each of these
N numbers differ from the average.
57.
Write a C program using function with a given n, calculates and returns n! for input
ranging from 0 to n.
58.
With suitable examples illustrate call by value and call by reference techniques of
passing parameters in C.
59.
What is an array? Discuss how one dimensional arrays can be declared and their
elements are accessed.
60.
Write a program to check whether an array is ordered. If ordered print a suitable
message as ascending or descending else not ordered.
61. Write a program to get row-sums in a matrix of size m x n.
62. Explain any five functions in character handling library?
63. Explain any five string conversion functions.
64. Explain any five functions in standard input out put library
65. Explain any four string manipulation functions of the string handling library.
66. Explain any two comparison functions of string handling library
67. Write any five search function of the string handling library.
68. Explain any five memory functions of string handling library.
69.
Explain the function :
1. strerror
2. strlen
70. Write a c program that counts characters in a string.
71.
Write a c program to concatenate two strings without using the library function
strcat.
72.
Write a c program that accepts a string of characters until a $ symbol is pressed
and displays the string replacing white spaces such as tab, new line and carriage
return by a single space.
73. Explain different ways of input output of strings.
74. Explain the method of declaration and initialization of strings.
75. What is a data structure? Why an array is called a data structure?
76. What is a dynamic array? How is it created?
77.
What happens when an array with a specified size is assigned
1. Withvaluesfewerthenthespecifiedsize
2. Withvaluesmorethanthespecifiedsize
78.
Identify errors in the initialization statements
1. intnum[]={0,0,0,0,0};
2. floatnumb[3][2]={0,1,2,3,4,5};
3. charword[]={A,R,R,A,Y};
4. intm[2,4]={(0,0,0,0)(1,1,1,1)};
5. floatres[0]=0;
79.
Explain how the feature of character strings being terminated by null character
helps in string manipulation.
80.
How does main that is a user defined function differ from other user defined
functions?

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


12

81. Describe the ways of passing parameters to the functions with examples.
82.
Distinguish between
1. Actualandformalarguments
2. Globalandlocalvariables
3. Automaticandstaticvariables
4. Scopeandvisibilityofthevariables
5. &and*operator
83. What are the rules that govern the passing of arrays to a function?
84. Write a function to find the largest element of an m by n matrix.

Chapters 10,11: Structures , Unions and Pointers
Objective: This unit gives an idea about the structures, Unions and Pointers. It also deals
with the enumerated data types.
85.
What is a pointer? Mention the advantages of pointers and list out the operations
used with pointers.
86. Explain the difference between structure tag and structure variable with example.
87. Explain with examples how the structure is initialized.
88. Explain the difference between structure and union with examples.
89. What is a structure? Explain the structure definition.
90.
Demonstrate how pointer can be used to access data items of structure with in a
structure.
91.
Create an array of 10 elements where each element is a structure with the following
fields: IDNO, NAME, MARKS and AGE. Read data into this array. Find the average
marks of these 10 students and also display the name of youngest student.
92. Explain the operators that are used to access members of structures.
93. Explain key word typedef with example
94. Compare structures and unions.
95. Compare structures and arrays.
96. Explain enumerated data types.
97. Explain enumerated data types.
98. Explain the concept of structures within structures.
99. What is a slack byte? How does it affect the implementation of structures?
100.
Describe the different approaches that can be used to pass structures as function
arguments?
101.
What is the error in the following code?
typedef struct product
{
char name [ 10 ];
float price;
}PRODUCT products [ 10 ];
102. What are the arithmetic operators permitted on pointers? Give examples.
103. Distinguish between (*m)[5] and *m[5].
104. Explain the concept of const qualifier with pointers.
105.
Write a c program to accept an array and print it in reverse order. Use a pointer
variable p that points to the elements of the array
106. What are the advantages of using pointers?

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


13

107. What is the difference between the name of the array and pointer to an array?
108. Explain about pointer comparisons with examples.
109. What is a pointer to pointer? Explain with examples.
110. Explain the concept of arrays of pointers?
111. Explain pointers to function.
112.
Find the error if any
1. intx=10;
2. int*y=10;
3. inta,*b=&a;
4. intm;int**x=&m;
113.
Given the following declarations int x = 10, y= 10;
int *p1 = &x, *p2 = &y;
What is the value of the following expressions?
1. (*p1)++;
2. (*p2);
3. *p1+(*p2)
4. ++(*p2)*p1
114.
There are two different definitions of the function search(). Are they equivalent?
Explain.
void search(int* m[], int x){}
void search(int** m, int x) {}
115.
Which one of the following is the correct way of declaring a pointer to a function?
1. int(*p)(void);
2. int*p(void);
116.
Write a program to read an array of integers using pointers and print the elements
in the reverse order.
117.
Write a function using pointer parameters that compares two integer arrays to see if
they are identical. The function returns a 1 if they are identical, 0 otherwise.
Chapters 12,13,14: File Management, Memory Management in C, The
Preprocessor

Objective: This unit deals with the concepts of files in C. It deals with the different modes
and functions. It also deals with dynamic memory management with the understanding of
malloc, calloc and realloc functions. We also understand the C preprocessor and the
macros.
118. How does an append mode differ from write mode?
119. What is the significance of EOF?
120.
Distinguish between
1. getcandgetchar
2. printfandfprintf
3. feofandferror
121. Explain the general format of fseek function.
122. What are the common uses of rewind and ftell functions?
123.
Find error if any
FILE fptr;
fptr = fopen (data, a+);

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


14

124.
What is the output of
1 while ((c=getchar() !=EOF)
putc(c, f1);
2 while ((m=getw(f1) !=EOF)
printf(%5d,m);
3 for(i=1;i<=5;i++)
{
fscanf(stdin,%s,name);
fprintf(fp,%s, name);
}
125. What is the purpose of using feof and ferror in a program?
126.
Write an algorithm that will append the contents of one file to the end of another
file.
127.
Write a program that reads a file containing integers and appends at its end the
sum of all the integers.
128. Explain the concept of command line arguments. What are its uses?
129. What is argc and argv in command line arguments concept?
130. Explain the role of C preprocessor.
131. Explain #include preprocessor directive
132. Explain the concept of macro and symbolic constant.
133. Explain conditional compilation.
134. What is the purpose of #error and #pragma directive?
135. What is the difference between # and ## operators?
136. Explain predefined symbolic constants.
137. Write a c program to implement nesting of macros.
138. Distinguish between #ifdef and #if directives.
139.
Identify the errors if any
1. #defineuntil(x)while(!x)
2. #defineABS(x)(x>0)?(x):(x)
3. #ifdef(FLAG)
#undefFLAG
#endif
4. #ifn==1update(item)
#elseprintout(item)
#endif
140. Enumerate the differences between functions and parameterized macros.
141.
Differentiate between calloc and realloc function.
142.
What is dynamic memory allocation? What are memory allocation functions?
143.
What is malloc? Explain with an example.
144.
Write a c program to store a character string in a block of memory space created by
malloc and then modify the same to store a larger string.
145.
Find errors is any,
1. *ptr=(int*)malloc(m,sizeof(int));
2. table=(float*)calloc(100);

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


15

3. node=free(ptr);
146.
What is the output of
1 int * p;
p = malloc(sizeof(int));
2 float *p;
p = calloc(10, sizeof(float));
3 int i, *ip;
ip = calloc(4, sizeof(int));
for(i=0;i<4;i++) *ip++ = i * i;
for(i=0;i<4;i++) printf(%d\n,*-ip);
4 int *p;
p = malloc(sizeof(int));
*p = 100;
P = malloc(sizeof(int));
*p = 111;
printf(%d,*p);
147. What is the principal difference between malloc and calloc?







DISCRETE MATHEMATICS

Subject Code:10MCA12 Hours/Week: 4
Faculty: Dr.R.Chandrasekhar Total Hours: 52

This course develops basic mathematical skills needed for the study of computer science
subjects. Here we deal with the following main topics- Set theory, Fundamentals of Logic,
Mathematical Induction, Relations and functions, Graph Theory, Algebraic Structures. The
concepts of Set theory are used in switching circuits. The logic of mathematics is applied to
decide whether one statement follows from or is a logical consequence of one or more other
statements. The concept of function complexity and its role helps in the study of the analysis of
algorithms. Study of Graph theory helps in study of data structures searching and sorting
techniques. Algebraic Structures is useful in the study of Cryptology, coding theory and counting
Methods.

Class
No.
Chapter title Topics Covered
% of portion
covered
Unitwise Cumu-
lative
Chapters: Set Theory & Fundamentals of Logic
17 17
1
Book: T1

Chapter No.
2 & 3

2.1,3.1, 3.2,
Basic concepts of set theory- Definitions-
Examples, set operations.
2
Laws of Set Theory- Examples
3
Counting and Venn Diagrams
4
Probability.

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


16

5
3.3, 3.4

Countable and uncountable sets Examples
6
Problem solving.
7
Introduction to Logic
8
Basic Connectives and Truth Tables.
9
Problems
Chapters: Fundamentals of Logic
19 36
10
Book: T1


Chapter N0. 2

2.2,2.3,
2.4,2.5


Logical Equivalence
11
Problems on connectives
12
Laws of Logic
13
Principle of duality
14
Problems on Principle of duality
15
Logical Implication
16
Rules of Inference
17
Problems on Rules of Inference
18
Quantifiers, definitions
19
Use of quantifiers and proof of theorems
Chapters: Relations & Functions
19 55
20

Book T1


Chapter No.
4 & 5

4.1,4.2,5.1

The Well Ordering Principle- Definition-
Examples
21
Problems
22
Mathematical Induction
23
Problems
24
Recursive Definitions
25
Examples
26
Miscellaneous problems
27
Introduction to Relations, Examples
28
Cartesian Products and Relations
29
Problems
Chapters: Relations & Functions(Continued)
21 76
30
Book: T1

Chapter No.
5 & 7

5.2 to 5.6
7.1 to 7.4

Introduction to functions, Plain and One to
One functions, Examples
31
Onto Functions Stirling Numbers of the
Second Kind, Examples
32
Special Functions
33
The Pigeon-hole Principle
34
Function Composition and Inverse Functions,
Problems
35
Properties of Relations
36
Computer Recognition Zero-One Matrices
37
Directed Graphs
38
Partial Orders Hasse Diagrams
39
Equivalence Relations - Problems
40
Partitions - Examples

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


17

Chapters: Groups, Coding Theory & Rings, Modular Arithmetic
24 100
41





Book: T1

Chapter No.15

15.1 to 15.3
15.5 to 15.9
Groups-Definition-Examples-Elementary
properties
42
Homomorphisms- Isomorphisms- Examples.
43
Cyclic Groups
44
Cosets Lagranges Theorem
45
Elements of Coding theory-The Hamming
Metric
46
The Parity Check- Generator Matrices
47
Decoding with Coset Leaders
48
Hamming Matrices
49
The Ring Structure Definition -Examples
50
The Ring Properties -Substructures
51
The Integer Modulo n
52
Problems






TEST SYLLABUS:
Test 1: Chapters: 2, 3 Test 2: Chapters: 4, 5 Test 3: Chapters: 7, 15.


LITERATURE:

Book
Type
Book
No.
Book Title Authors
Publication Information
Edition Publisher Year
Text
Book
T1
Discrete and
Combinatorial
Mathematics, an
Applied Introduction.
Ralph
P.Grimaldi
&
B.V.Ramana

5
th

Edition
Pearson
Education
2004
Reference
Book
R1
Discrete Mathematics
and its Applications
Kenneth H.
Rosen
6
th

Edition
McGraw Hill 2007
Reference
Book
R2
A Treatise on Discrete
Mathematical
Structures
Jayant
Ganguly

---
Pearson
Education
2010
Reference
Book
R3
Discrete Mathematical
Structures- Theory &
Applications
D.S.Malik
and M.K.Sen

----
Thomson 2004



Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


18


























QUESTION BANK
Chapters: 2&3
Set Theory & Fundamental Logic:
Objective: This unit introduces basic concepts of sets and counting principles. And the basic
concepts of fundamental logic. The concepts of Set theory are used in switching circuits. The
logic of mathematics is applied to decide whether one statement follows from, or is a logical
consequence of one or more other statements.

Questions:
1) Define the following and give an example to each
i) Empty set ii) Power set iii) Multiset iv) Ordered set
v) Symmetric difference of two sets
2) If A and B are 2 sets show that (AUB) = A B
3) State and establish the principle of inclusion and exclusion.
4) Show that the symmetric difference of 2 sets is commutative.
5) Prove that symmetric difference is associative.
6) Show that
(1) A X (B C) = ( A X B ) (A X C)
(2) A X (B U C) = ( A X B ) U (A X C)
(3) A (B - C) = (A B) C
(4) (A - B) (A - C) = A - (B U C)
(5) (A B) C = (A C) (B C)
7) Prove that for any three sets A,B,C
(i) A B A B
(ii) A (B C) (A B) (A C)
(iii) A (B C) (A B) (A C)
=
=
=

8) Let X be the set of all students at a university. Let A be the set of students who are
first year students, B the set of students who are second-year students, C the set of
students who are in a discrete mathematics course, D the set of students who are
international relations majors, E the set of students who went to a concert on Monday
night, and F the set of students who studied until 2 A.M. on Tuesday. Express in set

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


19

theoretic notation the following sets of students:
(a) All second-year students in the discrete mathematics course.
(b) All _rst-year students who studied until 2 AM on Tuesday.
(c) All students who are international relations majors and went to the concert on
Monday night.
(d) All students who studied until 2 AM on Tuesday, are second-year students, and
are not international relations majors.
(e) All _rst- and second-year students who did not go to the concert on Monday
night but are international relations majors.
(f) All students who are _rst-year international relations majors or who studied until
2 AM on Tuesday.
(g) All students who are _rst- or second-year students who went to a concert on
Monday night.
(h) All _rst-year students who are international relations majors or went to a concert
on Monday night.
9) Write three descriptions of the elements of the set (2, 5, 8, 11, 14).
10) Which of the following pairs of sets are equal? For each pair that is unequal, and an
element that is in one but is not in the other.
(a) {0, 1, 2} and {0, 0, 1, 2, 2, 1} (b) {0,1,3,{1, 2}} and {0,1,2,{2, 3}}
(c) {{1,3,5}, {2,4,6}, {5,5,1,3}} and {{3,5,1}, {6,4,4,4,2}, {2,4,4,2,6}}
(d) {{5,3,5,1,5}, {2,4,6}, {5,1,3,3}} and {{1,3,5,1}, {6,4,2}, {6,6,4,4,6}}
(e) and {x N : x > 1 and x
2
= x } (f) and { }
11) Let A = {1;2;3; : : : ; 10}; B = {2;3;6;8}; and C = {3;5;4;8;2}: Find the following:
(a) B UC (b) B C (c) B C (d) A B (e) A C
12) Find three sets A, B, and C where A _ B U C but A . B and A . C where
A = {2,3,4}. B = {1,2,3}. C = {3,4,5}.
13) In a class of 35 students who are either biology majors or have blonde hair, there
are 27 biology majors and 21 blondes. How many biology majors must be blonde?
14) A tennis camp has 39 players. There are 25 left handed players and 22 players have
a two-handed back stroke. How many left-handed players have a two-handed back
stroke if every player is represented in these two counts?
15) A marketing class did a sample survey to _nd out how many of a class of 125 people
owned CD's of the Beatles, Alabama, or Bob Marley. The results of the survey showed
the following:
Recording Artist No. of Students Owning CD's
Beatles 65
Alabama 46
Bob Marley 29
Beatles & Alabama 18
Beatles & Bob Marley 21
Bob Marley & Alabama 12
Beatles, Bob Marley, & Alabama 9
How many of the students owned no CD featuring these performers?
16) How many integers between 1 and 250 are divisible by 3 or 5?
17) How many numbers between 1 and 1000 are not divisible by 3, 7, or 9?
18) Find the number of integers between 1 and 1000, including 1 and 1000, that are not
divisible by any of 4, 5, or 6.
19) 30 cars were assembled in a factory. The options available were a radio, air
conditioner, white wall tyres. It is known that 15 of the cars have radios, 8 of them
have air conditioner and 6 of them have white wall tyres, 3 of them have all three
options. Determine at least how many cars do not have any options at all.
20) In a survey of 254 college students, the following data were obtained:64 had taken
Mathematics course, 94 had taken Physics course, 58 had taken chemistry course,
28 had taken both Mathematics and chemistry course, 26 had taken both
Mathematics and Physics course, 22 had taken both Physics and chemistry course,
and 14 had taken all three types of courses. Find how many of these students had
taken none of the three courses?

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


20

21) Define with an example
(i) Statement (ii) Well-defined formula (iii) Tautology
(iv) Contingency (v) Contradiction
22) Show that the truth values of the following statements are independent of the truth
values their components.
(1) (P ^ (PQ)) -> Q
(2) (P Q) (~P v Q)
(3) Determine whether the following compound statement is tautology or not:
[(p q) ^(q r)] (p r)
23) Show that S v R is tautologically implied by (P v Q), (PR) and (QS).
24) (a) Show that the set of all finite sequences of elements of the one element set {0}
is countably infinite.
(b) Show that the set of all finite sequences of elements of the two element set
{0,1} is countably infinite.

Fundamental Logic:
Objective: In this chapter we study the fundamentals of logic .Also, this involves truth tables
and proofs using reasoning or inference theory. In computer science, logic has many applications
in areas such as database theory, artificial intelligence, program language design, and automated
verification of software and hardware.Also,used in digital electronics for different type switches or
gates.

Questions:
25) Define the basic connectives and give their truth tables.
26) What is logical equivalence? Define and give examples.
27) Show that S v R is tautologically implied by (P v Q), (PR) and (QS).
28) Define Tautology and contradiction. Prove that for any propositions p, q, r the
compound proposition {P (Q R)} { (P Q) (P R)} is a Tautology.
29) Construct a truth table to show that

( ) (( ) ( )) p q p q q p .
is a tautology.
30) Let proposition p be T, proposition q be F, and proposition r be T. Find the truth
values for the following:
(a) p v qv r (b) p v (q . r) (c) p (q v r) (d) (q. p) r
(e) r (p . q) (f) (p q) r (g) ((p . r) (q v p)) (q v r).
31) A restaurant displays the sign \Good food is not cheap" and a competing restaurant
displays the sign \Cheap food is not good." Are the two restaurants saying the same
thing?
32) Let U be the set of all human beings living in the year 2001, and translate the
following English sentences into quanti_ed formulas. Let P(x) stand for x is young,
Q(x) for x is female,and R(x) for x is an athlete.
Express symbolically each of the statements:
(a) All athletes are young (b) Not all young people are athletes
(c) All young people are not athletes (d) Some young people are not athletes
(e) Some athletes are young females (f) All athletes are young males
(g) Some athletes are female and are not young
(h) Some young females are not athletes (i) All young females are athletes
(j) Some athletes are not young (k) No young people are athletes
(l) All athletes are either female or are young
(m) If all athletes are female, then all athletes are young; otherwise, no
athletes are young.
33) Prove the following by using the laws of logic:
i) P (q r) (p. q) r
ii) [(~P . (~q . r)] v [(q . r) v (p . r)] r

34) Using the rules of inference, show that the following argument is valid:
P
P p

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


21

S v r
r q
s v t

Properties of the Integers & Relations:
Objective: Here as an application of sets, relations are defined. Different types of relations are
defined and their properties are discussed. In particular, equivalence relations are studied in
detail.

Questions:
35) Define: i) Well-ordering principle
ii) Principle of mathematical induction.
36) Show that for n = 0, 1, 2 the following is true
1
2
+ 2
2
+ 3
2
+ .. + n
2
= n(n + 1)(2n + 1)/6 for n 0
37) By mathematical induction, prove that n! 2
n-1
, for all n 1.
38) Prove by induction:
1
3
+ 2
3
+ 3
3
+ .. + n
3
= (1 + 2 + 3 + _ _ _ + n)
2
for n 0
39) Prove by induction that the sum of the cubes of any three consecutive natural numbers
is divisible by 9.

40) Let A = {0; 3} and B = {x; y; z}: Find the following:
(a) A x B (b) A x A x B (c) B x A (d) B x A x B

41) Let A={1,2,3,..,10}.Let
R={(1,2),(1,4),(1,6),(1,8),(1,10),(3,5),(3,7),(4,6),(6,8),(7,10)} be a relation on A.
Let S ={(2,4),(3,6),(5,7),(7,9),(8,10),(8,9),(8,8),(9,9),(3,8),(4,9)} be a second relation
on A.
Find:(a) R S (b) S R:
42) Define Cartesian product of sets, with example.
Show that i) A X (B U C) = ( A X B ) U (A X C)
ii)(A U B) X C = (A X C) U (B X C)

Relations and Functions:
Objective: Here as an application of sets, relations are defined. Different types of relations are
defined and their properties are discussed. In particular, equivalence relations are studied in
detail. : Searching and sorting operations are based on relations. Relations concepts can be
applied in relational database.

Questions:
43) If R
1
and R
2
are equivalence relations, prove that R
1
R
2
is an equivalence relation.
44) Show that an equivalence relation R on a non-empty set A determines a partition of A.
45) Define an equivalence relation. Let A = {1,2,3,6}. Define R on A by aRb if a divides
b. Show that R is an equivalence relation. Find the partition of A generated by R.
46) Define a partition of a set with an example.
47) Given A = { 1,2,3,4} and R = {(1,1),(1,2),(2,1),(2,2),(3,3),(3,4),(4,3),(4,4)},
determine whether the relation R is reflexive, symmetric, anti symmetric or transitive.
48) Define the composition R

S of relations R and S. In the usual form,
prove that (S

R)
-1
=R
-1

S
-1
49) Define partition of a set with example. If A=Z(set of all integers) and
R={ (a,b) AXA/2 divides (a-b)} is a relation on A, then show that R is an equivalence
relation.
50) Define matrix representation of relation with example. If
R={(1,1),(1,2),(1,3),(1,4),(2,2),(2,4),(3,3),(4,4)} is a relation on A={1,2,3,4} then
find digraph of R and list in-degree, out-degree of all vertices.
51) For a fixed integer n>1, prove that the relation Congruent modulo n is an equivalence
relation on the set of all integers, Z.
52) Let A={1,2,3,4,5,6,12}. On A, define the relation R by aRb if and only if a divides b.

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


22

Prove that R is a partial order on A. Draw the Hasse diagram for this relation.
53) Which of the following are functions? If not, why not?
(a) X is the set of students in a discrete mathematics class. For x X,define g(x) to be
The youngest cousin of x.
(b) X is the set of senators serving in 1998. For x 2 X, define g(x) to be the number of
terms a senator has held.
54) What are the domain and range of the addition function on the real numbers?
Multiplication? Subtraction? Division?
55) Let X = {1; 0; 1; 2}and Y = {4;2; 0; 2}: Define the function F :X Y as
F(x) = x
2
x: Prove that F is neither 1-1 nor onto.
56) Let A = {1,2,3,4} and B ={a,b,c}. Define a function F : A B as F(1) = a, F(2) = b,
F(3) = c, and F(4) = c, List the ordered pairs of the equivalence relation R defined on A
as xRy if and only if F(x) = F(y). List the elements of the partition of A determined by
this equivalence relation.
57) Let X = {1,2,3,4} and Y = {5,6,7,8,9}: Let F = {(1,5), (2,7), (4,9),(3,8)}.
Show that F is a function from X to Y . Find F
1
and list its elements. Is F
1
a
function? Why, or why not.

58) Let X ={1,2,3,4}. Let F : X R be a function defined as the set of ordered pairs
{(1,2),(2,3),(3,4),(4,5)}. Let G : RR be the function defined as G(x) = x
2
. What is
G F?
59) Prove that in any class of more than 101 students; at least two students must receive
the same grade for an exam with grading scale of 0 to 100.
60) A man has 10 black socks and 11 blue socks scrambled in a drawer. Still half asleep the
man reaches in the drawer to get a pair of matching socks. How many socks should
he select, one at a time, before he will be sure that he has a matching pair. How
many selections are needed to be sure he has a blue pair?
61) Let A = {1,2,3,4}. Let R be a relation on A, defined by xRy iff x/y and y=2x. Find
i) R is relation of set of ordered pairs
ii) Draw digraph of R
iii) Determine in degree and out-degree of all vertices.

Groups, Coding Theory and Rings; Group Codes, Rings and Modular Arithmetic:
Objective: In this unit we examine properties shared by particular mathematical systems. Then
we generalize our findings in order to study the underlying structure common to cryptology,
coding theory and sime counting methods.

Questions:
62) Prove that symmetric difference is commutative operation on sets.
63) Let * be a binary operation on N with m*n = m + n + k where k is a constant. Show
that * is commutative and associative.
64) Show that (N,*) is a semigroup where x*y = min{x,y} for any x,y N. Is (N,*) a monoid.
65) Which of the following functions f are homomorphism from (Z
+
,+) to (Z
+
,.)? Which of
them are isomorphic.
(i) f(n) = 2
n
(ii) f(n) = n (iii) f(n) = 2n (iv) f(n) = (-1)
n
(v) f(n) = 3
n+1

66) Let G = {q Q|q -1}. Define the binary operation on G by x y = x + y + xy.
Prove that (G,) is an abelian group.
67) Define the following algebraic structures, giving an example for each:
i) Monoid ii) Semigroup iii) Group iv) Normal Group
v) Homomorphism and Isomorphism of groups.\
68) If G is a group, prove that for all a,b G, (i) (a
-1
)
-1
= a (ii) (ab)
-1
= b
-1
a
-1
.
69) A binary symmetric channel has probability p = 0.5 of incorrect transmission. If the
code word is c= 011011101 is transmitted, what is the probability that (a) we
receive r = o11111101? (b) we receive r = 111011100? (c) a single error occurs?
(d) a double occurs? (e) a triple error occurs? Three errors occur, no two of them
consecutive?
70) What is the minimum distance of a code consisting of the following code words:

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


23

001010, 011100, 010111, 011110, 101001?
71) Use the parity check matrix H given below to decode the following received words:
(i) 11101 (ii) 110101 (iii) 001111 (iv) 100100 (v) 110001 (vi) 111111
(vii) 111100 (viii) 010100.

H =
(
(
(

1 0 1 1 0 0
1 1 0 0 1 0
0 1 1 0 0 1

72) Construct a decoding table (with syndromes) for the group code given by the generator
matrix G=
(

1 1 0 1 0
0 1 1 0 1
, using the decoding table, decode the following received
words, 11110, 11011, 10000, 10101.
b) Show that Z5 is an integral domain.
c) Prove that Zn is a field iff n is a prime.


FUNDAMENTALS OF COMPUTER ORGANIZATION

Subject code: 10MCA13 Hours / Week: 4
Faculty: Mrs. Prema Latha H M Total Hours : 52


Computer organization is a study of functionality of the computer system. It comprised of
various components and their interconnection. The study also focuses different memory system
and performing various operations. As a part of structural study logic gates and their
interconnection to represent Boolean function also incorporated.

Class
#
Chapter # Topics to be covered
% of Portion
covered
Chapter
- wise
Cumula
tive
1


Chapter 1 :
Number
systems and
Logic gates
T1:Chapters 2.1
To 2.4, 2.6 To
2.8, 3.1 To 3.10
Counting in decimal and binary, place
value, binary to decimal conversion




14%




14%
2
decimal to binary conversion, hexadecimal
numbers, octal numbers,
3
bits, bytes, nibbles and wordsize, AND
gate, OR gate, NOT(inverter) and buffer,
4
NAND gate, NOR gate, EX-OR gate, EX-
NOR gate,
5 NAND gate as an universal gate,
6 Gate with more than two inputs,
7 Using Inverters to convert gates.
8


Chapter 2:
Combining
logic gates and
arithmetic
circuits
T1:Chapters
4.1 To 4.9,
4.16, 10.1 To
10.11
Constructing circuits from Boolean
expression, drawing a circuit from a
maxterm Boolean








17%










31%


9
truth tables and Boolean expressions,
sample problem simplifying Boolean
expression
10
karnaugh maps, karnaugh maps with
three variables,
11
karnaugh maps with four variables
12
more karnaugh maps, using demorgans
theorem,

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


24

13





Chapter 3:
Basic structure
of computer
T2: Chapters
1.1 To 1.4, 1.6,
2.2
Binary Addition, half adders, full adders,
three bit adders, Binary subtraction, parallel
subtractors,










12%










43%
14

IC adders, Binary multiplication, Binary
multipliers, 2s complement notation
15 addition and subtraction, 2s complement
adder/subtractor
16
17
Computer types,
18
Functional units
19 Basic Operational Concepts,
20 Bus Structures
21
Performance,
Memory Locations and addresses
22
23
Chapter 4:
Machine
instruction and
programs
T2:Chapters
2.3 To 2.7
Memory operations, Instructions and
Sequencing, Basic Instruction types
15% 58%
24
25 Instruction Execution and Straight Line
Sequencing, Generating Memory
addresses
26
27
28 Addressing modes
29 Assembly Language, Basic I/O Operations
30
31
Chapter 5:
Input/Output
organization
T2: Chapters
4.1, 4.2, 4.4 To
4.6.
Accessing I/O Devices
15% 73%
32 Interrupts
33 Direct Memory Access (DMA)
34 Buses 240 :
Synchronous bus
asynchronous bus
35
36
37
38
Interface circuits:
Parallel port, serial port
39
Chapter 6:
Memory
system
T2:Chapters
5.1 To 5.5, 5.7.
Basic Concepts, Semiconductor RAM Memor
15% 88%
40
Static Memories, Asynchronous DRAMs
41
Synchronous DRAMs
42
Memory system considerations
43
RAMbus Memory, Read Only Memory
44
Cache Memories
45 Virtual Memories
46
47
Chapter 7:
Arithmetic unit
T2:Chapters
6.1 To 6.7
Addition of Signed Numbers
12% 100%
48
Subtraction of Signed Numbers
49
Design of Fast Adders
50
Multiplication of Positive Numbers
51
Signed-Operand Multiplication: Booth
Algorithm, Fast Multiplication.
52
Bit Pair recoding of Multipliers, Integer
Division, Floating Point Numbers and
Operations

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


25










TEST SYLLABUS
Test 1: Chapters: 1, 2

Test 2: Chapters: 2, 3,4

Test 3: Chapters: 5, 6, 7

LITERATURE:

BOOK
TYPE
BOOK
NO. BOOK NAME AUTHOR
PUBLICATION INFORMATION
Edition Publisher year
Text
Book
T1
Digital
electronics
principles and
applications

Tokheim
6
th
edition
McGraw
Hill
2004
Text
Book
T2
Computer
Organization
V.C.Hamacher
Z.G.Vranesic.
S.G.Zaky
5
th
edition
McGraw
Hill
2002
Ref
Book
R1
Digital logic and
computer design

Morris Mano
27
th

edition
Pearson
education 2002
Ref
Book

R2
Logic and
computer design
fundamentals
Morris Mano
and Charles R
Kime
2
nd

Edition
Pearson
education 2001






















Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


26











QUESTION BANK

1. Convert octal to decimal : 753
2. Convert hexadecimal to decimal : 3E67
3. Explain the basic gates with diagram.
4. Comment on The NAND gate as an universal gate
5. Explain the purpose of inverters.
6. Brief out the terms bits, bytes and nibbles.
7. Explain about places values.
8. Draw the diagram of gates with more than 2 inputs.

1. What is K-map?
2. simplify the Boolean expression:
ABC+ABC+ABC+ABC=Y
ABC+ABC+ABC+ABC=Y
3. Explain half adder.
4. Explain Full adder.
5. Write short notes on Parallel adder.
6. Define Boolean algebra? Give out Demorgans law.
7. Explain 2s complement adder/subtractor.
8. Explain about binary half subtractor.
9. Brief out about full subtractor.
10. Explain 4 variable k-map with an example of Boolean expression.

1. Explain the functional units of a digital computer.
2. Explain different registers that are available in a processor of a digital computer.
3. What is a bus? How it affects the performance of a computer.
4. What are the different types of computer?
5. Explain basic operations of computer with the help of diagram.
6. Differentiate single bus structure from multiple bus structure.


CHAPTER 1: Number systems and Logic gates
Objective: This chapter gives focus on number systems in computer system and essence of
basic logic gates to construct logic circuits.

CHAPTER 2:Combining logic gates and arithmetic circuits
Objective: This chapter concentrates on Boolean expression, simplification of Boolean
expression and various circuits used for arithmetic operation.

CHAPTER 3: Basic Structures of Computer
Objective: This chapter gives overview about the digital computers, their types, function
units of a computer and basic operations of a computer.

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


27

CHAPTER 4:Machine instructions & Programs
Objective: This chapter gives overview about Memory operations, Instruction execution,
branching, Addressing modes, Assembly Language and basic i/o operations.
1. Explain Byte addressability & Big-endian Assignment.
2. What are assembler directives? Explain any two directives.
3. What is an addressing mode? Explain different types of addressing modes.
4. What are the types of instructions?
5. Explain basic input/output operation.

CHAPTER 5:Input/Output Organization
Objective: This tells how the I/O devices communicates with memory directly or indirectly
through some supportive devices and also briefs out ports.

1. What are Interrupts?
2. Explain DMA (Direct Memory Access)
3. What are Interrupts? How computer handles the interrupts?
4. Explain synchronous bus structure with timing diagram.
5. List and explain the sequence of steps that takes place when an interrupt is received by
CPU.


CHAPTER 6: Memory Systems
Objective: This chapter gives overview about Semiconductor RAM memories, Internal
memory organization, Read only Memories, Cache and Virtual memories.

1. Explain the internal organization of 2M X 8 dynamic memory chip.
2. What is cache? Explain any two cache mapping functions.
3. Explain with a neat diagram how write and read operations takes place in 1K X 1 memory
chip.
4. Explain different types of ROMs.
5. Explain the working of Static RAM cell.
6. Explain the internal organization of 16 X 8 memory chip.
7. Discuss DRAM with its block diagram.

CHAPTER 7: Arithmetic Unit
Objective: This chapter discusses about Addition and subtractions of signed numbers,
Fast Adders, Multiplication of positive numbers, Multiplication of negative numbers, Booths
Algorithm, Integer division, Floating point numbers and its operations.

1. Explain Carry-look ahead adder. Explain the operation of carry look ahead adder
2. Explain Bit pair recoding method of multiplying two signed numbers with an example.
3. With a neat diagram explain floating point addition/subtraction unit.
4. Discuss the working of a 4-bit carry look ahead adder.


-------------------------------









Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


28










Introduction to UNIX

Subject code: 10MCA14 Hours/Week: 04
Faculty: Mr. Chengappa B S Total Hours : 52

UNIX is vastly different from other operating systems. After three decades of use, the
UNIX computer operating system from Bell Labs is still regarded as one of the most powerful,
versatile, and flexible operating systems (OS) in the computer world. Its popularity is due to
many factors, including its ability to run a wide variety of machines, from micros to
supercomputers, and its portability -- all of which led to its adoption by many manufacturers. We
will learn to play with the UNIX system and acquire familiarity with some of its commands that
are used everyday for interacting with the system.

Class
No
Chapter title Topics Covered
% of portion
covered
Chapter
wise
Cumul
ative
General Purpose Utilities Navigating File System and Handling
ordinary Files
20 20
1
T1:
Chapter No. 1,
2,3,4,5.
1.2,2.1-
2.9,3,4,5.1-5.12


Introduction unix operating system, features,
2 Banner, cal, date, who, printf, echo, tput, bc
3
tty, sty, uname, passwd, lock, script, spell and
ispell
4
The file, whats in filename? The parent-child
relationship
5 pwd, the home directory, absolute pathnames
6 The UNIX file system
7 Cat ,cp, rm, mv, more
8
Lp, file, wc, od
9
Rmdir, Relative pathnames
10 split, cmp, comm., diff
The vi editor and Basic File Attributes
24 44
11
T1:
Chapter No.
6,7,8,9,10
The three modes, input mode,
Saving, the repeat factor, command mode
12
Deletion, navigation, pattern search, joining lines
13
Repeating the last command, undoing the last
editing instructions, search and replace.
14 ls l and -d option, file permissions, chmod

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


29

15
Users and groups, security level,changing
permission, user masks
16
Changing ownership and group
17
Interpretive cycle, Shell offerings, Pattern
matching,
18 escaping and quoting, redirection
19
Sleep and wait, while , until, for
20
The here document, set, trap, sample validation
and data entry scripts
21
Basics, PS, internal and external commands,
running jobs in background
22
Basics, PS, internal and external commands,
running jobs in background
More file attributes and Simple Filters
16 60
23

T1:
Chapter No.
11,12
System variables, profile, sty, PWD
24
aliases, command history, on-line command
editing
25 Hard link, symbolic link
26 umask, find
27 pr, head, tail
28 Cut, paste, sort
29 Uniq, tr commands
30
Administartors privileges

Filter using Regular Expression and Shell Programming, Advanced
vi
24 84
31
T1:
Chapter No.
13,14,15
Grep, Regular Expression
32 Grep, Regular Expression
33 Line addressing, inserting and changing Test
34
Context addressing, writing selected lines to a
file

35
The f option, substitution, properties of
Regular Expressions
36 Shell scripts, read, exit
37 Example shell programs
38 Test Expression, the case conditional expr
39
Merging streams, Shell functions,exec
statement

40
Operators, the ex mode, named buffers,
Numbered buffers
41
Entering control characters, Searching for a
characters

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


30

42 Searching for a character
43
Marking Text customising

44
Vi usage

awk-Advance Filters and Advanced Shell Programming
16 100
45
T1:
Chapter No.
18,20,21
Simple awk filtering, splitting
46
a line in to fields, printf, the logical and
relational operators
47 Number processing, variables, the f option
48
The BEGIN and END positional parameters, get
line, built-in variables
49
Arrays, functions, interface with the shell,
control flow
50
The sh command, export, cd, the command
51
Operators, the ex mode, named buffered
52
Searching for a character, marking text
customizing vi



TEST SYLLABUS:

Test 1: Chapters: 1 to 7 Test 2: Chapters: 8 to 14 Test 3: Chapters: 15, 18 to 21


LITERATURE

Book
Type
Book
No.
Name Author
Publication Information
Edition Publisher Year
Text
Book
T1
UNIX Concepts
and Applications
Sumitabha Das 4th
edition
Tata McGraw
Hill
2006
Text
Book T2
UNIX and Shell
programming
Behrouz A
Forouzan and
Richard F Gilberg
-
Thomson

2005
Ref.
Book
R1
UNIX and shell
programming
M G
venkateshmurthy
- Pearson
education
2005










Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


31






QUESTION BANK

Chapter No.1-5: General Purpose Utilities and File System
Objective: This unit begins the tour of the UNIX universe. To understand what an operating
system and the UNIX architecture.
1) Explain the structure of UNIX System along with block schematic.
2) Mention any four communication feature commands of UNIX. Discuss each one of them
very briefly.
3) Describe the architecture of UNIX O.S
4) Explain the parent child relationship between various files in the organization of files in
UNIX and give the meaning of two special directory names : the dot(.) and the double
dot (..)
5) Give history of UNIX
6) Mention different category of files that exist in UNIX. Discuss each one them briefly.
7) What is the use of kernel in UNIX operating systems?
8) How will you prevent others from using your terminal? Explain in brief.
9) Explain the following commands: banner, calendar, echo, ispell each with an example.
10) What is the difference between the following commands: a) cp and copy
b) cp and mv c) comm. and cmp d) comm. and diff
11) Explain multi-user capability of UNIX?
12) Explain tee and wc command in UNIX
13) Explain echo and tput commands.
Chapter No. 6-10: The vi editor and Basic File Attributes
Objective: It will explain in detail UNIX commands and will also learn vi editor. Vi uses a number
of internal commands to navigate to any point in a text file and edit the text there. the shell has
a whole set of internal commands that can be strung together as a language. A shell program
runs in interpretive mode
14) What are times associated with files. Discuss their importance. Hence or otherwise
discuss how these times can be changed.
15) Write a short note on VI editor?
16) Create 5 empty files empty1, empty2, empty3, empty4 and empty5
17) Combine the contents of file text and matter into txtmat
18) List all the files in the current directory whose second character is a digit.
19) Output of who should be sorted and displayed on the screen along with total number of
users. The same output should be stored in a file called file1. Construct a piping
mechanism for this.
20) Explain the command using which one can know the details of the users using the
system currently.
21) Discuss the remainder facility available in UNIX.
22) What are different modes of VI editor ? Explain
23) What are the different ways a text can be inserted in Vi editor. Explain.
24) Explain the command using which the arithmetic is performed in UNIX.
25) What do you mean by command substitution? Explain the same with the aid of simple
example.
26) How are files organized? Discuss the same with the aid of a diagram that depicts the
organizational structure.
27) What do you mean by concatenating of files? Mention the command that is used for the
same and explain. Hence or otherwise write a command line that counts the total
number of lines on the concatenated file.
28) Explain clearly what for pipes and tees are used.

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


32

29) What do you mean by I/O redirection? With the aid of necessary illustrations explain
how redirection is accomplished in UNIX.
30) Explain tee command
31) In how many modes one can work with a VI editor. Mention and discuss each one of
them briefly.
32) How do you run a background process?
33) List out the drawback of background process.
Chapter No. 11&12: More file attributes and Simple Filters
Objective: In this unit we will learn hard link, symbolic link and umask. It will give the
information of simple filters.
34) Explain chmod command
35) What are soft links and hard links. Discuss with the aid of examples.
36) What are inodes. What information do they contain. Discuss.
37) Explain the following commands with example: split, sort, uniq and file.
38) Write a command line to search for a specific word ( say KARNATAKA ) and substitute
the word INDIA in its place over the entire file. Explain the same
39) Mention at least the two most widely used special characters to construct regular
expressions. Clearly mention the special meanings associated with these characters.
When do these characters loose their special meaning.
40) Write a command line using which one can obtain the long listing of a file along with its
inode number, Very briefly explain each filed of the expected output.
41) Explain the commands using which one can get into the input mode of VI editor from its
command mode
42) With few entries write a typical profile file and explain the same.
43) What is .exrc file. When and why it is used. Discuss.
44) What are inodes and what are the contents of Inodes?
Chapter No.13-15: Filter using Regular Expression and Shell Programming
Objective: In this unit you will learn what is filter using regular expression and grep family. it
provides system administrator also known as as the super user or root user. You will learn the
concept of run levels and their role.
45) What is a grep command. Explain the families of grep command. Explain any 4 options
of grep command with suitable example.
46) Explain sed commands with all options.
47) Mention different members of grep family of commands and explain each one of them
very briefly.
48) What do you mean by Daemon process. How will you kill a daemon process.
49) How will you terminate a process which has gone into an infinite loop.
50) Two consecutive lines are to be combined into one. Which vi command would you use to
do so.
51) How are shell scripts debugged. Discuss.
52) Discuss the two methods of getting input into a shell script. Illustrate the same with
examples.
53) Write a shell script that reads in a message (some thing like GOOD MORNING) and
displays it ten times at regular intervals of 60 secs. .
54) Write a shell script that prints out date information in the order : time day of week
number day number month year, i .e like 12.44.32 PDT MON 17 Oct 1996
55) Write a shell script that sends a banner THANK YOU to your screen every 40 seconds.
56) Write a shell script to accept a string as command line argument and reverse it.
57) Write a shell script that reads data from a text file and appends the lines starting with
an alphabet from a through k to a file name ak and the lines starting with the
alhabets l through s to a file name ls and the lines between t and z into the file
tz.Then display the number of the files ak ls and tz individually.
58) Write a shell script to find out whether a user whose login name passed as the
parameter is currently logged in or out. If the user is logged in, send the file hello
which is available in the current directory to his terminal.

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


33

59) What is sed instruction. Explain the following with respect to sed.
60) Explain 1)Line addressing, 2) Context addressing
61) What are privileges of system administrator. Discuss
Chapter No. 18, 20 & 21: awk-Advance Filters and Advanced Shell Programming
Objective: In this unit we will discuss awk command and understand special properties of awk
variables and expression how the shell uses a second to execute a shell script. When and how
commands are executed in the current shell and a sub shell.
62) Explain any four built in variables of awk with examples.
63) Give the general structure of an awk program. Hence or otherwise discuss the
operational mechanism of awk
64) What is sed? Explain any five application of sed.
65) Explain programming features supported by awk for flow control.
66) Explain with an example the built in function awk.
67) Explain with examples simple awk filtering.
68) Write an awk sequence to find the HRA, DA and net pay of an employee, where DA is 30%
of basic, HRA is 10% of basic and net pay is the sum of HRA,DA and the basic pay with
suitable heading. files
69) With example explain the tar command.
70) What is an inode. What are the contents of an inode. Explain how kernel accesses a File.
71) What is fsck command. What is accomplished with this command
72) What do you mean by mounting and unmounting of a file system. Explain them very
briefly.
73) Explain df and du commands.
74) Who can use fsck command. What is accomplished with this command.
75) Mention the commands that are used to manage disk space and explain each one of them
very briefly.
76) What are symbolic links. Explain how one can have a symbolic link to file
77) With the aid of a typical entry on a /etc/passwd file discuss the role of entries made on
each of its fields.
78) What are inodes. What information will be stored with them. Explain
79) What for sticky bit is used. Who can assign this to file and how.
80) How to become a super user?
81) What are super users administrative privileges.
82) Explain the utilities used for file system administration.
83) Explain the command find? Also explain how to manage disk space.
84) What are the different duties and privileges of system administration?
85) Explain the usage of CPIO command with example.
86) Explain the file system mounting.
87) Explain the sequence of blocks organized in the UNIX file system?
88) Explain the boot block in UNIX file system?
89) Write short notes on internal structure of file system?
90) Write a shell program that prompts the administrator for information about a new user
and creates a new entry for that user in /etc/passwd.
91) Explain how to handle multiple files.
92) Explain any 5 of the advanced shell programming.

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


34




PROFESSIONAL COMMUNICATION AND ETHICS

Subject code: 10MCA15 Hours/Week: 04
Faculty :Mr. V. Srikanth Total Hours : 52

Communication is the expression of facts, feelings or courses of action. Technical
communication discusses about all forms of communication-oral, written, formal and informal. It
also discusses about presentation strategies and various forms of group communications. Ethics
talks about the codes of conduct for a professional. It also discusses about software
development, employer/employee issues as well as other privacy issues. In industry these skills
are required by one and all. But specially by technical writers and technical editors.
Class
No.
Chapter
No.
Topics to be covered
% of portion
covered
Chapte
r wise
Cumula
tive
1
1
Basics of Technical
Communication
T1 : Chapter 1
Page #1-19
Introduction
10 10
2 Process of Communication
3 Language as a Tool
4 Levels of Communication
5 Communication Networks
Importance of Technical
Communication
6
2
Barriers to
Communication
T1: Chapter 2
Page #21-37
Definition of Noise
6 16 7
8
Classification of Barriers
9
3
Technology in
Communication
T1: Chapter 3
Page #38-69
Impact of Technology
8 24
10 Software for creating Messages
11 Software for Writing Documents
12
Software for Presenting Documents
Transmitting Documents
Effective use of Available Technology
13
4
Active Listening
T1: Chapter 4
Page#70-78
Introduction
6 30
14
Types of Listening
Traits of good Listener
15
Active versus passive listening
Implications of effective listening
16
5
Effective presentation
strategies
T1: Chapter 5
Page# 80-111
Introduction
13 43
Defining purpose
17
Analyzing Audience and Locale
Organizing Contents
18
Preparing outline
Visual Aids
19
Understanding Nuances of Delivery
Understanding Nuances of Delivery
(contd)
Kinesics
20
Proxemics
Paralinguistics
Chronemics

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


35

21 Sample speech
22 Sample speech(contn/..)
23
6
Group communication
T1 : Chapter 7
Page #132-166
Introduction
8 51
24
Group Discussion
Organizational Group Discussion
25
Group Discussion as Part of Selection
Process
26
Meetings, Conferences
27
7
Research paper,
Dissertation and Thesis
T1: Chapter 16
Page #244-264
Introduction
8 59
28 Introduction Contd.
29 Research Paper
30
Dissertation
Thesis
31 8
An Overview of Ethics
T2:Chapter1
Page #1-32
What are Ethics
6 65
32 Ethics in the Business World,
33
Ethics in Information Technology(IT)
34 9
Ethics for IT
Professionals and IT
users
T2:Chapter 2
Page#33-66
IT professionals
8 73
35 The Ethical behavior of IT professionals
36 IT users
37
38 10
Privacy
T2:Chapter 4
Page #105-144
Privacy Protection and the Law
6 79
39 Key Privacy
40 Anonymity Issues
41 11
Software Development
T2:Chapter 7
Page#207-236
Strategies to Engineer Quality s/w
6 85
42 Key Issues
43
44 12
Employer/ Employee
Issues
T2:Chapter 8
Page#237-266
Use of non traditional workers
4 89
45
Whistle Blowing
46
13
Introduction to
Intellectual Property
Law & Indian Cyber law
T3:Chapter1:
Page# 3-11
and web resource for
cyber law
www.asianlaws.org/lib
rary/cyber-laws/
intro-indian-cyber-
law.pdf
Intellectual property law basics,
Types of Intellectual property
8 97
47
Agencies responsible for Intellectual
property registration, International
organizations Agencies and Treaties
48
The increasing importance of
Intellectual property rights,
Introduction to Cyber Law What is
cyber law, Need for cyber law
49
Jurisprudence of Indian Cyber Law,
Evolution of Key terms and Concepts,
Evolution of Cyber Crime
50
14
Case studies
And Discussions

Case studies and Discussions
3 100
51
52



Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


36


TEST SYLLABUS:

Test 1: Chapters 1,2,3,4

Test 2: Chapters 5,6,7,8


Test 3: Chapters 9, 10,11,12,13, 14



LITERATURE:



























Book
Type
Book
No.
Title of the Book
Publication Information
Authors Publisher Edition
Text
book
T1
Technical Communication-Principles
and Practices
Chapters:1,2,3,4,5,7,16
Meenakshi
Raman and
Sangeeta
Sharma
Oxford
University
Press,2004
-
Text
book
T2
Ethics in Information Technology
Chapters: 1,2,4,7,8

George
Reynolds
Thomson
Course
Technology,
2003
2nd
Text
Book
T3
Intellectual Property-the law of
trademarks
Deborah E
Bouchoux
Cengage
Learning,
2005
2nd
Ref
Book
R1 Effective Technical Communication
M.Ashraf
Rizivi
Tata McGraw
Hill,2005
1st
Ref
Book
R2 Ethics In Engineering
Mike W
Martin
And Ronald
Schinzinger
Tata Mcgraw
Hill
2007
3rd

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


37

QUESTION BANK

1. Describe the process of communication.
2. What are the characteristics of language.
3. Write a note on the levels of communication.
4. Describe with suitable examples the flow of communication.
5. Which are various communication networks.
6. Explain the process and flow of communication with a neat diagram.

CHAPTER 2: Barriers to Communication
Objective: This chapter talks about what noise is and classifies these barriers
accordingly.
1. What is noise?
2. Which are the different types of communication barriers?
3. Explain the different causes that lead to intrapersonal barriers of communication.

CHAPTER 3: Technology in Communication
Objective: This chapter discusses about the various types of technologies available for
effective communications
1. What are the advantages and disadvantages of the use of computer packages for
technical communication.
2. How do you create message for technical communication.
3. Describe in brief LaTex and ChiWriter.
4. Discuss the impact of technology on communication.
5. Briefly explain the steps involved in creating messages.

CHAPTER 4: Active Listening
Objective: This chapter discusses the importance of listening.
Which are the types of listening.
1. Explain about the traits of a good listener.
2. What is active listening and passive listening? Explain with an example.

CHAPTER 5: Effective Presentation Strategies
Objective: This chapter discusses about how communication can be made effective
using various presentation strategies.
1. How do you organize the contents of a presentation.
2. Which are the different modes of presentation deliveries.
3. Write a note on kinesics and proxemics.
4. Which are the different paralinguistic qualities.
5. What are the four modes of delivery used for making presentations.
6. What are paralinguistic features. Discuss their impact on your presentation.
CHAPTER 6: Group Communication
Objective: This chapter discusses about the different types of group communications in
organization as well as a part of the selection process.
1. Which are the organizational group discussion techniques.
2. Which are the various evaluation components of group discussion as part
of a selection process.
3. Explain in brief how meetings and conferences should be conducted.
4. Explain the different components for evaluating group discussions.
5. Write short notes on Meetings.

CHAPTER 7: Research Paper, Dissertation, and Thesis
Objective: This chapter discusses about the difference between research paper,
CHAPTER 1: Basics of Technical Communication
Objective: This chapter discusses about the process of communication, how language is
a tool of communication, different levels and networks of communication

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


38

dissertation and thesis and how each of these need to be presented.
1. Which are the various components of a research paper.
2. Write a note on dissertation.
3. How should a thesis be compiled?
4. Discuss about the chief characteristics of a research paper.


CHAPTER 8: An Overview of Ethics
Objective: This chapter discusses about the professionalism in business world and IT.
1. What is ethics?
2. Why is it necessary to foster good business ethics.
3. What is ethical decision making.
4. Explain the seven step approach for ethical decision making.



CHAPTER 9:Ethics for IT Professionals and IT Users
Objective: This chapter discusses about the codes of conduct of IT professionals and IT
users.
1. What are the benefits of a professional code of ethics.
2. Which are the common ethical issues that IT users face.
3. Discuss briefly the various relationships that must be managed by the IT professionals.



CHAPTER 10: Privacy
Objective: This chapter discusses about the various privacy issues.
1. What is privacy protection and the various laws.
2. Which are the key privacy and anonymity Issues.
3. What is the right of privacy and what is the basis for the protection of an individuals
privacy under law.
4. What is safety critical system. What specific additional actions must be taken during the
development of such a system.



CHAPTER 11:Software Development
Objective: This chapter discusses about the quality of software and issues related with
them
1. What is the importance of quality software.
2. Describe in brief the software development process.
3. Write short notes on Software quality.


CHAPTER 12: Employer/Employee Issues
Objective: This chapter discusses about the various tussles existing within the
organization. It also discusses about other employer/employee issues.
1. Write a note on contingent workers.
2. What is offshore outsourcing.
3. What is whistle blowing.
4. List out the advantages and disadvantages of offshore outsourcing approach.


CHAPTER 13: Introduction to Intellectual Property Law &Indian Cyber Law
Objective: This chapter discusses about the types of intellectual property , agencies and
treaties and the need for cyber law and its evolution.

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


39

1. What are the various types of intellectual property.
2. What is cyber law.
3. Discuss about the need for cyber law.
4. Elaborate upon the evolution of cyber crime.
5. Write short notes on Intellectual property law.


CHAPTER 14: Case studies and discussions
Objective: Here we do case studies and have discussions on various factors that have been
discussed in the syllabus











































C Programming Laboratory

Subject Code: 10MCA16 Hour/Week: 03

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


40

Faculty: Mrs.A Lekha Total Hours: 42

Part A
1. a. Write a program to find the area of a triangle (Given the three sides).
b. Write a program to find the area of a circle (Given the radius).
2. Write a program to find the Simple interest, given the principle, time and rate of interest
with appropriate validations.
3. Write a program to find out whether a given year is a leap year or not.
4. Write a program to find the roots of a quadratic equation with appropriate error messages.
5. Write a program to display the following files of current directory.
i) .EXE files ii) .BAT files iii) .OBJ files iv) .BAK files.
By using system DOS command.
6. Write a program to find GCD and LCM of given two numbers.
7. Write a program to find the value of Sin (x) using the series.
Sin (x) = x x
3
/3! + x
5
/5! x
7
/7! + .
8. Write a program to print all prime numbers between m and n.
9. Write a program to reverse a number and check whether it is palindrome or Not.
10. Write a program to generate and print first n Fibonacci numbers using function.
11. Write a program to find a factorial of a given number using recursive function.
12. Write a program to convert UPPERCASE alphabets to LOWERCASE alphabets in a given
string and vice-versa.
13. Write a program to read two strings and concatenate them (without using library
functions).
14. Write a program to read a sentence and count the number of vowels and constants.

PART - B
1. Write a program to read N integers (zero, + ve and ve) into an array and find sum of
positive numbers, sum of negative numbers and average of all input numbers.
2. Write a program to input N real numbers and to find the mean, variance and standard
deviation, where,






3. Write a program to input N numbers (integers or real) and store them in an array.
Conduct a Linear search for a given key number and report success or failure in the form
of a suitable message.
4. Write a program to sort N numbers in ascending or descending order using bubble sort.
5. Write a program to accept N numbers sorted in ascending order and search for a given
number using binary search. Report success or failure in the form of suitable messages.
6. Write a program to read two matrices A and B of size M x N and perform product of two
given matrices.
7. Write a program to list the names of students who have scored more than 60% of total
marks in three subjects using structure variables.
8. Write a program to compute the sum of two complex numbers passing a structure to a
function.
9. Define a book structure having title of the book, ISBN, author, price and month and year
of publication as its members. Use a substructure to store the month and year of
Publication information. Develop a program to accept a date (in the form of month
and year) and list out all the book titles (along with price and ISBN) published during
that date.

10. Define a student structure having the name, USN (university seat number), marks in five
subjects, total and percentage of marks as its members. Marks of all the subjects are to
Mean = Exi / N
E(x
i
mean)
2

Variance = ----------------
N
Deviation = \variance and 0 s i < n

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


41

be stored in an array. Develop a program to list the names of all the students who have
failed.
11. Write a program to read N integers and store them in an array, find the sum of all these
elements using pointer. Output the given array and the computed sum with suitable
heading.
12. Write a program to read and write to a file.
13. Write a program to Create and count number of characters in a file.
14. Write a program to handle files with mixed data type.

Remarks

1. Algorithms are essential for the examination and practice.
2. Flowcharts are desirable for practice.
3. Each student has to execute two programs, one from Part A and one from Part B for the
examination.



-------














UNIX PROGRAMMING LABORATORY
Subject code: 10MCA17 Hour /Week: 03

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


42

Faculty: Mr.B.S.Chengappa Total Hours: 42

1. a) Write a non-recursive shell script which accepts any number of arguments and prints them
in the reverse order (For example, if the script is named rags, then executing rags ABC should
produce CBA on the standard output).
b) write a shell script that accepts two file names as arguments, checks if the permissions for
these files are identical and if the permission are identical, output common permissions and
otherwise output each file name followed by its permissions.
2. a. Write a shell script that takes a valid directory name as an argument and recursively
descent all the subdirectories, finds the maximum length of any file in that hierarchy and
writes this maximum value the standard output
b) Write a shell script that accepts a path name and creates all the components in that path
name as directories for examples, if the script is named mpc, then the command
mpc.a/b/c/cd should create directions a.a/b,a/b/c,a/b/c/d
3. a) write a shell script which accepts valid log-in names as arguments and prints their
corresponding home directories, if no arguments are specified \, print a suitable error
message.
b) Writes a shell script to implement terminal locking (similar to the lock command). It should
prompt the user for a password. After accepting the password entered by the user, it must
prompt again for the matching password as confirmation and it match occurs \, it must lock
the keyword until a matching password is entered again by the user. Note that the script
must be written to disregard BREAK, control D.No. time limit need be implemented for the
lock duration .
4. a.) Create a script file called file-properties that reads a file name entered and outputs it
properties.
b) Write a shell script that accept one or more filenames as argument and convert all of them
to uppercase, provided they exist in current directory.
5. a. Write a shell script that displays all the links to a file specified as the first argument to the
script. The second argument, which is optional, can be used to specify in which the search is
to begin in current working directory. In case, the starting directory as well as all its directory.
In either case, the starting directory as well as all its subdirectories at all levels must be
searched. The script need not include any error checking.
b. Write a shell script that accepts as file name as argument and display its
creation time if file exist and if it does not send output error message
6. a. Write a shell script to display the calendar for current month with current date, replaced by
*or** depending on whether the date has one digit or two digits.
b. write a shell script to find smallest of three numbers that are read from
keyboard.
7. a) Write a shell script using expr. Command to read in a string and display a suitable
message if it does not have at least 10 characters.
b) Write a shell script to complete to compute the sum of number passed to it as argument on
command line and display the result.
8. a) Write a shell script that compute gross salary of an employee, accordingly to rule given
below.
If basic salary is < 15000 then HRA=10% of basic 7 DA=90% of basic
If basic salary is >=15000 then HRA=500 of basic & DA=98% of basic.
c) Write a shell script that delete all lines containing a specific work in one or more
file supplied as argument to it.



9. a) Write a shell script that gets executed displays the message either Good Morning or
Good Afternoon or Good Evening depending upon time at which the user logs in.
b) Write a shell script that accept a list of filenames as its argument count and report
occurrence of each work that is present in the first argument files
10. a) Write a shell script that determine the period for which a specified user is working on
system.

Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


43

b) Write a shell script that reports the logging in of a specified user within one minute after
he/she log in. The script automatically terminate if specified period of time.

11. a) Write a shell script that accepts two integers as its argument and compute the value of first
number raised to the power of second number.
b)Write shell script that accept the file name, starting and ending line number as an argument
and display all the lines between the given line number.
12. a) Write a shell script that folds long lines into 40 columns. Thus any line that exceeds 40
characters must be broken after 40
th
, a\ is to be appended as the indication of folding and
the processing is to be continued with the residue. The input is to be supplied though a text
file created by the user.
b) Write an awk script that accepts date argument in the form of mm-dd-yy and displays it in
the form if day, month, and year. The script should check the validity of the argument and in
the case of error.
13. Write an awk script to find out total number of books sold in each discipline as weel as total
book sold using associate array down table as given below.
14. Write an awk script to compute gross salary of an employee accordingly to the given rule
1) if basic salary is <=1000 then hra =15% of basic and da =45% of basic
2) if basic salary is >=1000 then hra =20% of basic and da =50% of basic








-------























IT AND DIGITAL ELECTRONICS LABORATORY


Subject Code: 10MCA18 Hours/week: 03
Faculty: Mrs.Prema Latha H M Total Hours: 42


Course outline Semester: I Session: Sept 2011- Jan 2012

_____________________________________________________________________________________
Perseverance Excellence Service


44

PART A

Exercises on Office Tools
Note: Exercises on the following topics to be conducted in the laboratory using any of
the very widely used current software packages

Word Processing
Creation of word document, formatting and editing text, inserting headers and footers, -use of
mail-merge facility.

Spread-sheet
Building and editing spreadsheet, formatting spread-sheet, working with formulas and functions,
sort or filter spread-sheet, working with charts and automating spreadsheet tasks with macros.

Computer Presentation
Learning commands, preparation of slides, inserting texts, graphs etc, colour changing, automatic
presentation of slides, changing time settings, object linking and embedding etc.


PART B

EXERCISES ON DIGITAL ELECTRONICS

1. Realization of X-OR and X-NOR operations using basic gates.
2. Design of Half Adder and Full Adder using 2-input NAND gates
3. Verify addition of two binary numbers using 4-bit adder chip.
4. Design and implement Excess-3 to BCD code converter using 4-bit adder chip.
5. Construct and implement the Boolean expression using AND, OR and NOT gates.

(A+B). (C+D). (A+C)=Y
6. Construct and implement the Boolean expression using only NAND gates
ABCD+ABCD+ABCD+ABCD+ABCD+ABCD=Y

Note: Students are required to execute one question from Part A and one from
Part B.

-----------

You might also like