ECE 2nd Year
ECE 2nd Year
(CSE-231-F)
LAB MANUAL
III Semsester
DSA LAB (CSE‐231‐F)
CONTENTS
2 Using iteration & recursion concepts write programs for finding the
element in the array using Binary Search Method
4 Using iteration & recursion concepts write the programs for Quick
Sort Technique
EXPERIMENT NO.1
AIM: - Write a program to search an element in a two-dimensional array using linear search.
PROGRAM
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,item,loc=0,loc1=0;
int a[2][2];
clrscr();
printf("\n\tThis Program is Used To seaech an element in 2Dimensional Array using Linear
Search\n");
printf("\n\tEnter The Value Of Array:");
for(i=1;i<=2;i++)
{
for(j=1;j<=2;j++)
{
scanf("%d",&a[i][j]);
}
}
printf("\n\tEnter The Value To Be Serched:");
scanf("%d",&item);
for(i=1;i<=2;i++)
{
for(j=1;j<=2;j++)
{
if(item==a[i][j])
{
loc=i;
loc1=j;
break;
}
}
}
Page 3
DSA LAB (CSE‐231‐F)
QUIZ
Page 4
DSA LAB (CSE‐231‐F)
EXPERIMENT NO.2
AIM: Using iteration & recursion concepts write programs for finding the element in the array
using Binary Search Method
#include <stdio.h>
binarysearch(int a[],int n,int low,int high)
{
int mid;
if (low > high)
return -1;
mid = (low + high)/2;
if(n == a[mid])
{
printf("The element is at position %d\n",mid+1);
return 0;
}
if(n < a[mid])
{
high = mid - 1;
binarysearch(a,n,low,high);
}
if(n > a[mid])
{
low = mid + 1;
binarysearch(a,n,low,high);
}
}
main()
{
int a[50];
int n,no,x,result;
printf("Enter the number of terms : ");
scanf("%d",&no);
printf("Enter the elements :\n");
for(x=0;x<no;x++)
scanf("%d",&a[x]);
printf("Enter the number to be searched : ");
scanf("%d",&n);
Page 5
DSA LAB (CSE‐231‐F)
result = binarysearch(a,n,0,no-1);
if(result == -1)
printf("Element not found");
return 0;
}
#include<stdio.h>
#include<conio.h>
int nr_bin_search(int[],int,int);
void main()
{
int key,i,n,index,l[20];
printf("\n enter the number of elements in the list:");
scanf("%d",n);
printf("\n enter the elements of the list:");
for(i=0;i<n;i++)
scanf("%d",&l[i]);
printf("\n enter the key element to be searched in the
list:");
scanf("%d",&key);
index=nr_bin_search(l,n,key);
if(index==-1)
printf("\n search completed,element%d found in the list at
position %d",key,index);
getch();
}
int nr_bin_search(ints[],int n,int e)
{
int low_val,mid_val,high_val;
low_val=0;
high_val=0;
while(high_val>=low_val)
{
mid_val=(low_val+high_val)/2;
if(s[mid_val]==e)
return(mid_val);
if(s[mid_val]<e)
low_val=mid_val+1;
else
high_val=mid_val-1;
}
return-1;
}
Page 6
DSA LAB (CSE‐231‐F)
QUIZ
Q1. The complexity of searching an element from a set of n elements using Binary search
algorithm is
(A) O(n) (B) O(log n)
(C) O(n2) (D) O(n log n)
Ans:B
Q2. In binary search, average number of comparison required for searching an element in a
list if n numbers is
(A) log2 n . (B) n / 2 .
(C) n. (D) n – 1.
Ans. (A)
Q3 Which of the following is not the required condition for binary search algorithm?
a. The list must be sorted
b. there should be the direct access to the middle element in any sublist
c. There must be mechanism to delete and/or insert elements in list
d. none of above
Ans:There must be mechanism to delete and/or insert elements in list
Q4 Which of the following is not a limitation of binary search algorithm?
a. must use a sorted array
b. requirement of sorted array is expensive when a lot of insertion and deletions are needed
c. there must be a mechanism to access middle element directly
d. binary search algorithm is not efficient when the data elements are more than 1000.
Ans: requirement of sorted array is expensive when a lot of insertion and deletions are needed
Q5. What is binary search technique?
Ans: In computer science, a binary search or half-interval search algorithm finds the position of
a specified value (the input "key") within a sorted array.
Q6. What is the maximum number of leaves in a binary tree of height H?
Ans: 2H
Q7. What is the difference between recursion and iteration?
Ans: During recursion, a global variable could be used to control the depth of recursion, or data
pushed onto some stack could provide a termination condition; and in the latter case this
termination condition is usually related to the form of the data structure being traversed.
Q8. What is the main difference between linear and binary search?
Ans: A linear search looks down a list, one item at a time, without jumping. In complexity terms
this is an O(n) search - the time taken to search the list gets bigger at the same rate as the list does.
A binary search is when you start with the middle of a sorted list, and see whether that's greater
than or less than the value you're looking for, which determines whether the value is in the first or
second half of the list.
Q9. Give a real world example of binary search technique.
Ans: Number guessing game, word lists.
Q10. What is noisy binary search?
Ans: binary search solves the same class of projects as regular binary search, with the added
complexity that any given test can return a false value at random.
Page 7
DSA LAB (CSE‐231‐F)
EXPERIMENT NO.3
AIM: Write a program to perform following operations on tables using functions only
a) Addition b) Subtraction c) Multiplication d) Transpose
PROGRAM
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int a[4][4],b[4][4],c[4][4],i,j;
printf("enter the elements of matrix a");
for(i=0;i<=3;i++)
for(j=0;j<=3;j++)
scanf("%d",&a[i][j]);
printf("the first matrix is");
for(i=0;i<=3;i++)
{
printf("\n");
for(j=0;j<=3;j++)
printf("%d",a[i][j]);
}
printf("Enter the elements of second matrix");
for(i=0;i<=3;i++)
for(j=0;j<=3;j++)
scanf("%d",&b[i][j]);
printf("the second matrix is");
for(i=0;i<=3;i++)
{
printf("\n");
for(j=0;j<=3;j++)
printf("%d",b[i][j]);
}
for(i=0;i<=4;i++)
for(j=0;j<=4;j++)
c[i][j]=a[i][j] + b[i][j];
printf("the addition of matrix is");
for(i=0;i<=3;i++)
{
for(j=0;j<=3;j++)
printf("%d\t",c[i][j]);
Page 8
DSA LAB (CSE‐231‐F)
printf("\n");
}
printf("\nSubtraction of matrix is\n");
for(i=0;i<r1;i++)
{
for(j=0;j<c2;j++)
{
printf("%d\t",c[i][j]);
}
printf("\n");
}
}
else
printf("\nSubraction is not possible pls enter same order");
}
Printf(“Multiplication is”);
for(i=0;i<=3;i++)
{
for(j=0;j<=3;j++)
{
for(k=0;k<=3;k++)
{
c[i][j]=c[i][j]=c[k][j]+a[i][k]*b[k][j];
}
}
printf("multiplication matrix is");
for(i=0;i<=5;i++)
for(j=0;j<=5;j++)
printf("%d",c[i][j]):
}
printf("Transpose of the Matrix :\n\n");
for(i=0;i<n;i++)
{
for(j=i+1;j<n;j++)
{
t=m[i][j];
m[i][j]=m[j][i];
m[j][i]=t;
}
}
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
printf("\t%d",m[i][j]);
Page 9
DSA LAB (CSE‐231‐F)
}
printf("\n");
}
getch();
}
QUIZ
• reflect A over its main diagonal (which runs top-left to bottom-right) to obtain AT
• write the rows of A as the columns of AT
• write the columns of A as the rows of AT
EXPERIMENT NO.4
AIM: Using iteration & recursion concepts write the programs for Quick Sort Technique
PROGRAM
#include<stdio.h>
#include<conio.h>
#define max 100
int a[max],n,i,h,l;
void main()
{
void input(void);
input();
getch();
}
void input(void)
{
void quicksort(int a[],int l,int h);
void output(int a[],int n);
printf("how many:");
scanf("%d",&n);
printf("\n");
printf("Enter the elements:\n");
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
l=0;
h=n-1;
quicksort(a,l,h);
printf("sorted array:\n");
output(a,n);
}
void quicksort(int a[],int l,int h)
{
int temp,key,low,high;
low=l;
high=h;
key=a[(low+high)/2];
do{
while(key>a[low])
{
DSA LAB (CSE‐231‐F)
low++;
}
while(key<a[high])
{
high--;
}
if(low<=high)
{
temp=a[low];
a[low++]=a[high];
a[high--]=temp;
}
}
while(low<=high);
if(l<high)
quicksort(a,l,high);
if(low<h)
quicksort(a,low,h);
}
void output(int a[],int n)
{
for(i=0;i<n;i++)
{
printf("%d\n",a[i]);
}
}
DSA LAB (CSE‐231‐F)
QUIZ
EXPERIMENT NO.5
AIM: Write a program to implement the various operations on string such as length of string
concatenation, reverse of a string & copy of a string to another.
PROGRAM
#include<conio.h>
#include<stdio.h>
void main()
{
char a[20], b[20];
int i;
clrscr();
gets(a);
i=0;
while(a[i]!='\0')
i++; //counts no of chars till encountering null char
printf(string length=%d,i);
printf("Before concatenation:"
" \n string1 = %s \n string2 = %s", string1, string2);
finalstr = strcat(string1, string2);
printf("\nAfter concatenation:");
printf("\n finalstr = %s", finalstr);
printf("\n string1 = %s", string1);
printf("\n string2 = %s", string2);
QUIZ
EXPERIMENT NO.6
AIM: Write a program for swapping of two numbers using ‘call by value’ and ‘call by reference
strategies.
Call By Value
#include<stdio.h>
#include<conio.h>
main()
{
int x, y, temp;
printf("Enter the value of x and y ");
scanf("%d%d",&x, &y);
printf("Before Swapping\nx = %d\ny = %d\n",x,y);
temp = x;
x = y;
y = temp;
printf("After Swapping\nx = %d\ny = %d\n",x,y);
getch();
return 0;
}
Call By Reference
#include<stdio.h>
#include<conio.h>
main()
{
int i, j;
clrscr();
printf("Please Enter the First Number in A : ");
scanf("%d",&i);
printf("\nPlease Enter the Second Number in B : ");
scanf("%d",&j);
swapr(&i,&j);
printf("A is now in B : %d",i);
printf("B is now in A : %d",j);
}
swapr(int *x, int *y)
{
int t;
t=*x;
*x=*y;
*y=t; }
DSA LAB (CSE‐231‐F)
QUIZ
1. Values passed
2. Address passed
The first type refers to call by value and the second type refers to call by reference.
Q3. What is function prototype?
Ans: A function prototype tells the compiler what kind of arguments a function is looking to
receive and what kind of return value a function is going to give back. This approach helps the
compiler ensure that calls to a function are made correctly and that no erroneous type conversions
are taking place.
Q4. When should we declare a function?
Ans: Function declaration should be declared in the current source file along with the definition of
the function.
Q5. What is the scope of function variable?
Ans: Variables declared within the calling function can't be accessed unless they are passed to the
called function as arguments. The only other contact a function might have with the outside world
is through global variables.
Q6. Define recursive function.
Ans: A recursive function is one which calls itself.
Q7. What is the use of making a function inline?
Ans: The point of making a function inline is to hint to the compiler that it is worth making some
form of extra effort to call the function faster than it would otherwise - generally by substituting
the code of the function into its caller.
Q8. What is the return type of the function with prototype: "int func(char x, float v, double t);"
Ans: int
Q9. Which of the following is a valid function call (assuming the function exists)?
A. funct;
B. funct x, y;
C. funct();
D. int funct();
Ans: C
Q10. Which is not a proper prototype?
A. int funct(char x, char y);
B. double funct(char x)
C. void funct();
D. char x();
Ans: B
DSA LAB (CSE‐231‐F)
EXPERIMENT NO.7
# include<stdio.h>
# include<conio.h>
struct node
{
int info;
struct node *lchild;
struct node *rchild;
}*root;
main()
{
int choice,num;
root=NULL;
while(1)
{
printf("\n");
printf("1.Insert\n");
printf("2.Delete\n");
printf("3.Display\n");
printf("4.Quit\n");
printf("Enter your choice : ");
scanf("%d",&choice);
switch(choice)
{
case 1:
printf("Enter the number to be inserted : ");
scanf("%d",&num);
insert(num);
break;
case 2:
printf("Enter the number to be deleted : ");
scanf("%d",&num);
del(num);
break;
case 3:
display(root,1);
break;
case 4:
exit();
default:
DSA LAB (CSE‐231‐F)
printf("Wrong choice\n");
}
}
}
find(int item,struct node **par,struct node **loc)
{
struct node *ptr,*ptrsave;
if(root==NULL) /*tree empty*/
{
*loc=NULL;
*par=NULL;
return;
}
if(item==root->info) /*item is at root*/
{
*loc=root;
*par=NULL;
return;
}
/*Initialize ptr and ptrsave*/
if(iteminfo)
ptr=root->lchild;
else
ptr=root->rchild;
ptrsave=root;
while(ptr!=NULL)
{
if(item==ptr->info)
{ *loc=ptr;
*par=ptrsave;
return;
}
ptrsave=ptr;
if(iteminfo)
ptr=ptr->lchild;
else
ptr=ptr->rchild;
}/*End of while */
*loc=NULL; /*item not found*/
*par=ptrsave;
}/*End of find()*/
insert(int item)
{
DSA LAB (CSE‐231‐F)
if(parent==NULL)
root=tmp;
else
if(iteminfo)
parent->lchild=tmp;
else
parent->rchild=tmp;
}/*End of insert()*/
del(int item)
{
struct node *parent,*location;
if(root==NULL)
{
printf("Tree empty");
return;
}
find(item,&parent,&location);
if(location==NULL)
{
printf("Item not present in tree");
return;
}
free(location);
}/*End of del()*/
/*Initialize child*/
if(loc->lchild!=NULL) /*item to be deleted has lchild */
child=loc->lchild;
else /*item to be deleted has rchild */
child=loc->rchild;
suc=ptr;
parsuc=ptrsave;
suc->lchild=loc->lchild;
suc->rchild=loc->rchild;
}/*End of case_c()*/
QUIZ
Q1. What is the number of possible ordered trees with three nodes?
Ans: 12
Q2. What is strictly binary tree?
Ans: A binary tree in which every non leaf node has non empty left and right subtrees is called a
strictly binary tree.
Q3. What is the depth of a complete binary tree with n nodes?
Ans: log(n+1)-1
Q4. which kind of traversal is similar to preorder?
Ans: Depth-first order
Q5. Which traversal technique lists the nodes of a binary search tree in ascending order?
Ans: In-order
Q6. What is the order of binary search algorithm?
Ans: log(n)
Q7. A binary tree has n leaf nodes. What would be the number of nodes of degree 2 in this
tree?
Ans: n-1
Q8. What is the number of binary trees with 3 nodes which when traversed in post order?
Ans: 5
Q9. What is the infix priorities of +, *, ^, /
Ans: 5,2,2,4
Q10. What is 3-ary tree?
Ans: It is a tree in which every internal node has exactly 3 children.
DSA LAB (CSE‐231‐F)
EXPERIMENT NO.8
AIM: Write a program to create a linked list & perform operations such as insert, delete, update,
reverse in the link list
#include"stdio.h"
//#define NULL 0
struct node
{
int data;
struct node *next;
}*p;
delnode(int num)
{
struct node *temp, *m;
temp=p;
while(temp!=NULL)
{
if(temp->data==num)
{
if(temp==p)
{
p=temp->next;
free(temp);
return;
}
else
{
m->next=temp->next;
free(temp);
return;
}
}else
{
m=temp;
temp= temp->next;
}
}
printf("
ELEMENT %d NOT FOUND
", num);
DSA LAB (CSE‐231‐F)
if (p == NULL)
{
p=temp;
p->next =NULL;
}
else
{ /* GO TO LAST AND ADD*/
else
{
temp->next=p;
p=temp;
}
}
DSA LAB (CSE‐231‐F)
{
printf(" -> %d ",r->data);
r=r->next;
}
printf("<BR>);
}
main()
{
int i;
p=NULL;
while(1) /* this is an indefinite loop */
{
printf("
1.INSERT A NUMBER AT BEGINNING;<BR>);
printf("
2.INSERT A NUMBER AT LAST:<BR>);
printf("
3.INSERT A NUMBER AT A PARTICULAR LOCATION INlIST:<BR>);
printf("
4.PRINT THE ELEMENTS IN THE LIST :<BR>);
printf("
5.PRINT THE NUMBER OF ELEMENTS IN THE LIST <BR>);
printf("
6.DELETE A NODE IN THE LINKED LIST:<BR>);
printf("
7.REVERSE A LINKED LIST :<BR>);
DSA LAB (CSE‐231‐F)
printf("
8.GET OUT OF LINKED LIST (BYEE BYEE);
printf("
PLEASE, ENTER THE NUMBER:");
switch(i)
{
case 1:
{
int num;
printf("PLEASE ENTER THE NUMBER :-");
scanf("%d",&num);
addbeg(num);
break;
}
case 2:
{
int num;
printf("
PLEASE ENTER THE NUMBER :-");
scanf("%d",&num);
append(num);
break;
}
case 3:
{
int num, loc,k;
printf("
PLEASE ENTER THE NUMBER :-");
scanf("%d",&num);
printf("
PLEASE ENTER THE LOCATION NUMBER :-");
scanf("%d",&loc);
addafter(num,loc);
break;
} case 4:
{
struct node *n;
printf("
break;
}
case 5:
{
struct node *n;
display(n);
printf(" TOTAL NO OF ELEMENTS IN THE LSIT ARE %d",count());
break;
} case 6:
{
int num;
printf("PLEASE ENTER A NUMBER FROM THE LIST :");
scanf("%d",&num);
delnode(num);
break;
}
case 7:
{
reverse(p);
display(p);
break;
}
case 8:
{
exit();
}
}/* end if switch */
}/* end of while */
}/* end of main *
DSA LAB (CSE‐231‐F)
QUIZ
Q1. In a linked list with n nodes, the time taken to insert an element after an element pointed
by some pointer is
(A) 0 (1) (B) 0 (log n)
(C) 0 (n) (D) 0 (n 1og n)
Ans:A
Q2. Consider a linked list of n elements. What is the time taken to insert an element after an
element pointed by some pointer?
(A) O (1) (B) O (log2 n)
(C) O (n) (D) O (n log2 n)
Ans:A
Q3. Clarify whether Linked List is linear or Non-linear data structure ?
Answer:Link list is always linear data structure because every element (NODE) having unique
position and also every element has its unique successor and predecessor. Also,linear collection of
data items called nodes and the linear order is given by means of pointers. Each node is divided
into two parts. First part contains information of the element and another part contains the address
of the next node in the list.
Q4. Explain the types of linked list.
Ans: The types of linked lists are:
Singly linked list: It has only head part and corresponding references to the next nodes.
Doubly linked list: A linked list which both head and tail parts, thus allowing the traversal in bi-directional
fashion. Except the first node, the head node refers to the previous node.
Circular linked list: A linked list whose last node has reference to the first node.
Q5. How would you sort a linked list?
Ans: Step 1: Compare the current node in the unsorted list with every element in the rest of the list.
If the current element is more than any other element go to step 2 otherwise go to step 3.
Step 2: Position the element with higher value after the position of the current element. Compare
the next element. Go to step1 if an element exists, else stop the process.
Step 3: If the list is already in sorted order, insert the current node at the end of the list. Compare
the next element, if any and go to step 1 or quit.
Q6. In general, linked lists allow:
a. Insertions and removals anywhere.
b. Insertions and removals only at one end.
c. Insertions at the back and removals from the front.
d. None of the above.
ANS a. Insertions and removals anywhere.
Q7. What kind of linked list begins with a pointer to the first node, and each node contains a
pointer to the next node, and the pointer in the last node points back to the first node?
a. Circular, singly-linked list.
b. Circular, doubly-linked list.
c. Singly-linked list.
d. Doubly-linked list.
DSA LAB (CSE‐231‐F)
EXPERIMENT NO.9
AIM: Write the program for implementation of a file and performing operations such as insert,
delete, update a record in the file.
#include<stdio.h>
#include<conio.h>
void append();
void list();
void search();
void modify();
void del();
struct employee
{
int no, sal;
char gen, name[20];
};
void main()
{ int a;
char ch;
do{
printf(“\nEMPLOYEE DATABASE\n\n”);
printf(“1.Append Employee Record\n2.List Employee Record\n3.Modify Employee
Record\n4.Delete Employee Record\n5.Search Employee Record\n Enter Choice : “);
scanf(“%d”,&a);
switch(a)
{
case 1:
append();
break;
case 2:
list();
break;
case 3:
modify();
break;
case 4:
del();
DSA LAB (CSE‐231‐F)
break;
case 5:
search();
break;
default :
printf(“Invalid Choice!”);
}
printf(“\n More Actions ? (Y/N) :”);
fflush(stdin);
scanf(“%c”, &ch);
}while(ch==’y'|| ch==’Y');
}
void append()
{ int i,n;
struct employee e;
FILE *fp;
fp=fopen(“Employee.dat”, “a”);
if(fp==NULL)
{
printf(“File Creation Failed!”);
exit(0);
}
printf(“Enter the nos. of employees : “);
scanf(“%d”, &n);
for(i=0;i<n;i++)
{
printf(“Enter the Employee Number : “);
scanf(“%d”, &e.no);
printf(“Enter the Employee Salary : “);
scanf(“%d”, &e.sal);
printf(“Enter the Employee gender: “);
fflush(stdin);
scanf(“%c”, &e.gen);
printf(“Enter the Employee Name : “);
fflush(stdin);
gets(e.name);
printf(“\n\n”);</n;i++)
DSA LAB (CSE‐231‐F)
void modify()
{ int recno, nofrec=0;
char ch;
struct employee e;
FILE *fp;
fp=fopen(“Employee.dat”, “rb+”);
printf(“Enter the Employee Number to modify : “);
scanf(“%d”, &recno);
while((fread((char *)&e, sizeof(e), 1, fp))==1)
{ nofrec++;
if(e.no==recno)
DSA LAB (CSE‐231‐F)
{
printf(“\nEmployee Number : %d”, e.no);
printf(“\nEmployee Salary : %d”, e.sal);
printf(“\nEmployee gender : %c”,e.gen);
printf(“\nEmployee Name : %s”,e.name);
printf(“\n”);
printf(“Do you want to modify this record : ? (Y/N)”);
fflush(stdin);
scanf(“%c”, &ch);
fseek(fp, ((nofrec-1)*sizeof(e)), 0);
if(ch==’Y'|| ch==’y')
{
printf(“Enter the Employee Salary : “);
scanf(“%d”, &e.sal);
printf(“Enter the Employee gender: “);
fflush(stdin);
scanf(“%c”, &e.gen);
printf(“Enter the Employee Name : “);
fflush(stdin);
gets(e.name);
fwrite((char *)&e, sizeof(e), 1, fp);
printf(“Record Modified”);
}
else
printf(“No modifications were made”);
fclose(fp);
}
}
}
void del()
{
int recno;
char ch;
struct employee e;
FILE *fp, *ft;
DSA LAB (CSE‐231‐F)
fp=fopen(“Employee.dat”, “rb”);
ft=fopen(“Temp.dat”, “wb”);
printf(“Enter the Employee Number to delete : “);
scanf(“%d”, &recno);
while((fread((char *)&e, sizeof(e), 1, fp))==1)
{
if(e.no==recno)
{
printf(“\nEmployee Number : %d”, e.no);
printf(“\nEmployee Salary : %d”, e.sal);
printf(“\nEmployee gender : %c”,e.gen);
printf(“\nEmployee Name : %s”,e.name);
printf(“\n”);
printf(“Do you want to delete this record : ? (Y/N)”);
fflush(stdin);
scanf(“%c”, &ch);
}
}
if(ch==’y'||ch==’Y')
{
rewind(fp);
while((fread((char *)&e, sizeof(e), 1, fp))==1)
{
if(recno!=e.no)
{
fwrite((char *)&e, sizeof(e), 1, ft);
}
}
}
else
printf(“No Record was deleted”);
fclose(fp);
fclose(ft);
remove(“Employee.dat”);
rename(“Temp.dat”, “Employee.dat”);
}
void search()
DSA LAB (CSE‐231‐F)
{ int s,recno;
char sname[20];
struct employee e;
FILE *fp;
fp=fopen(“Employee.dat”, “rb”);
printf(“\n1.Search by Name\n2.Search by Employee No.\n Enter choice : “);
scanf(“%d”, &s);
switch(s)
{
case 1:
printf(“Enter the Employee Name to Search : “);
fflush(stdin);
gets(sname);
while((fread((char *)&e, sizeof(e), 1, fp))==1)
{
if(strcmp(sname,e.name)==0)
{
printf(“\nEmployee Number : %d”, e.no);
printf(“\nEmployee Salary : %d”, e.sal);
printf(“\nEmployee gender : %c”,e.gen);
printf(“\nEmployee Name : %s”,e.name);
printf(“\n”);
}
}
break;
case 2:printf(“Enter the Employee Number to Search : “);
scanf(“%d”, &recno);
while((fread((char *)&e, sizeof(e), 1, fp))==1)
{
if(e.no==recno)
{
printf(“\nEmployee Number : %d”, e.no);
printf(“\nEmployee Salary : %d”, e.sal);
printf(“\nEmployee gender : %c”,e.gen);
printf(“\nEmployee Name : %s”,e.name);
printf(“\n”);
DSA LAB (CSE‐231‐F)
}
}
break;
}
}
QUIZ
Q1. What is File Handling?
We frequently use files for storing information which can be processed by our programs. In order
to store information permanently and retrieve it we need to use files .A file is collection of
related data .Placed on the disk.Files are not only used for data. Our programs are also stored in
files.
Q2. Why we use file Handling:
The input and out operation that we have performed so far were done through screen and
keyboard only. After the termination of program all the entered data is lost because primary
memory is volatile . If the data has to be used later , then it becomes necessary to keep it in
permanent storage device. So the c language provide the concept of file through which data can
be stored on the disk or secondary storage device. The stored data can be read whenever
required.
Q3. Explain Types of File Handling in C:
The file handling in c can be categorized in two types-
1.High level (Standard files or stream oriented files)- High level file handling is managed
by library function. High level file handling commonly used because it is easier and hide
most of the details from the programmer.
2.Low level (system oriented files)- low level files handling is managed by system calls.
Q4. A random access file is organized most like a(n):
a. Array.
b. Object.
c. Class.
d. Pointer.
ANS: a. Array.
Q5. What are the typical operations on file?
Ans: Open, Read, Write and close
Q6. How is a file stored?
Ans: Stored as sequence of bytes, logically contiguous (may not be physically contiguous on disk).
Q7. In C, what we use to set a pointer to a file?
Ans: File *
Q8. Which command is used to open a file?
Ans: fopen() and it returns null if unable to open a file.
Q9. What are the modes used in fopen()?
Ans: read, write and append
Q10. What is fprintf() function?
Ans: It works like printf() and sprint() except that its first argument is a file pointer.
DSA LAB (CSE‐231‐F)
EXPERIMENT NO.10
#include<stdio.h>
#include<stdlib.h>
struct node
{
int data;
struct node *next;
}*head;
int count()
{
struct node *n;
int c=0;
n=head;
while(n!=NULL)
{
n=n->next;
c++;
}
return c;
}
int main()
{
int i,num;
struct node *n;
head=NULL;
while(1)
{
printf("\nList Operations\n");
printf("===============\n");
printf("1.Insert\n");
printf("2.Display\n");
printf("3.Size\n");
printf("4.Delete\n");
printf("5.Exit\n");
printf("Enter your choice : ");
if(scanf("%d",&i)<=0){
printf("Enter only an Integer\n");
exit(0);
} else {
switch(i)
{
case 1: printf("Enter the number to insert : ");
scanf("%d",&num);
insert(num);
break;
case 2: if(head==NULL)
{
printf("List is Empty\n");
}
else
{
printf("Element(s) in the list are : ");
DSA LAB (CSE‐231‐F)
}
display(n);
break;
case 3: printf("Size of the list is %d\n",count());
break;
case 4: if(head==NULL)
printf("List is Empty\n");
else{
printf("Enter the number to delete : ");
scanf("%d",&num);
if(delete(num))
printf("%d deleted successfully\n",num);
else
printf("%d not found in the list\n",num);
}
break;
case 5: return 0;
default: printf("Invalid option\n");
}
}
}
return 0;
}
DSA LAB (CSE‐231‐F)
QUIZ
Q1. Consider a linked list of n elements. What is the time taken to insert an element after an
element pointed by some pointer?
(A) O (1) (B) O (log2 n)
(C) O (n) (D) O (n log2 n)
Ans:A
Q2. In a linked list with n nodes, the time taken to insert an element after an element pointed
by some pointer is
(A) 0 (1) (B) 0 (log n)
(C) 0 (n) (D) 0 (n 1og n)
Ans:A
Q3. Why linked list implementation of sparse matrices is superior to the generalized dope
vector?
Ans: Because linked list implementation of sparse matrices is conceptually easier and completely
dynamic.
Q4. Which list implementation could be used for concatenation of two lists in O(1) time?
Ans: Circular doubly linked list
Q5. Linked lists are not suitable for implementing:
(A) insertion sort (B) Binary search
(C) radix sort (D) polynomial manipulation
Ans: B
Q6. How many pointers are contained as data members in the nodes of a circular, doubly
linked list of integers with five nodes?
Ans: 10
Q7. Which part in a linked list index represents the position of a node in a linked list?
Ans: An integer
Q8. What is the value of first linked list index?
Ans: Zero
Q9. Write an application of linked list in data structure.
Ans: Memory management
Q10. What are the uses of linked list?
Ans: They can be used to implement several other common abstract data types, including stacks,
queues, associative arrays, and symbolic expressions
DSA LAB (CSE‐231‐F)
EXPERIMENT NO.11
AIM: Write a program to simulate the various searching & sorting algorithms and compare their
timings for a list of 1000 elements.
SELECTION SORT
#include<stdio.h>
#include<conio.h>
void main()
{
int n,j,small,pos,temp;
int size,i;
int l[10];
printf("\n enter d size of list");
scanf("%d",&size);
printf("\n enter the elements");
for(i=0;i<size;i++)
{
scanf("%d",&l[i]);
}
for(i=0;i<size-1;i++)
{
small=l[i];
pos=i;
for(j=i+1;j<size;j++)
{
if(small>l[j])
{
small=l[j];
pos=j;
}
}
temp=l[i];
l[i]=l[pos];
l[pos]=temp;
}
printf("\n sorted list...");
for(i=0;i<size;i++)
{
printf("%d",l[i]);
}
getch();
}
DSA LAB (CSE‐231‐F)
BUBBLE SORT
#include<stdio.h>
#include<conio.h>
void main()
{
int n,j,small,pos,temp;
int size,i;
int l[10];
printf("\n enter d size of list");
scanf("%d",&size);
printf("\n enter the elements");
for(i=0;i<size;i++)
{
scanf("%d",&l[i]);
}
int f=0;
int c=0;
while(f==0)
{
f=1;
c++;
for(j=0;j<size-1;j++)
{
if(l[j]>l[j+1]}
{
temp=l[j];
l[j]=l[j+1];
l[j+1]=temp;
f=0;
}
}
}
printf("sorted list is.........");
for(i=0;i<size;i++)
{
printf("%d",l[i]);
printf("no. of passes made are %d",c);
getch();
}
for(i=0;i<n-1;i++)
{
small=l[i];
pos=i;
for(j=i+1;j<n;j++)
DSA LAB (CSE‐231‐F)
{
if(small>l[j])
{
small=l[j];
pos=j;
}
temp=l[i];
l[i]=l[pos];
l[pos]=temp;
}
}
printf("\n sorted list...");
for(i=0;i<n;i++)
{
printf("%d",l[i]);
}
getch();
}
INSERTION SORT
#include<stdio.h>
#include<conio.h>
void main()
{
int n,j,small,pos,temp;
int size,i;
int l[10];
printf("\n enter d size of list");
scanf("%d",&size);
printf("\n enter the elements");
for(i=0;i<size;i++)
{
scanf("%d",&l[i]);
}
for(i=1;i<size;i++)
{
temp=l[i];
j=i-1;
while((temp<l[j]) && (j>=0))
{
l[j+1]=l[j];
j=j-1;
}
l[j+1]=temp;
DSA LAB (CSE‐231‐F)
}
printf("sorted list is.........");
for(i=0;i<size;i++)
{
printf("%d",l[i]);
}
//printf("no. of passes made are %d",c);
getch();
}
SHELL SORT
#include<stdio.h>
#include<conio.h>
void main()
{
int list[20];
int size,i,j,k,p;
int temp,s,step;
int dimstep[]={5,3,1};
clrscr();
printf("\n enter size of list");
scanf("%d",&size);
printf("\n enter elements");
for (i=0;i<size;i++)
{
scanf("%d",&list[i]);
}
for (step=0;step<3;step++)
{
k=dimstep[step];
s=0;
for(i=s+k;i<size;i=i+k)
{
temp=list[i];
j=i-k;
while((temp<list[j])&&(j>=0))
{
list[j+k]=list[j];
j=j-k;
}
list[j+k]=temp;
s++;
}
DSA LAB (CSE‐231‐F)
}
printf("\n sorted list is..");
for(i=0;i<size;i++)
{
printf("%d",list[i]);
}
getch();
}
QUIZ
Q1. You have to sort a list L consisting of a sorted list followed by a few “random” elements.
Which sorting method would be especially suitable for such a task?
Ans:Insertion Sort
Q2. A sort which relatively passes through a list to exchange the first element with any
element less than it and then repeats with a new first element is called
(A) insertion sort. (B) selection sort.
(C) heap sort. (D) quick sort.
Ans:D
Q3. Which of the following sorting algorithms does not have a worst case running time of (2)
On
(A) Insertion sort (B) Merge sort
(C) Quick sort (D) Bubble sort
Ans:B
Q4. Which sorting algorithm is best if the list is already sorted? Why?
Ans. Insertion sort as there is no movement of data if the list is already sorted and complexity is of
the order O(N).
Q5. What are the various kinds of sorting techniques? Which is the best case?
Ans: heap sort is the best sorting technique bcoz its complexity in best case ,worst and avg case is
of O(nlogn).In worst case quick sort the complexity in best case and avg case is of O(nlogn)
and worst case O(n^2).
Q6. Sorting is useful for:
(A) report generation (B) minimizing the storage needed
(C) making searching easier and efficient (D) responding to queries easily
Ans: D
Q7. Which sorting method is best if the number of swapping done is the only measure of
efficiency?
Ans: Selection sort
Q8. Which sorting method is preferred for sorting 15 randomly generated numbers?
Ans: Bubble sort
Q9. What are the maximum numbers of comparisons needed to sort 7 items using radix sort?
Ans: 280
Q10. Which sorting algorithm has the worst time complexity of nlog(n) ?
Ans: Heap sort
DSA LAB (CSE‐231‐F)
EXPERIMENT NO.12
#include<stdio.h>
#define MAX 20
create_graph();
while(1)
{
printf("\n");
printf("1. Adjacency matrix\n");
printf("2. Depth First Search using stack\n");
printf("3. Depth First Search through recursion\n");
printf("4. Breadth First Search\n");
printf("5. Adjacent vertices\n");
printf("6. Components\n");
printf("7. Exit\n");
printf("Enter your choice : ");
scanf("%d",&choice);
switch(choice)
{
case 1:
printf("Adjacency Matrix\n");
display();
break;
case 2:
printf("Enter starting node for Depth First Search : ");
scanf("%d",&v);
for(i=1;i<=n;i++)
visited[i]=false;
dfs(v);
break;
case 3:
printf("Enter starting node for Depth First Search : ");
DSA LAB (CSE‐231‐F)
scanf("%d",&v);
for(i=1;i<=n;i++)
visited[i]=false;
dfs_rec(v);
break;
case 4:
printf("Enter starting node for Breadth First Search : ");
scanf("%d", &v);
for(i=1;i<=n;i++)
visited[i]=false;
bfs(v);
break;
case 5:
printf("Enter node to find adjacent vertices : ");
scanf("%d", &v);
printf("Adjacent Vertices are : ");
adj_nodes(v);
break;
case 6:
components();
break;
case 7:
exit(1);
default:
printf("Wrong choice\n");
break;
}/*End of switch*/
}/*End of while*/
}/*End of main()*/
create_graph()
{
int i,max_edges,origin,destin;
for(i=1;i<=max_edges;i++)
{
printf("Enter edge %d( 0 0 to quit ) : ",i);
scanf("%d %d",&origin,&destin);
display()
{
int i,j;
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
printf("%4d",adj[i][j]);
printf("\n");
}
}/*End of display()*/
dfs_rec(int v)
{
int i;
visited[v]=true;
printf("%d ",v);
for(i=1;i<=n;i++)
if(adj[v][i]==1 && visited[i]==false)
dfs_rec(i);
}/*End of dfs_rec()*/
dfs(int v)
{
int i,stack[MAX],top=-1,pop_v,j,t;
int ch;
top++;
stack[top]=v;
while (top>=0)
{
pop_v=stack[top];
top--; /*pop from stack*/
DSA LAB (CSE‐231‐F)
if( visited[pop_v]==false)
{
printf("%d ",pop_v);
visited[pop_v]=true;
}
else
continue;
for(i=n;i>=1;i--)
{
if( adj[pop_v][i]==1 && visited[i]==false)
{
top++; /* push all unvisited neighbours of pop_v */
stack[top]=i;
}/*End of if*/
}/*End of for*/
}/*End of while*/
}/*End of dfs()*/
bfs(int v)
{
int i,front,rear;
int que[20];
front=rear= -1;
printf("%d ",v);
visited[v]=true;
rear++;
front++;
que[rear]=v;
while(front<=rear)
{
v=que[front]; /* delete from queue */
front++;
for(i=1;i<=n;i++)
{
/* Check for adjacent unvisited nodes */
if( adj[v][i]==1 && visited[i]==false)
{
printf("%d ",i);
visited[i]=true;
rear++;
que[rear]=i;
}
}
DSA LAB (CSE‐231‐F)
}/*End of while*/
}/*End of bfs()*/
adj_nodes(int v)
{
int i;
for(i=1;i<=n;i++)
if(adj[v][i]==1)
printf("%d ",i);
printf("\n");
}/*End of adj_nodes()*/
components()
{
int i;
for(i=1;i<=n;i++)
visited[i]=false;
for(i=1;i<=n;i++)
{
if(visited[i]==false)
dfs_rec(i);
}
printf("\n");
}
DSA LAB (CSE‐231‐F)
QUIZ
EXPERIMENT NO.13
AIM: Write a program which simulates the various tree traversal algorithms.
#include<stdio.h>
#include<conio.h>
struct node
{
int data;
struct node *right, *left;
}*root,*p,*q;
{
inorder(r->left);
printf("\t %d",r->data);
inorder(r->right);
}
}
void main()
{
int no;
int choice;
clrscr();
printf("\n Enter the root:");
scanf("%d",& no);
root=make(no);
p=root;
while(1)
{
printf("\n Enter another number:");
DSA LAB (CSE‐231‐F)
scanf("%d",& no);
if(no==-1)
break;
p=root;
q=root;
while(no!=p->data && q!=NULL)
{
p=q;
if(nodata)
q=p->left;
else
q=p->right;
}
if(nodata)
{
printf("\n Left branch of %d is %d",p->data,no);
left(p,no);
}
else
{
right(p,no);
printf("\n Right Branch of %d is %d",p->data,no);
}
}
while(1)
{
printf("\n 1.Inorder Traversal \n 2.Preorder Traversal \n 3.Postorder Traversal \n 4.Exit");
printf("\n Enter choice:");
scanf("%d",&choice);
switch(choice)
{
case 1 :inorder(root);
break;
case 2 :preorder(root);
break;
case 3 :postorder(root);
break;
DSA LAB (CSE‐231‐F)
case 4 :exit(0);
default:printf("Error ! Invalid Choice ");
break;
}
getch();
}
DSA LAB (CSE‐231‐F)
QUIZ
Q1. If a node having two children is deleted from a binary tree, it is replaced by which type
of predecessor/successor?
Ans:Inorder Successor
Q2. How many leaf nodes are there in a full binary tree with 2n+1 nodes?
Ans: n non-leaf nodes
Q3. If a node in a BST has two children, then its inorder predecessor has
(A) no left child (B) no right child
(C) two children (D) no child
Ans:B
Q4. What we call to a binary tree in which if all its levels except possibly the last, have the
maximum number of nodes and all the nodes at the last level appear as far left as possible.
Ans:Full Binary Tree
Q5. How many nodes are there in a full binary tree with n leaves?
Ans: 2n –1 nodes
Q6. A BST is traversed in the following order recursively: Right, root, left
The output sequence will be in
(A) Ascending order (B) Descending order
(C) Bitomic sequence (D) No specific order
Ans:B
Q7. The pre-order and post order traversal of a Binary Tree generates the same output. The
tree can have maximum
(A) Three nodes (B) Two nodes
(C) One node (D) Any number of nodes
Ans:C
Q8. What is the maximum possible number of nodes in a binary tree at level 6?
Ans. 26 = 2 x 2 x 2 x 2 x 2 x 2 = 64
Q9. How to find the number of possible tree in the given tree.
Ans: The number of possible tree = (2 power of n) - n.
For example: A tree contain three node. So if n=3,the possible number of trees = 8 - 3 = 5.
Q10. What is almost complete binary tree?
Ans: An almost complete binary tree is a tree in which each nodethat has a right child also has a
left child. Having a left child does not require a node to have a right child. Stated alternately, an
almost complete binary tree is a tree where for a right child, there is always a left child, but for a
left child there may not be a right child. The number of nodes in a binary tree can be found using
this formula: n = 2^h Where n is the amount of nodes in the tree, and h is the height of the tree.
NETWORK THEORY
(EE – 223 – FF)
LAB MANUAL
IIIrd SEMESTER
NETWORK THEORY LAB (EE‐223‐F)
LIST OF EXPERIMENTS
EXP NO. NAME OF THE EXPERIMENT PAGE NO.
EXPERIMMENT NO 1O:
NIN’S THEEOREM:THEVEN
As applie to the netedtwork ckt m be stated as the curre flowing through a lo resistancmaydentoadce
RL conneected across any two termminals A and B of a line bilateral ndearnetwork is ggiven by VTH /H
RTH +RL where VTH is the open ckt volatge and RTH is the internal resistance of the networtork
llources replac with thei internal recediresistances anndfrom the
terminal A to B with al volatge so
ources with infinite resisstance.current so
ON’S THEOOREM:NORTO
Replaces the electrisical network by an equkuivalent connstant curren source antand a parallel
resistance. Norton’s equivalent resistance RN = R1xR2/ R1+R2. Actual load ccurrent in thhe
lntshort circuit current.circuit IL1 theoretical load curren IL2 = ISC x RN /(RN+RL), ISC
is the s
ITAM:CIRCUI DIAGRA
Page 3
NUAL (III SEEM ECE) LAB MAN
NETWORRK THEOORY LAB (EE‐2233‐F)
DURE:PROCED
NINCEDURE:THEVEN PROC
Thevenin Theorem is a way to reduce a nn'smonetwork to an equivalent circuit coomposed of a
single vooltage source series resise,stance, and sseries load.
NORTO THEOREONEM:
Norton's Theorem is a way to reduce a netwwork to an eqquivalent circ composed of a singlecuit
ource, parall resistance and parall load.lele,lelcurrent so
OBSERVVATION TABLE:
1) TTHEVENIN TABLEN’S
Page 4
NUAL (III SEEM ECE) LAB MAN
NETWORK THEORY LAB (EE‐223‐F)
2) NORTON’S TABLE
DISCUSSION: Thevenin’s and Norton’s theorems are dual theorems and can be used in
the reduction of circuit analysis.
PRECAUTIONS:
a) Make the connections according to the circuit diagram. Power supply should be
switched off.
b) Connections should be tight.
c) Note the readings carefully.
QUIZ /ANSWERS:
A. A short ckt.
Q.13 What is placed in place of voltage sources while calculating the Rn?
A. Their internal resistance replaces these.
Q.18 What is the reason that ground pin are made of greater diameter in the plugs?
A. R=ρL/A
EXPERIMENT NO: 2
BRIEF THEORY: In Z parameters of a two-port, the input & output voltages V1 & V2 can
be expressed in terms of input & output currents I1 & I2. Out of four variables (i.e V1, V2, I1,
I2) V1& V2 are dependent variables whereas I1 & I2 are independent variables. Thus,
Here Z11 & Z22 are the input & output driving point impedances while Z12 & Z21 are the
reverse & forward transfer impedances.
CIRCUIT DIAGRAM:
PROCEDURE:
a) Connect the circuit as shown in fig. & switch ‘ON’ the experimental board.
b) First open the O/P terminal & supply 5V to I/P terminal. Measure O/P Voltage & I/P
Current.
c) Secondly, open I/P terminal & supply 5V to O/P terminal. Measure I/P Voltage & O/P
current using multi-meter.
d) Calculate the values of Z parameter using Equation (1) & (2).
e) Switch ‘OFF’ the supply after taking the readings.
OBSERVATION TABLE:
SAMPLE CALCULATION:
RESULT/CONCLUSION: The Z-parameters of the two port network has been calculated
and verified.
PRECAUTIONS:
a) Make the connections according to the circuit diagram. Power supply should be switched
off.
b) Connections should be tight.
c) Note the readings carefully.
QUIZ /ANSWERS:
Q5. Define input driving point impedance A5.The input driving point impedance is
defined as the ratio of input voltage to the
input current
Q6. Define output driving point impedance A6. The output driving point impedance is
defined as the ratio of output voltage to the
output current.
A7.The reverse transfer impedance is defined
Q7. Define reverse transfer impedance. as ratio of input voltage to the output current
A8. The forward transfer impedance is
Q8. Define forward transfer impedance defined as ratio of output voltage to the input
current
A9.Condition for reciprocity is Z12 = Z21.
Q9. Write condition for reciprocity. A10.Condition for symmetry is Z11 = Z22.
Q10.Write condition for symmetry.
EXPERIMENT NO: 3
BRIEF THEORY : In Y parameters of a two-port , the input & output currents I1 & I2 can
be expressed in terms of input & output voltages V1 & V2 . Out of four variables (i.e I1, I2, V,
V2) I1& I2 are dependent variables whereas V1 & V2 are independent variables.
Here Y11 & Y22 are the input & output driving point admittances while Y12 & Y21are the
reverse & forward transfer admittances.
CIRCUIT DIAGRAM:
PROCEDURE :
a) Connect the circuit as shown in fig. & switch ‘ON’ the experimental board.
b) First short the O/P terminal & supply 5V to I/P terminal. Measure O/P & I/P current
c) Secondly, short I/P terminal & supply 5V to O/P terminal. Measure I/P & O/P current
using multi-meter.
d) Calculate the values of Y parameter using Eq. (1) & (2).
e) Switch ‘off’ the supply after taking the readings.
OBSERVATION TABLE:
SAMPLE CALCULATION:
(1) When O/P is short circuited i.e. V2 = 0
Y11 = I1/V1Y21 = I2 /V1
RESULT/CONCLUSION: The Y-parameters of the two port network has been calculated
and verified.
PRECAUTIONS:
a) Make the connections according to the circuit diagram. Power supply should be
switched off.
b) Connections should be tight.
c) Note the readings carefully.
QUIZ/ANSWERS:
EXPERIMENT NO: 4
BRIEF THEORY: ABCD parameters are widely used in analysis of power transmission
engineering where they are termed as “Circuit Parameters”. ABCD parameters are also
known as “Transmission Parameters”. In these parameters, the voltage & current at the
sending end terminals can be expressed in terms of voltage & current at the receiving end.
Thus,
V1 = AV 2 + B (-I2)
I1 = CV2 + D (-I2)
Here “A” is called reverse voltage ratio, “B” is called transfer impedance “C” is called
transfer admittance & “D” is called reverse current ratio.
CIRCUIT DIAGRAM:
PROCEDURE :
a) Connect the circuit as shown in fig. & switch ‘ON’ the experimental board.
b) First open the O/P terminal & supply 5V to I/P terminal. Measure O/P voltage & I/P
current
c) Secondly, short the O/P terminal & supply 5V to I/P terminal. Measure I/P & O/P current
using multi-meter.
d) Calculate the A, B, C, & D parameters using the Eq. (1) & (2).
e) Switch ‘off’ the supply after taking the readings.
OBSERVATION TABLE:
When O/P is open ckt When O/P is short ckt
S.No V1V2I1 V1I2I1
SAMPLE CALCULATION:
PRECAUTIONS:
a) Make the connections according to the circuit diagram. Power supply should be
switched off.
b) Connections should be tight.
c) Note the readings carefully.
QUIZ/ANSWERS:
Q1. Define transmission parameters A1. In these parameters, the voltage &
current at the sending end terminals can be
expressed in terms of voltage & current at the
receiving end.
Q2. Why ABCD parameters are also called A2. ABCD parameters are also called as
as transmission parameters? transmission parameters because these are
used in the analysis power transmission lines
A3. Transmission line theory & cascade
Q3. Where they are used? network
A4. It is defined as the ratio of sending end
Q4. Define reverse voltage ratio (A) . voltage to the receiving end voltage
A5. It is defined as the ratio of sending end
Q5. Define transfer impedance (B). voltage to the receiving end current with the
receiving end current assumed to be in
reverse direction
A6. It is defined as the ratio of sending end
current to the receiving end voltage
Q6. Define transfer admittance (C). A7. It is defined as the ratio of sending end
current to the receiving end current with the
Q7. Define reverse current ratio (D). receiving end current assumed to be in
reverse direction
A8. Unit of parameter B is ohm & of C is
mho.
Q8. Write the units of parameters B & C. A9. Both parameters A & D are unit less.
A10.The condition for symmetry is A = D &
the condition for reciprocity is AD – BC = 1.
Q9. Write the units of parameters A & D.
Q10.Write the condition for symmetry &
Reciprocity.
EXPERIMENT NO: 5
BRIEF THEORY: In ‘h’ parameters of a two port network, voltage of the input port and the
current of the output port are expressed in terms of the current of the input port and the
voltage of the output port. Due to this reason, these parameters are called as ‘hybrid’
parameters, i.e. out of four variables (i.e. V1, V2, I1, I2) V1, I2 are dependent variables.
Thus,
V1= h11I1 + h12V2 ------------- (1)
I2 = h21I1 + h22V22 --------- (2)
H11 and H22 are input impedance and output admittance.
H21 and H12 are forward current gain and reverse voltage gain.
CIRCUIT DIAGRAM:
PROCEDURE :
a) Connect the circuit as shown in fig. & switch ‘ON’ the experimental board.
b) Short the output port and excite input port with a known voltage source Vs. So that
V1 = Vs and V2 = 0. We determine I1 and I2 to obtain h11 and h21.
c) Input port is open circuited and output port is excited with the same voltage source
Vs. So that V2 = VS and I1 = 0, we determine I2 and V1 to obtain h12 and h22.
d) Switch ‘off’ the supply after taking the readings.
OBSERVATION TABLE:
SAMPLE CALCULATION:
RESULT/CONCLUSION: The h-parameters of the two port network has been calculated
and verified.
PRECAUTIONS:
a) Make the connections according to the circuit diagram. Power supply should be switched
off.
b) Connections should be tight.
c) Note the readings carefully.
QUIZ/ANSWERS:
EXPERIMENT NO: 6
BRIEF THEORY: In ‘g’ parameters of a two port network, the current at the input port I 1 &
The voltage at the output port V2 can be expressed in terms of I2 & V1.
I1= g11V1 + g12I2(1)
V2 = g21V1 + g22I2(2)
G11 and G22 are input driving point admittance and output driving point impedance.
G21 and G12 are forward current gain and reverse voltage gain.
CIRCUIT DIAGRAM:
PROCEDURE:
1) Connect the circuit as shown in fig. & switch ‘ON’ the experimental board.
2) Open the output port & excite input port with a known voltage source Vs, So that V1 =
Vs & I2 = 0.We determine I1 & V2 to obtain g11 & g21.
3) Input port is short circuited and out port is excited with the same voltage source Vs, so
that V2 = Vs & V1 = 0.We determine I= & I2 to obtain g12 & 22.
Switch ‘off’ the supply after taking the readings.
4)
OBSERVATION TABLE:
SAMPLE CALCULATION:
RESULT/CONCLUSION: The G-parameters of the two port network has been calculated
and verified.
PRECAUTIONS:
a) Make the connections according to the circuit diagram. Power supply should be
switched off.
b) Connections should be tight.
c) Note the readings carefully.
QUIZ/ANSWERS:
EXPERIMENT NO: 7
BRIEF THEORY: Consider two port N/Ws connected in parallel so that they have common
reference node, then the equation of the N/Ws A&B in terms of Y parameters are given by -
Y11 = Y11A + Y11B
Y12 = Y12A + Y12B
Y21 = Y21 A + Y21 B
Y22 = Y22 A + Y22 B
Thus we see that each Y parameter of the parallel N/W is given as the sum of the
corresponding parameters of the individual N/Ws.
CIRCUIT DIAGRAM:
PROCEDURE:
a) Connect the N/Ws A&B separately on the Bread board according to the fig.
b) Take the Reading according to the observation table & calculate Y parameters for
both N/Ws & add them.
c) Connect two N/Ws A&B in parallel & take the readings.
d) Calculate the Y parameters of parallel connected N/Ws.
e) Verify that the sum of parameters of A&B N/Ws is equal to the parameters of parallel
connected N/Ws.
OBSERVATION TABLE:
SAMPLE CALCULATION:
PRECAUTIONS:
a) Make the connections according to the circuit diagram. Power supply should be
switched off.
b) Connections should be tight.
c) Note the readings carefully.
QUIZ/ANSWERS:
Q1. What will be the total admittance if the two A1. The total admittance (Z) = Z1 + Z2
networks are connected in series?
Q2. What will be the total admittance if the two A2. The total admittance (Y) = Y1 + Y2
networks are connected in parallel?
Q3. Which parameter is used for the
A3.Y-parameters
representation of parallel connection of two port
network?
Q4 .Which parameter is used for the
representation of series connection of two port A4. Z-parameters
network?
Q5. Difference between Z & Y parameters
A5. Z-parameters are called open ckt while Y-
parameters are called short ckt parameters. Z-
parameters are used for series connection while
Y-parameters are used for parallel connection.
A6.The network is said to be in cascade when the
Q6 .What do you mean by cascade connection? o/p of one port becomes the input for second n/w.
EXPERIMENT NO: 8
AIM: To determine the equivalent parameters of series connection of two port network
CIRCUIT DIAGRAM:
PROCEDURE:
1) Connect the circuit as shown in fig and switch ‘ON’ the experiment board.
2) Open the output port & excite input port with a known voltage source Vs so that V1= VS &
I2 = 0.We determine I1 & I2 to obtain Z’11 & Z’21.
3) Input port is open circuited & Output port is excited with the same voltage source Vs so
that V2 = Vs & I1 = 0.We determine I2 & V1 to obtain Z’22 & Z’12.
4) Switch OFF the supply after taking the readings.
OBSERVATION TABLE:
When O/P is open ckted When I/P is open ckted
S.N.O V1I1V2 V2V1I2
SAMPLE CALCULATION:
(1) When O/P is open circuited i.e. I2 = 0
Z’11=V1/I1Z’21= V2 /I1
(2) When I/P is open circuited i.e. I1 = 0
Z’12= V1/I2Z’22= V2 /I2
RESULT/CONCLUSION: The Z’11, Z’12, Z’21, Z’22 parameters of two-port network has
been determined.
PRECAUTIONS:
a) Make the connections according to the circuit diagram. Power supply should be
switched off.
b) Connections should be tight.
c) Note the readings carefully.
QUIZ/ANSWERS:
EXPERIMENT NO: 9
AIM: To determine the A’B’C’D’ parameters of the cascade connection of two-port network
BRIEF THEORY: Two port networks are said to be connected in cascade if the output port
of the first becomes the input port of the second as shown in fig.
V1 = A’V2 + B’ (-I2)(1)
I1 = C’2 + D’ (-I2)(2)
V1 and I1 are dependent variables; V2 and I2 are independent variables
A’, D’ is Reverse Voltage Ratio & Reverse Current Ratio.
B’, C’ is Reverse Transfer Impedance & Reverse Transfer Admittance.
CIRCUIT DIAGRAM:
PROCEDURE:
1) Connect the circuit as shown in fig and switch ‘ON’ the experiment board.
2) In A, B, C, D parameters, open the output port and excite input port with a known
voltage source Vs so that V1 = Vs and V2 = 0.We determine I1 and V2 to obtain A’ & C’.
3) The output port is short circuited and input port is excited with the same voltage source
Vs so that V1 =Vs & V2 = 0.We determine I1 & I2 to obtain B’ & D’.
Switch OFF the supply after taking the readings.
4)
OBSERVATION TABLE:
SAMPLE CALCULATION:
PRECAUTIONS:
a) Make the connections according to the circuit diagram. Power supply should be
switched off.
b) Connections should be tight.
c) Note the readings carefully.
QUIZ/ANSWERS:
EXPERIMENT-10
EXPERIMENT NO: 11
SCHEMATIC:
A schematic is merely a collection of electronic symbols connected together with virtual
“wires.” The main reason you need a schematic when fabricating a printed circuit board is to
provide input (a net list) to your layout and routing tool.
NETLIST:
A net list is a file, usually ASCII text, which defines the connections between the components
in your design.
CREATING PROJECT:
To create a new project, use Capture’s Project Wizard. The Project Wizard provides you with
the framework for creating any kind of project.
1 Launch Capture
2 From the File menu, choose New > Project.
3 In the New Project dialog box, specify the project name
4 To specify the project type, select Analog or Mixed A/D.
5 Specify the location where you want the project files to be created and click OK.
6 In the Create P Spice Project dialog box, select the
Create a blank project option button.
Adding parts:
Connecting parts:
After placing the required parts on the schematic page, you need to connect the parts.
From the Place menu, choose Wire.
Net List:
Save the schematic and close the schematic page.
Open tools and create net list.
Select Layout tab
Be sure to put the *.MNL file in a unique folder.
Latter many more design files will be generated and it will be much easier to sort them out if
the design is by itself.
Click on OK
The net list that Layout needs has been created. The file has the name of the project.MNL
EXPERIMENT NO:12
AIM: Introduction to Layout Tool, and creating Layout board using TINAPRO.
THEORY:
TINAPRO Layout
TINAPRO tool used for PCB routing and floor-planning
LAYOUT:
Layout is a circuit board layout tool that accepts a layout-compatible circuit net list (ex. from
Capture CIS) and generates an output layout files that suitable for PCB fabrication
CONCLUSION: Thus we have studied the TINAPRO circuit TINAPRO Layout and tool
used for PCB routing and floor-planning.
Ans. A netlist is a file, usually ASCII text, which defines the connections between the
components in your design.
Q.10 How many number or devices and nodes can be included in it?
Ans. The number or devices and nodes that can be included in a circuit is not limited.
EXPERIMENT NO: 13
AIM: Design a RLC resonance circuit & verify the transient response for different values of
R, L &C.
CIRCUIT DIAGRAM: R1 L1
1 2 1 2 3
2 50uH
VIN
C1
VAMPL = 10V
FREQ = 5KHZ 10UF
RLC CIRCUITS
PROGRAM:
****Exp Transient Response of an RLC-circuit with a sinusoidal input voltage
* SIN (VO VA FREQ); Simple sinusoidal source
VIN 1 0 SIN (0 10V 5KHZ); Sinusoidal input voltage
R1 1 2 2
L1 2 3 50UH
C1 3 0 10UF
.TRAN 1US 500US; Transient analysis
.PLOT TRAN V (3) V (1) ; Plots on the output file
.PROBE; Graphical waveform analyzer
.END; End of circuit file
RESULT:
CONCLUSION: Thus we have studied transient response of RLC circuit for different values
of R, L &C.
Q.10 How many number or devices and nodes can be included in it?
Ans. The number or devices and nodes that can be included in a circuit are not limited.
(EE-221-F)
LAB MANUAL
IIIrd SEMESTER
ELECTRONIC WORKSHOP, PCB DESIGN & CIRCUIT (EE‐221‐F)
LIST OF EXPERIMENTS
EXP NAME OF THE EXPERIMENT PAGE
NO. NO.
1 3
Introduction to circuit creation and simulation software TINAPRO
4 Design a full wave centre tapped rectifier using TINAPRO & its 13
output on a virtual oscilloscope.
7 Design a RLC resonance circuit & verify the transient response for 33
different values of R, L &C
8 Convert the power supply circuit into PCB & simulates its 2D & 37
3D view
10 45
Development of PCB in hardware lab.
EXPERIMENT NO:1
AIM: Introduction to circuit creation and simulation software TINAPRO
SCHEMATIC:
A schematic is merely a collection of electronic symbols connected together with virtual “wires.”
The main reason you need a schematic when fabricating a printed circuit board is to provide
input (a net list) to your layout and routing tool.
NETLIST:
A net list is a file, usually ASCII text, which defines the connections between the components in
your design.
CREATING PROJECT:
To create a new project, use Capture’s Project Wizard. The Project Wizard provides you with the
framework for creating any kind of project.
1 Launch Capture.
2 From the File menu, choose New > Project.
3 In the New Project dialog box, specify the project name
4 To specify the project type, select Analog or Mixed A/D.
5 Specify the location where you want the project files to be created and click OK.
6 In the Create PSpice Project dialog box, select the
Create a blank project option button.
Adding parts:
Connecting parts:
After placing the required parts on the schematic page, you need to connect the parts.
From the Place menu, choose Wire.
Net List:
Ans. TINA Design Suite is a powerful yet affordable circuit simulation and PCB design software
package.
Ans. It is used for analyzing, designing, and real time testing of analog, digital, VHDL, MCU,
and mixed electronic circuits and their PCB layouts.
Ans. A unique feature of TINA is that you can bring your circuit to life with the optional USB
controlled.
Ans. To meet this requirement TINA v9 has the ability to utilize the increasingly popular
scalable multi-thread CPUs.
Ans. It enhances your schematics by adding text and graphics elements such lines, arcs arrows,
frames around the schematics and title blocks.
Ans. The new fully integrated layout module of TINA has all the features you need for advanced
PCB design, including multilayer PCB's with split power plane layers, powerful autoplacement
& autorouting, rip-up and reroute, manual and "follow-me" trace placement, DRC, forward and
back annotation, pin and gate swapping, keep-in and keep-out areas, copper pour, thermal relief,
fanout, 3D view of your PCB design from any angle, Gerber file output and much more.
EXPERIMENT NO:2
AIM: Introduction to Layout Tool, and creating Layout board using TINAPRO
THEORY:
TINAPRO Layout
TINAPRO tool used for PCB routing and floor-planning
LAYOUT:
Layout is a circuit board layout tool that accepts a layout-compatible circuit netlist (ex. from
Capture CIS) and generates an output layout files that suitable for PCB fabrication
Having created the layout netlist, the next step is to create a new board in Layout.
Launch Layout
Create the Layout board file
When you create a new board file in OrCAD Layout, you merge the electrical information from
the layout netlist (.MNL) and physical information from a template file (.TPL) or a technology
file (.TCH) to create a new board design (.MAX). Therefore, to be able to create a board file for
a new design in Layout, you need to provide a template file and a netlist. A template (.TPL) file
describes the characteristics of a physical board. A template can include information, such as the
board outline, the design origin, the layer definitions, grid settings, spacing rules, and default
track widths.
1. From the File menu in OrCAD Layout, choose New. The AutoECO dialog box appears.
2. In the Input Layout TCH or TPL or MAX file text box, specify the name and the location
of the technology file to be used for your board
3. In the Input MNL netlist file text box, specify the location of the FULLADD.MNL
created in the Creating Layout netlist section.
4. From the drop-down list in the Options section, select AutoECO.
CONCLUSION: Thus we have studied the TINAPRO circuit TINAPRO Layout and tool used
for PCB routing and floor-planning
Q.10 How many number or devices and nodes can be included in it?
Ans. The number or devices and nodes that can be included in a circuit is not limited.
LAB MANUAL (III SEM ECE) Page 7
ELECTRONIC WORKSHOP, PCB DESIGN & CIRCUIT (EE‐221‐F)
EXPERIMENT NO:3
AIM: Design a half wave rectifier using TINAPRO and observe its output on a virtual
oscilloscope.
APPARATUS: PC installed with TINAPRO
CIRCUIT DIAGRAM:
Rs D1
2 1 3 5
10 mod1
Vin L1 L2
VOFF = 0 RL
VAMPL = 220V 2000uH 20uH
FREQ = 50Hz 500
PROGRAM:
RESULT:
CONCLUSION: Thus we have studied the half wave rectifier using TINAPRO window and
observed its output on the virtual CRO.
Q.1What is rectifier?
Ans. A rectifier is an electrical device that converts alternating current (AC), which periodically
reverses direction, to direct current (DC), which flows in only one direction. The process is
known as rectification.
Ans. In half wave rectification of a single-phase supply, either the positive or negative half of the
AC wave is passed, while the other half is blocked.
Q.3 Relate input frequency and the output frequencies of a half wave rectifier and a full wave
rectifier?
Ans.In half-wave rectification, we get pulsating output for half cycle only.Therefore output
ripple frequency is same as the input frequency. But in full wave rectification we get output for
both half cycle. Hence the output at ripple frequency is full-wave rectification is double the input
frequency.
Ans.The primary application of rectifiers is to derive DC power from an AC supply. Virtually all
electronic devices require DC, so rectifiers are used inside the power supplies of virtually all
electronic equipment.
Ans. When +ve terminal of battery is connected to P side & -ve terminal to N side of diode.
Ans. When +ve terminal of battery is connected to N side & -ve terminal to P side of diode.
Ans. The forward voltage at which current through the junction starts increasing rapidly.
Ans. Reverse voltage at which PN junction breaks down with sudden rise in reverse current.
Ans. It is highest instantaneous forward current that a PN junction can conduct without damage
to Junction.
Ans. Passive elements don't require power from the supply to produce its effect on a signal. They
derive the power of the input signal to perform its action. for example, a resistor doesn't require a
separate supply to provide its action of resistance in a circuit. Where as in active elements there
should be a power source for its working. They require a supply for there working.
EXPERIMENT NO:4
AIM: Design a full wave centre tapped rectifier using TINAPRO & its output on a virtual
oscilloscope.
CIRCUIT DIAGRAM:
Rs D2
2 1 3
10 D1N4009
L2
10uH
Vin
VOFF = 0 L1 RL
VAMPL = 220V 4 5
FREQ = 50Hz 2000uH
L3 1000
10uH
D1N4009
D1
PROGRAM:
RESULT:
CONCLUSION: Thus we have studied the full wave rectifier using TINAPRO window and
observed its output on the virtual CRO.
1 Define Full wave rectifier? In both the half cycles current flows through the load
in the same direction.
2 Which are different types of Full Different types of full wave rectifier are Centre-Tap
Wave rectifier?full wave rectifier & Bridge rectifier
3 How many no. of diodes are used in 4 No. of diodes are used for Bridge rectifier.
full wave rectifier?
5 Write ripple factor for FW rectifier? The ripple factor for Full wave rectifier is 0.48.
8 Write one feature of Full wave The current drawn in both the primary & secondary of
rectifier?the supply transformer is Sinusoidal.
EXPERIMENT NO:5
AIM: Design a clipper circuits using TINAPRO.
CIRCUIT DIAGRAM:
R R4
1 2 1 2
.22K .22K
VAC D1 VAC D1
VOFF = 0 D1N3940 VOFF = 0 D1N3940
VAMPL = 5V VAMPL = 5V
FREQ = 30kHz FREQ = 30kHz
Figure 1 Figure 4
R R
1 2 1 2
.22K .22K
D1 VAC D1
VAC 3 D1N3940 VOFF = 0 3 D1N3940
VOFF = 0 VAMPL = 5V
VAMPL = 5V VDC FREQ = 30kHz VDC
FREQ = 30kHz 1Vdc 1Vdc
Figure 2 Figure 5
R R
1 2 1 2
.22K .22K
VAC D1 VAC D1
VOFF = 0 3 D1N3940 VOFF = 0 3 D1N3940
VAMPL = 5V VAMPL = 5V
FREQ = 30kHz FREQ = 30kHz VDC
VDC
1Vdc
1Vdc
Figure 3 Figure 6
R
1 2
.22K
VAC
VOFF = 0 D2 D1
VAMPL = 5V D1N3940 D1N3940
FREQ = 30kHz
VDC2 VDC1
1Vdc 1.5Vdc
Figure 7
CLIPPER CIRCUITS
PROGRAM:
Prog. 1
*******CLIPPER 1
R 1 2 .22K
D1 2 0 D1N3940
VAC 1 0 SIN(0 5V 30KHZ)
.MODEL D1N3940 D(
+IS = 4E-10
+RS = .105
+N = 1.48
+TT = 8E-7
+CJO = 1.95E-11
+VJ = .4
+M = .38
+EG = 1.36
+XTI = -8
+KF = 0
+AF = 1
+FC = .9
+BV = 600
+IBV = 1E-4
+)
.PROBE
.TRAN 0US 100US
.END
Prog. 2
*******CLIPPER 1
R 1 2 .22K
D1 2 3 D1N3940
VAC 1 0 SIN(0 5V 30KHZ)
VDC 3 0 DC 1V
.MODEL D1N3940 D(
+IS = 4E-10
+RS = .105
+N = 1.48
+TT = 8E-7
+CJO = 1.95E-11
+VJ = .4
+M = .38
+EG = 1.36
+XTI = -8
+KF = 0
+AF = 1
+FC = .9
+BV = 600
+IBV = 1E-4
+)
.PROBE
.TRAN 0US 100US
.END
Prog. 3
*******CLIPPER 3
R 1 2 .22K
D1 2 3 D1N3940
VAC 1 0 SIN(0 5V 30KHZ)
VDC 0 3 DC 1V
.MODEL D1N3940 D(
+IS = 4E-10
+RS = .105
+N = 1.48
+TT = 8E-7
+CJO = 1.95E-11
+VJ = .4
+M = .38
+EG = 1.36
+XTI = -8
+KF = 0
+AF = 1
+FC = .9
+BV = 600
+IBV = 1E-4
+)
.PROBE
.TRAN 0US 100US
.END
Prog. 4
*******CLIPPER 4
R 1 2 .22K
D1 0 2 D1N3940
VAC 1 0 SIN(0 5V 30KHZ)
.MODEL D1N3940 D(
+IS = 4E-10
+RS = .105
+N = 1.48
+TT = 8E-7
+CJO = 1.95E-11
+VJ = .4
+M = .38
+EG = 1.36
+XTI = -8
+KF = 0
+AF = 1
+FC = .9
+BV = 600
+IBV = 1E-4
+)
.PROBE
.TRAN 0US 100US
.END
Prog. 5
*******CLIPPER 5
R 1 2 .22K
D1 3 2 D1N3940
VAC 1 0 SIN(0 5V 30KHZ)
VDC 0 3 DC 1V
.MODEL D1N3940 D(
+IS = 4E-10
+RS = .105
+N = 1.48
+TT = 8E-7
+CJO = 1.95E-11
+VJ = .4
+M = .38
+EG = 1.36
+XTI = -8
+KF = 0
+AF = 1
+FC = .9
+BV = 600
+IBV = 1E-4
+)
.PROBE
.TRAN 0US 100US
.END
Prog. 6
*******CLIPPER 6
R 1 2 .22K
D1 3 2 D1N3940
VAC 1 0 SIN(0 5V 30KHZ)
VDC 3 0 DC 1V
.MODEL D1N3940 D(
+IS = 4E-10
+RS = .105
+N = 1.48
+TT = 8E-7
+CJO = 1.95E-11
+VJ = .4
+M = .38
+EG = 1.36
+XTI = -8
+KF = 0
+AF = 1
+FC = .9
+BV = 600
+IBV = 1E-4
+)
.PROBE
.TRAN 0US 100US
.END
Prog. 7
*******CLIPPER 7
R 1 2 .22K
D1 3 2 D1N3940
D2 2 4 D1N3940
VAC 1 0 SIN(0 5V 30KHZ)
V1_VDC1 4 0 DC 1V
V2_VDC2 0 3 DC 1.5V
.MODEL D1N3940 D(
+IS = 4E-10
+RS = .105
+N = 1.48
+TT = 8E-7
+CJO = 1.95E-11
+VJ = .4
+M = .38
+EG = 1.36
+XTI = -8
+KF = 0
+AF = 1
+FC = .9
+BV = 600
+IBV = 1E-4
+)
.PROBE
.TRAN 0US 100US
.END
RESULT:
Result of CLIPPER 1
Result of CLIPPER 2
Result of CLIPPER 3
Result of CLIPPER 4
Result of CLIPPER 5
Result of CLIPPER 6
Result of CLIPPER 7
CONCLUSION: Thus we have studied the full wave rectifier using TINAPRO window and
observed its output on the virtual CRO.
Q. No QUESTION ANSWER
1. What is non-linear wave shaping? Non linear wave shaping is the process, on
applying any wave at input of a non-linear device
the shape of the output wave varies non-linearly
with the input wave.
2. Which are the circuits for non- Clipping circuit & Clamping circuits are the
linear wave shaping?circuits for non-linear wave shaping.
7. What is positive clipper circuit? Positive clipper is one which removes the positive
half cycles of the input voltage
8. What is negative clipper circuit? Negative clipper is one which removes the negative
half cycles of the input voltage
10. How many types of clampers are There are 2 types of clampers
there?
a) Positive clamper. b)Negative clamper
EXPERIMENT NO:6
AIM: Design a clamper circuits using TINAPRO.
CIRCUIT DIAGRAM:
C1 C1
1 2 1 2
.01uf .01uf
VAC VAC
VOFF = 0v D1N3491 R1 VOFF = 0v D1N3491 R1
VAMPL = 5v VAMPL = 5v
FREQ = 30khz D1 560k FREQ = 30khz D1 560k
Figure 1 Figure 4
C1 C1
1 2 1 2
.01uf .01uf
D1N3491 D1N3491
VAC VAC
D1 D1
VOFF = 0v R1 VOFF = 0v R1
VAMPL = 5v VAMPL = 5v
FREQ = 30khz VDC 560k FREQ = 30khz VDC 560k
1Vdc 1Vdc
Figure 2 Figure 5
C1 C1
1 2 1 2
.01uf .01uf
D1N3491 D1N3491
VAC VAC
D1 D1
VOFF = 0v R1 VOFF = 0v R1
VAMPL = 5v VAMPL = 5v
FREQ = 30khz 560k FREQ = 30khz 560k
VDC VDC
1Vdc 1Vdc
Figure 3 Figure 6
CLAMPER CIRCUITS
PROGRAM:
Prog. 1
****CLAMPER1
C_C1 1 2 .01uf
R_R1 2 0 560k
D_D1 2 0 D1N3491
V_VAC 1 0 sin(0 5v 30khz)
.model D1N3491D(Is=68.65f Rs=3.786m Ikf=1.774 N=1 Xti=2 Eg=1.11 Cjo=1.457n
+M=.9735 Vj=.75 Fc=.5 Isr=11.02u Nr=2 Tt=6.059u)
*Motorolapid=1N3491 case=DO21
*88-08-24 rmn
.probe
.tran 0us 100us
.end
Prog. 2
****CLAMPER2
C_C1 1 2 .01uf
R_R1 2 0 560k
D_D1 2 3 D1N3491
V_VDC 3 0 1V
V_VAC 1 0 sin(0 5v 30khz)
.model D1N3491D(Is=68.65f Rs=3.786m Ikf=1.774 N=1 Xti=2 Eg=1.11 Cjo=1.457n
+M=.9735 Vj=.75 Fc=.5 Isr=11.02u Nr=2 Tt=6.059u)
*Motorolapid=1N3491 case=DO21
*88-08-24 rmn
.probe
.tran 0us 100us
.end
Prog. 3
****CLAMPER3
C_C1 1 2 .01uf
R_R1 2 0 560k
D_D1 2 3 D1N3491
V_VDC 0 3 1V
V_VAC 1 0 sin(0 5v 30khz)
.model D1N3491D(Is=68.65f Rs=3.786m Ikf=1.774 N=1 Xti=2 Eg=1.11 Cjo=1.457n
+M=.9735 Vj=.75 Fc=.5 Isr=11.02u Nr=2 Tt=6.059u)
*Motorolapid=1N3491 case=DO21
*88-08-24 rmn
.probe
.tran 0us 100us
.end
Prog. 4
****CLAMPER4
C_C1 1 2 .01uf
R_R1 2 0 560k
D_D1 0 2 D1N3491
V_VAC 1 0 sin(0 5v 30khz)
.model D1N3491D(Is=68.65f Rs=3.786m Ikf=1.774 N=1 Xti=2 Eg=1.11 Cjo=1.457n
+M=.9735 Vj=.75 Fc=.5 Isr=11.02u Nr=2 Tt=6.059u)
*Motorolapid=1N3491 case=DO21
*88-08-24 rmn
.probe
.tran 0us 100us
.end
Prog. 5
****CLAMPER5
C_C1 1 2 .01uf
R_R1 2 0 560k
D_D1 3 2 D1N3491
V_VDC 3 0 1V
V_VAC 1 0 sin(0 5v 30khz)
.model D1N3491D(Is=68.65f Rs=3.786m Ikf=1.774 N=1 Xti=2 Eg=1.11 Cjo=1.457n
+M=.9735 Vj=.75 Fc=.5 Isr=11.02u Nr=2 Tt=6.059u)
*Motorolapid=1N3491 case=DO21
*88-08-24 rmn
.probe
.tran 0us 100us
.end
Prog. 6
****CLAMPER6
C_C1 1 2 .01uf
R_R1 2 0 560k
D_D1 3 2 D1N3491
V_VDC 0 3 1V
V_VAC 1 0 sin(0 5v 30khz)
.model D1N3491D(Is=68.65f Rs=3.786m Ikf=1.774 N=1 Xti=2 Eg=1.11 Cjo=1.457n
+M=.9735 Vj=.75 Fc=.5 Isr=11.02u Nr=2 Tt=6.059u)
*Motorolapid=1N3491 case=DO21
*88-08-24 rmn
.probe
.tran 0us 100us
.end
RESULT:
Result of CLAMPER1
Result of CLAMPER2
Result of CLAMPER3
Result of CLAMPER4
Result of CLAMPER5
Result of CLAMPER6
CONCLUSION: Thus we have studied the clamper circuits using TINAPRO window and
observed its output on the virtual CRO.
Q. No QUESTION ANSWER
1. What is non-linear wave shaping? Non linear wave shaping is the process, on
applying any wave at input of a non-linear device
the shape of the output wave varies non-linearly
with the input wave.
2. Which are the circuits for non- Clipping circuit & Clamping circuits are the
linear wave shaping?circuits for non-linear wave shaping.
7. What is positive clipper circuit? Positive clipper is one which removes the positive
half cycles of the input voltage
8. What is negative clipper circuit? Negative clipper is one which removes the negative
half cycles of the input voltage
10. How many types of clampers are There are 2 types of clampers
there?
a) Positive clamper. b)Negative clamper
EXPERIMENT NO:7
AIM: Design a RLC resonance circuit & verify the transient response for different values of R,
L &C
CIRCUIT DIAGRAM:
R1 L1
1 2 1 2 3
2 50uH
VIN
C1
VAMPL = 10V
FREQ = 5KHZ 10UF
RLC CIRCUITS
PROGRAM:
RESULT:
CONCLUSION: Thus we have studied transient response of RLC circuit for different values of
R, L &C
Ans. An RLC circuit (or LCR circuit) is an electrical circuit consisting of a resistor, an inductor,
and a capacitor, connected in series or in parallel.
Ans. The RLC part of the name is due to those letters being the usual electrical symbols
for resistance, inductance and capacitance respectively.
Ans. There are many applications for this circuit. They are used in many different types
of oscillator circuit. Another important application is for tuning, such as in radio
receivers or television sets.
Ans. An important property of this circuit is its ability to resonate at a specific frequency,
the resonance frequency, . Frequencies are measured in units of hertz. In this article,
however, angular frequency, , is used which is more mathematically convenient. This is
measured in radians per second. They are related to each other by a simple proportion,
Ans. The resonance frequency is defined as the frequency at which the impedance of the circuit
is at a minimum.
Q6 What is Damping?
Ans. Damping is caused by the resistance in the circuit. It determines whether or not the circuit
will resonate naturally (that is, without a driving source).
Q7 What is Q factor?
Ans. The Q factor is a widespread measure used to characterise resonators. It is defined as the
peak energy stored in the circuit divided by the average energy dissipated in it per cycle at
resonance.
Ans. Transient response or natural response is the response of a system to a change from
equilibrium. The transient response is not necessarily tied to "on/off" events but to any event that
affects the equilibrium of the system.
Q. 10 What is Overshoot?
Ans. Overshoot is when a signal or function exceeds its target. It is often associated with ringing.
EXPERIMENT NO:8
AIM: Convert the power supply circuit into PCB & simulates its 2D & 3D view.
THEORY:
Creating a PCB for the circuit simulated in the software involves certain basic steps.
To achieve an accurate PCB design, one that is easy to build, every part in your schematic must
have a physical representation with exact physical size. This is realized through so-called
footprints: drawings showing the outline and the pins of the parts. Default footprint names to all
parts are already defined that represent real components. Some parts used for theoretical
investigations, controlled sources, for example, do not represent real physical parts and cannot be
placed on a PCB. If your design contains such components, you should replace them with real
physical parts.
Of course there is no guarantee that the default physical packages parts are the same as needed
by your design.
1) You can use “Footprint name editor”, which you can invoke from Tools menu. In this
dialog you can see all of components and their corresponding footprint names.
2) The second way to examine the assigned footprints is to double-click on each part and check
the Footprint Name in the component property dialog that appears.
After completing the checking of the footprint names check the 2D/3D shape by clicking the
2D/3D view button or the F6 key. Unless a component is only meaningful for analysis, it will
have a 3D view. If the physical part association is OK, we can begin the PCB layout design.
PCB Designing :
To begin PCB design, select the “PCB Design” command on the Tools menu. Set the parameters
as required. Select “Start New Project,” “Auto placement”and“Use board template.” With the
Browse button find and select the 2layer_A.tpt template file from Template folder. When starting
with a template, you are choosing the level of manufacturing complexity of your project. The
following three levels of manufacturing technology are defined by the IPC-2221 generic
standard:
The template file specifies the number of layers, including their properties, system grid size, auto
router settings, spacing and track width.
In choosing a PCB template, you should take into consideration technology, density, and
package pitch.To complete the set up, set the PCB size in inches or mm depending on the
measurement unit settings in the View/Options dialog .Now that everything is set properly press
the OK button and the PCB layout design will appear with all the components automatically
placed on the PCB board. While all the parts and nets are placed, we need to adjust their
positions for good placement and easier routing.
Press F4 to reach the Net Editor and set net routing width. First, click on “Modify all”
and enter 12.5 into “Track width” field. Then select power nets (Ground, VCC, -VCC)
and set their width to 25mil. To automatically route the PCB, press the F5 button or select
“Autoroute board”command from the Tools menu.
Finally, check your design in full 3D. Press F3 or select 3D View from the View menu. After
some calculation, 3D view appears on the screen.
Lastly take the print out of the PCB generated on the trace paper to develop the PCB in hardware
lab.
CONCLUSION: Thus we have obtained the print of the power supply PCB to develop the PCB
in hardware lab.
Ans. 2D/3D view checking: After completing the checking of the footprint names check the
2D/3D shape by clicking the 2D/3D view button or the F6 key. Unless a component is only
meaningful for analysis, it will have a 3D view. If the physical part association is OK, we can
begin the PCB layout design.
Ans. The new fully integrated layout module of TINA has all the features you need for advanced
PCB design, including multilayer PCB's with split power plane layers, powerful auto placement
& auto routing, rip-up and reroute, manual and "follow-me" trace placement, DRC, forward and
back annotation, pin and gate swapping, keep-in and keep-out areas, copper pour, thermal relief,
fan out, 3D view of your PCB design from any angle, Gerber file output and much more.
Ans. Screen printing techniques actually the process that patterns the metal conductor to form the
circuit.
Ans. This PCB fabrication process involves a multistep integration of imaging materials,
imaging equipment, and processing conditions with the metallization process to reduce the
master pattern on a substrate.
Ans.The vast majority of printed circuit boards are made by bonding a layer of copper over the
entire substrate, sometimes on both sides, (creating a "blank PCB") then removing unwanted
copper after applying a temporary mask (e.g., by etching), leaving only the desired copper traces.
Ans. Silk screen printing uses etch-resistant inks to protect the copper foil. Subsequent etching
removes the unwanted copper. Alternatively, the ink may be conductive, printed on a blank (non-
conductive) board. The latter technique is also used in the manufacture of hybrid circuits.
Q.7What is Photoengraving?
Ans. PCB milling uses a two or three-axis mechanical milling system to mill away the copper
foil from the substrate. A PCB milling machine (referred to as a 'PCB Prototyper') operates in a
similar way to a plotter, receiving commands from the host software that control the position of
the milling head in the x, y, and (if relevant) z axis.
Ans. Chemical etching is done with ferric chloride, ammonium persulfate, or sometimes
hydrochloric acid.
EXPERIMENT NO:9
AIM: Introduction of the materials required for the fabrication of PCB’s
THEORY:
The designer as well as manufactures prefers to use both the imperial as well as no imperial
system of units.The most important to remember is:
1mil = inch by 1000
1mil= 25.4 micron
1micron= 1mm by 1000Tracks on a PCB add inductance, resistance and capacitance to the
circuit.
INDUCTANCE:
The amount of inductance is relatively constant across substrate types and depends on the length
of track. The inductance per unit length of copper track is similar to that for a component lead.
RESISTANCE:
Resistance of the track depends on the cross-sectional area of the track as well as the length,
hence values are usually quoted in resistance per square for each weight of copper the most
popular copper weight,1 oz., gives a typical value of 0.49mΩ/square.
CAPACITANCE:
A=coverage area
H=distance between tracks
Therefore a 1 oz. copper track, .5mm (0.020 “) wide, 20 mm (.8“) long over a ground plane on a
.25 mm (.010”) thick FR4 laminate would exhibit a resistance of 9.8mΩ, an inductance of
20nH,and a capacitive coupling to ground of 1.66 pF. These values may seem like low and
negligible but when we talk of so many track then these values add up. These parasitic effects are
under designers control very much like components values. There are other design constraints
like production, marketing cost etc. Some important tables are given here for the ready reference
and handy, fast calculations.
CONCLUSION:
The availability of the copper plate of the proper size is the first and foremost requirement for the
making of the PCB.In addition to it, you also require the precision high speed cutter blade for the
fine and précised cutting of these copper plates to the required size. There can be the manual
drilling machine for the drilling of the holes for components to be placed or the automatic plant
as to the availability of the resources at your hand. There is the list of other equipment to add this
like a personal computer printer, saw, scale, photo plotter, screen printing facility, chemicals,
chemical treatment plant for the exposing and lamination of the PCB.
Ans. The new fully integrated layout module of TINA has all the features you need for advanced
PCB design, including multilayer PCB's with split power plane layers, powerful autoplacement
& autorouting, rip-up and reroute, manual and "follow-me" trace placement, DRC, forward and
back annotation, pin and gate swapping, keep-in and keep-out areas, copper pour, thermal relief,
fanout, 3D view of your PCB design from any angle, Gerber file output and much more.
Ans. Screen printing techniques actually the process that patterns the metal conductor to form the
circuit.
Ans. This PCB fabrication process involves a multistep integration of imaging materials,
imaging equipment, and processing conditions with the metallization process to reduce the
master pattern on a substrate.
Ans. Areas that should not be soldered may be covered with a polymer solder resist.
Ans.Copper thickness of PCBs can be specified in units of length, but is often specified as
weight of copper per square foot, in ounces, which is easier to measure. Each ounce of copper is
approximately 1.4 mils (0.0014 inch) or 35 µm of thickness.
Ans.These new materials include eco-friendly FR polymers, ultra-fine PCB substrate yarns,
thermally enhanced substrates, halogen-free LCPs, as well as flex circuit materials.
Ans.These silver conductive inks are formulated for use in printed electronics, to meet the need
for low-cost processing in touchscreens and OLEDs.
Ans.The vast majority of printed circuit boards are made by bonding a layer of copper over the
entire substrate, sometimes on both sides, (creating a "blank PCB") then removing unwanted
copper after applying a temporary mask (e.g., by etching), leaving only the desired copper traces.
Ans. Silk screen printing uses etch-resistant inks to protect the copper foil. Subsequent etching
removes the unwanted copper. Alternatively, the ink may be conductive, printed on a blank (non-
conductive) board. The latter technique is also used in the manufacture of hybrid circuits.
Ans. Chemical etching is done with ferric chloride, ammonium persulfate, or sometimes
hydrochloric acid.
EXPERIMENT NO:10
AIM: Development of PCB in hardware lab.
APPARATUS:
ACCESORIES:
1) Tray
2) Brush
3) PCB Laminate
4) Spray
5) Hand gloves
THEORY:
Screen printing techniques actually the process that patterns the metal conductor to form the
circuit. This PCB fabrication process involves a multistep integration of imaging materials,
imaging equipment, and processing conditions with the metallization process to reduce the
master pattern on a substrate. Screen printing is considered as the most versatile of all printing
processes as it can be done on wide variety of substrates of any shape, thickness and size. The
screen printing process is simple, and a wide variety of inks and dyes are available for use in
screen printing than for use in any other printing process.
The final copper pattern is formed by selective removal of the unwanted copper which is not
protected by an electric resist. FeCl3 solution is popularly used etching solution. FeCl3 powder
will remove the copper from the unprotected part of the PCB. After removing the PCB it is dried
for some time.
Drilling of PCB:
After etching of the PCB the next step is to drill the PCB for the interconnection of the various
components on the PCB. The drill hole is having a diameter of generally one mm but the
resistance sometimes require 1.5mm diameter. The drilling of the PCB is very important in terms
of the working of the PCB hence the drilling is done by drilling machine of large precision and
accuracy.
Since the upper layer of the PCB is a copper clad material which gets oxidised when comes in
contact with the environment that affects the performance of the PCB. Hence the copper layer is
coated with the laminates that are basically an insulator, to protect the Etched PCB to get
oxidized.
PROCEDURE:
3. Take 10 ml screen coating solution and add 10 drops of sensitizer solution to it.
3. Cut the Light Sensitive film as per the size of PCB layout. Arrange the film and on PCB
screen Printing Unit.
4. Coat the Light Sensitive film on the screen with the Squeeze and dry the screen in the curing
machine for 5 minutes. Remove the plastic paper from film and dry it again for 5 minutes.
5.Take the print of PCB layout on the plotting paper and place it on UV exposure such that
solder side is in contact with glass.
7. Develop the screen by spraying water from 1 feet and dry the screen for 15 minutes in the
open air.
8. Mount the Screen with the help of clamp on PCB Screen Printing Unit and cut it with the help
of shearing machine
9. PlacePCB Laminate to print and pour the ink inside the screen.
10. Pour 7 ltr water in the tank and add 2kg Ferric Chloride and stir it.
11. Mount the PCB on the clamp of Dipping Arrangement and dip the PCB on clamp from the
opening of cover plate.
Ans. The new fully integrated layout module of TINA has all the features you need for advanced
PCB design, including multilayer PCB's with split power plane layers, powerful autoplacement
& autorouting, rip-up and reroute, manual and "follow-me" trace placement, DRC, forward and
back annotation, pin and gate swapping, keep-in and keep-out areas, copper pour, thermal relief,
fanout, 3D view of your PCB design from any angle, Gerber file output and much more.
Ans. Screen printing techniques actually the process that patterns the metal conductor to form the
circuit.
Ans. This PCB fabrication process involves a multistep integration of imaging materials,
imaging equipment, and processing conditions with the metallization process to reduce the
master pattern on a substrate.
Ans.Screen printing is considered as the most versatile of all printing processes as it can be done
on wide variety of substrates of any shape, thickness and size. The screen printing process is
simple, and a wide variety of inks and dyes are available for use in screen printing than for use in
any other printing process.
Ans.The final copper pattern is formed by selective removal of the unwanted copper which is not
protected by an electric resist. FeCl3 solution is popularly used etching solution. FeCl3 powder
will remove the copper from the unprotected part of the PCB. After removing the PCB it is dried
for some time.
Ans.After etching of the PCB the next step is to drill the PCB for the interconnection of the
various components on the PCB. The drill hole is having a diameter of generally one mm but the
resistance sometimes require 1.5mm diameter. The drilling of the PCB is very important in terms
of the working of the PCB hence the drilling is done by drilling machine of large precision and
accuracy.
Ans. TINA Design Suite is a powerful yet affordable circuit simulation and PCB design software
package.
Ans. It is used for analyzing, designing, and real time testing of analog, digital, VHDL, MCU,
and mixed electronic circuits and their PCB layouts.
Ans. A unique feature of TINA is that you can bring your circuit to life with the optional USB
controlled.
Ans. To meet this requirement TINA v9 has the ability to utilize the increasingly popular
scalable multi-thread CPUs.
(EE-226-F)
LAB MANUAL
IV SSEMESSTER
COMMUNICATION SYSTEMS LAB (EE‐226‐F)
LIST OF EXPERIMENTS
S.No. NAME OF THE EXPERIMENT Page
No.
1. GENERATION OF DSB-SC AM SIGNAL USING BALANCED 3-8
MODULATOR.
EXPERIMENT No.1
APPARATUS REQUIRED:- (i) C.R.O. (ii) CRO Probe (ii) DSB/SSB Transmitter (ST
2201) and Receiver (ST2202) Trainer (iv) Connecting leads.
THEORY:-
Remembering the inequality of eqn. (2) the two new components are located close to
the frequency ω rad/s, one just below, and the other just above it. These are referred
to as the lower and upper sidebands respectively.
These two components were derived from a ‘carrier’ term on ω rad/s, and a message on
µ rad/s. Because there is no term at carrier frequency in the product signal it is described
is a double sideband suppressed carrier (DSBSC) signal.
The term ‘carrier’ comes from the context of ‘double sideband amplitude modulation'
(commonly abbreviated to just AM).
The time domain appearance of a DSBSC (eqn. 1) in a text book is generally as shown
in Figure 2.
Notice the waveform of the DSBSC in Figure 2, especially near the times when the
message amplitude is zero. The fine detail differs from period to period of the message.
This is because the ratio of the two frequencies µ and ω has been made non-integral.
Although the message and the carrier are periodic waveforms (sinusoids), the DSBSC
itself need not necessarily be periodic.
PROCEDURE:-
and frequency amplitudes of the two sidebands can be reduced to zero by reducing the
amplitude of the modulating audio signal to zero. Do this by turning the amplitude pot
to its MIN position, and note that the signal at t.p3 becomes an un-modulated sine wave
of frequency 1 MHz, indicating that only the carrier component now remains. Return
the amplitude pot to its maximum position.
Now turn the balance pot in the balanced modulator & band pass filter circuit 1 block,
until the signal at t.p. 3 is as shown in Fig. 5
RESULT:-
Draw wave forms as observed on CRO and label the different waveforms appropriately.
PRECAUTIONS:-
1. Do not use open ended wires for connecting to 230 V power supply.
2. Before connecting the power supply plug into socket, ensure power supply should be
switched off
3. Ensure all connections should be tight before switching on the power supply.
4. Take the reading carefully.
5. Power supply should be switched off after completion of experiment.
QUIZ / ANSWERS:-
Q. 1. What is DSBSC?
Ans. Double Sideband Suppressed Carrier.
Q. 2. Which are the discrete frequencies in DSBSC?
Ans. (1) Lower sideband frequency (2) Upper sideband frequency
Q. 3 In DSBSC, how many sidebands are there?
Ans. There are two sidebands in DSCBSC i.e. LSB and USB
Q. 4. Mention advantages of DSBSC over DSBFC.
Ans. Transmission efficiency is more.
Q. 5. Which type of carrier is used in Ring modulator?
Ans. Square wave carrier.
Q. 6. Write the methods of DSBSC generation.
Ans. (1) Balanced Modulator (2) Ring Modulator (3) Switching Modulator
Q. 7. What is the BW of DSBSC for a single tone modulating signal with frequency w?
Ans. 2w.
Q. 8. Where the modulation index lies?
Ans. modulation index always lies between 0 and 1. More than 1 is over modulation.
Q. 9. What happens in case of over modulation?
Ans. The wave will get distorted.
Q. 10. What is the range of audio frequencies?
Ans. 20 Hz to 20 KHz.
EXPERIMENT No.2
APPPARATUS REQUIRED (i) C.R.O (ii) CRO PRD:-O.Probe (ii) DSSB/SSB Traansmitter (STT
2201 and Recei1)iver Trainer (ST 2202) (i Connecti leadsiv)ing
THEEORY:-
Sing Sideband Suppressed Carrier (SgleddSSB-SC) moodulation wa the basis for all longasg
distaance telephone communiications up uuntil the last decade. It w called "L carrier." ItwasIt
conssisted of grroups of tellephone connversations modulated on upper aand/or lowerr
sidebbands of conntiguous supppressed carrriers. The ggroupings an sideband orientationsnds
(USB LSB) supB,pported hunddreds and thoousands of inndividual tellephone convversations.
SSB Transmitterr:
PROOCEDURE::--
Page 99
(IV SEM ECEE) LAB MANUAL (
COMMUNICATION SYSTEMS LAB (EE‐226‐F)
3. Turn the audio oscillator block's amplitude pot to its fully clockwise (MAX) position,
and examine the block's output (t.p.14) on an oscilloscope. This is the audio frequency
sine wave which will be used as out modulating signal. Note that the sine wave’s
frequency can be adjusted from about 300Hz to approximately 3.4 KHz, by adjusting
the audio oscillator's frequency pot.
Note: That the amplitude of this audio modulating signal can be reduced to zero, by
turning the audio oscillator's pot to its fully counter-clockwise (MIN) position. Leave
the amplitude pot on its full clockwise position, and adjust the frequency pot for an
audio frequency of 2 KHz, approx. (mid-way).
4. To achieve signal- sideband amplitude modulation, we will utilize the following three
blocks on the ST2201 module.
a) Balanced modulator.
b) Ceramic band pass filter
c) Balanced modulator & band pass filter circuit 2.
We will now examine the operation of each of these blocks in detail.
5. Monitor the two inputs to the balanced modulator block, at t.p.15 and t.p.6 noting
that:
a) The signal t.p. 15 is the audio frequency sine wave from the audio oscillator block.
This is the modulating input to the balanced modulator block.
b) The signal at t.p. 6 is a sinewave whose frequency is slightly less than 455 KHz. It is
generated by the 455 KHz oscillator block, and is the carrier input to the balanced
modulator block.
6. Next, examine the output of the balanced modulator block (at t.p.17), together with
the modulating signal at t.p.15 trigger the oscilloscope on the modulating signal. Check
that the waveforms are as shown Fig. 2.
(b). Corresponding range of output frequencies from ceramic band pass filter block
Figure 7: Range of frequency output from audio oscillator and ceramic BPF
12. With the audio oscillator block's frequency pot roughly in its midway position
(arrowhead pointing towards the top), turn the block's amplitude pot to its MIN
position, and note that the amplitude of the signal at the ceramic band pass filter's output
(t.p. 20) drops to zero. This highlights one on the main advantages of SSB amplitude
modulation if there is no modulating signal, then the amplitude of the SSB waveform
drops to zero, so that no power is wasted. Return the amplitude pot to its MAX position.
13. The particular filter we are using has a pass band centered on 455 KHz, and this is
why we have arranged for the wanted upper sideband to also be at about 455 KHz.
However, there is a disadvantage of this type of filter is the range of frequencies that the
filter will pass is fixed during the filter's manufacture, and cannot subsequently be
altered. Note that since there is a large gap between the upper and lower sidebands (a
gap of about 910 KHz), a band pass filter with a very sharp response is not needed to
reject the lower sideband, a simple tuned circuit band pass filter is quite sufficient.
14. Now examine the output of the balanced modulator & band pass filter circuit 2
blocks (t.p.22), and check that the waveform is a good sine wave of frequency
approximately 1.45MHz. This indicates that only the upper sideband is being passed by
the block. Check that the waveform is reasonably good sinusoid for all audio
modulating frequencies (i.e. all positions of the audio oscillator’s frequency pot). If this
is not the case, it may be that the balance pot (in the balanced modulator & band pass
filter circuit 2 blocks) needs adjusting, to remove any residual carrier component at 1
MHz. If a reasonably clean sine wave still cannot be obtained for all audio frequencies,
then the response of the tuned circuit band pass filter needs adjusting. This is achieved
by adjusting transformer T4 in the balanced modulator & band-pass filter circuit 2 block
When the modulating audio signal is swept over its entire range (a range of 3.4 KHz –
300 Hz = 3.1 KHz), the SSB waveform at t.p. 22 sweeps over the same frequency
range. So single-sideband modulation has simply served to shift our range of audio
frequencies up so they are centered on 1.455 MHz.
15. Monitor the 1.455 MHz SSB signal (at t.p. 22) together with the audio modulating
signal (t.p. 15), triggering the scope with the later. Reduce the amplitude of the audio
modulating signal to zero (by means of the audio oscillator block's amplitude pot), and
note that the amplitude of the SSB signal also drops to zero, as expected. Return the
amplitude pot to its MAX position.
16. Examine the final SSB output (at t.p. 22) together with the output from the output
amplifier block (t.p. 13). Note that the final SSB waveform appears, amplified slightly,
at t.p. 13. As we still see later, it is the output signal which will be transmitted to the
receiver.
17. By using the microphone the human voice can be used as the audio modulating
signal, instead of using ST2201's audio oscillator block. Connect the microphone to the
external audio input on the ST2201 board, and put the audio input select switch in the
EXT position.
The input signal to the audio input select may be taken from an external microphone
(supplied with the module) of from a cassette recorder, by choosing the appropriate
switch setting on the module.
RESULT:-
PRECAUTIONS:-
1. Do not use open ended wires for connecting to 230 V power supply.
2. Before connecting the power supply plug into socket, ensure power supply should be
switched off
3. Ensure all connections should be tight before switching on the power supply.
4. Take the reading carefully.
5. Power supply should be switched off after completion of experiment
QUIZ / ANSWERS:-
Ans. AGC circuit is used to prevent overloading receiver and also reduce the effect of
fluctuations in the received signal strength.
Q.4. What is the required oscillator frequency in AM receiver?
Ans. The required oscillator frequency in AM receiver is always higher than the signal
frequency.
Q.5. What is the use of pilot carrier in SSB?
Ans. For frequency stabilization.
Q.6. What are the methods of SSB generation?
Ans. Frequency discrimination and (b) Phase discrimination.
Q.7. What are the advantages of SSB over DSB?
Ans. 1.Transmitter circuit is more stable. 2.Increased transmission efficiency 3.Reduced
BW.
Q.8.Which type of modulation is used in India for video transmission?
Ans. Amplitude Modulation.
Q.9. Which filter is used in SSB generation?
Ans. Mechanical filters.
Q.10. How AM signals with large carrier are detected?
Ans. By using envelope detector.
EXPERIMENT No.3
AIM:- To study envelope detector for AM signal and observe peak diagonal clipping
effect.
APPARATUS REQUIRED:- (i) C.R.O. (ii) CRO Probe (ii) DSB/SSB Transmitter (ST
2201) and Receiver Trainer (ST 2202) (iv) Connecting leads
THEORY:-
The AM Transmitter:
The transmitter circuits produce the amplitude modulated signals which are used to
carry information over the transmission to the receiver. The main parts of the
transmitter are shown in Fig.11. In Fig.11 & 12, we can see that the peak-to-peak
voltage in the AM waveform increase and decrease in sympathy with the audio signal.
AM Reception: The 'em' wave from the transmitting antenna will travel to the receiving
antenna carrying the information with it. The stages of AM reception are shown in Fig.
3. :
Figure 3: AM Reception
Envelope Detector:
The simplest form of envelope detector is diode detector. The function of the diode
detector is to extract the audio signal from the signal at the output of the IF amplifiers. It
performs this task in a very similar way to a half wave rectifier converting an AC input
to a DC output. Fig.4 shows a simple circuit diagram of the diode detector.
.
Fig. 5 Clipping in Diode Detector
The result is an output which contains three components :
1. The wanted audio information signal.
2. Some ripple at the IF frequency.
3. A positive DC voltage level.
At the input to the audio amplifier, a low pass filter is used to remove the IF ripple and a
capacitor blocks the DC voltage level. Fig.6 shows the result of the information signal
passing through the diode detector and audio amplifier. The remaining audio signals are
then amplified to provide the final output to the loudspeaker.
PROCEDURE:-
1. Position the ST2201 & ST2202 modules, with the ST2201 board on the left, and a
gap of about three inches between them.
2. Ensure that the following initial conditions exist on the ST2201 board.
a. Audio oscillator's amplitude pot in fully clockwise position.
b. Audio input select switch in INT position.
c. Balance pot in balanced modulator & band pass filter circuit 1 block, in full
clockwise position;
d. Mode switch in DSB position.
e. Output amplifier's gain pot in full counter-clockwise position.
f. TX output select switch in ANT position:
g. Audio amplifier’s volume pot in fully counter-clockwise position.
h. Speaker switch in ON position.
i. On-board antenna in vertical position, and fully extended.
3. Ensure that the following initial conditions exist on the ST2102 board:
a. RX input select switch in ANT position.
b. R.F. amplifier's tuned circuit select switch in INT position.
c. R.E amplifier's gain pot in fully clock-wise position;
d. AGC switch in INT position.
e. Detector switch in diode position.
f. Audio amplifier's volume pot in fully counter-clockwise position.
g. Speaker switch in ON position.
h. Beat frequency oscillator switch in OFF position.
i. On-board antenna in vertical position, and fully extended.
4. Turn on power to the modules.
5. On the ST2202 module, slowly turn the audio amplifier's volume pot clockwise, until
sounds can be heard from the on-board loudspeaker. Next, turn the vernier tuning dial
until a broad cast station can be heard clearly, and adjust the volume control to a
comfortable level.
Note: If desired, headphones (supplied with the module) may be used instead of the on-
board loudspeaker. To use the headphones, simply plug the headphone jack into the
audio amplifier block's headphones socket, and adjust controlled block's volume pot.
6. The first stage or 'front end' of the ST2202 AM receiver is the R.F amplifier stage.
This is a wide -bandwidth tuned amplifier stage, which is tuned into the wanted station
by means of the tuning dial. Once it has been tuned into the wanted station, the R.F.
amplifier, having little selectivity, will not only amplify, but also those frequencies that
are close to the wanted frequency. As we will see later, these nearby frequencies will be
removed by subsequent stages of the receiver, to leave only the wanted signal. Examine
the envelope of the signal at the R.F. amplifier's output (at t.p. 12), with an a.c. -
coupled oscilloscope channel. Note that:
a. The amplifier's output signal is very small in amplitude (a few tens of
millivolts at the most). This is because one stage of amplification is not
sufficient to bring the signal's amplitude up to a reasonable level.
b. Only a very small amount of amplitude modulation can be detected, if any.
This is because there are many unwanted frequencies getting through to the amplifier
output, which tend to 'drown out' the wanted AM Signal. You may notice that the
waveform itself drifts up and down on the scope display, indicating that the waveform's
average level is changing. This is due to the operation of the AGC circuit, which will be
explained later.
7. The next stage of the receiver is the mixer stage, which mixes the R.F. amplifier's
output with the output of a local oscillator. The Frequency of the local oscillator is also
tuned by means of the tuning dial, and is arranged so that its frequency is always 455
KHz above the signal frequency that the R.F. amplifier is tuned to. This fixed frequency
difference is always present, irrespective of the position of the tuning dial, and is
arranged so that its frequency is always 455 KHz above the signal frequency that the
R.F. amplifier is tuned to. This fixed frequency difference is always present,
irrespective of the position of the tuning dial, and is known as the intermediate
frequency (IF for short). This frequency relationship is shown below, for some arbitrary
position of the tuning dial.
a. By mixing the local oscillator's output sine wave with the output from the
R.F. amplifier block. This produces three frequency components:
The local oscillator frequency = (f sig + IF)
The sum of the original two frequencies, f sum = (2 f sig + IF)
The difference between the original two frequencies,
b. By strongly attenuating all components. Except the difference frequency, IF
this is done by putting a narrow-bandwidth band pass filter on the mixer's
output.
The end result of this process is that the carrier frequency of the selected AM station is
shifted down to 455 KHz (the IF Frequency), and the sidebands of the AM signal are
now either side of 455 KHz.
9. Note that, since the mixer's band pass filter is not highly selective, it will not
completely remove the local oscillators and sum frequency components from the
mixer's output. this is the case particularly with the local oscillator component, which is
much larger in amplitude than the sum and difference components. Examine the output
of the mixer block (t.p. 20) with an a.c. coupled oscilloscope channel, and note that the
main frequency component present changes as the tuning dial is turned. This is the local
oscillator component, which still dominates the mixer's output, in spite of being
attenuated by the mixer's band pass filter.
10. Tune in to a strong broadcast station again and note that the monitored signal shows
little, if any, sign of modulation. This is because the wanted component, which is now
at the IF frequency of 455 KHz, is still very small in component, which is now at the IF
frequency of 455 KHz, is still very small in comparison to the local oscillator
component. What we need to do now is to preferentially amplify frequencies around
455 KHz, without amplifying the higher-frequency local oscillator and SUM
components. This selective amplification is achieved by using two IF amplifier stages,
IF amplifier 1 and IF amplifier 2, which are designed to amplify strongly a narrow band
of frequencies around 455 KHz, without amplifying frequencies on either side of this
narrow band. These IF amplifiers are basically tuned amplifiers which have been pre-
tuned to the IF frequency-they have a bandwidth just wide enough to amplify the 455
KHz carrier and the AM sidebands either side of it. Any frequencies outside this narrow
frequency band will not be amplified. Examine the output of IF amplifier 1 (at. t.p. 24)
with an a.c.-coupled oscilloscope channel, and note that:
a. The overall amplitude of the signal is much larger than the signal amplitude at
the mixer's output, indicating that voltage amplification has occurred.
b. The dominant component of the signal is now at 455 KHz, irrespective of any
particular station you have tuned into. This implies that the wanted signal, at the
IF frequency, has been amplified to a level where it dominates over the
unwanted components.
c. The envelope of the signal is modulated in amplitude, according to the sound
information being transmitted by the station you have tuned into.
11. Examine the output of IF amplifier 2 (t.p.28) with an a.c.-coupled oscilloscope
channel, noting that the amplitude of the signal has been further amplified by this
second IF amplitude of the signal has been further amplified by this second IF amplifier
stage. IF amplifier 2 has once again preferentially amplified signals around the IF
frequency (455 KHz), so that:
a. The unwanted local oscillator and sum components from the mixer are now so
small in comparison, that they can be ignored totally,
b. Frequencies close to the I F frequency, which are due to stations close to the
wanted station, are also strongly attenuated.
The resulting signal at the output of IF amplifier 2 (t.p.28) is therefore composed almost
entirely of a 455 KHz carrier, and the A.M. sidebands either side of it carrying the
wanted audio information.
12. The next step is extract this audio information from the amplitude variations of the
signal at the output of IF amplifier 2. This operation is performed by the diode detector
block, whose output follows the changes in the amplitude of the signal at its input. To
see how this works, examine the output of the diode detector block (t.p.31), together
with the output from. IF amplifier 2 (at t.p.28). Note that the signal at the diode
detector's output:
· Follows the amplitude variations of the incoming signal as required:
· Contains some ripple at the IF frequency of 455 KHz, and
· The signal has a positive DC offset, equal to half the average peak to peak amplitude
of the incoming signal. We will see how we make use of this offset later on, when we
look at automatic gain control (AGC).
13. The final stage of the receiver is the audio amplifier block contains a simple low-
pass filter which passes only audio frequencies, and removes the high frequency ripple
from the diode detector's output signal. This filtered audio signal is applied to the input
of an audio power amplifier, which drives on board loudspeaker (and the headphones, if
these are used). The final result is the sound you are listening to the audio signal which
drives the loudspeaker can be monitored at t.p. 39 (providing that the audio amplifier
block's volume pot is not in its minimum volume position). Compare this signal with
that at the diode detector's output (t.p. 31), and note how the audio amplifier block's low
pass filter has 'cleaned up' the audio signal. You may notice that the output from the
audio amplifier block (t.p. 39) is inverted with respect to the signal at the output of the
diode detector (t.p. 31) this inversion is performed by the audio power amplifier IC, and
in no way affects the sound produced by the receiver.
14. Now that we have examined the basic principles of operation of the ST2202
receiver for the reception and demodulation of AM broadcast signals, we will try
receiving the AM signal from the ST2201 transmitter. Presently, the gain of ST2201's
output amplifier block is zero, so that there is no output from the Transmitter. Now turn
the gain pot in ST2201's output amplifier block to its fully clockwise (maximum gain)
position, so that the transmitter generates an AM signal. On the ST2201 module,
examine the transmitter's output signal (t.p.13), together with the audio modulating
signal (t.p.1), triggering the 'scope with the signal'. Since ST2201 TX output select
switch is in the ANT position, the AM signal at t.p.13 is fed to the transmitter's antenna.
Prove this by touching ST2201's antenna, and nothing that the loading caused by your
hand reduces the amplitude of the AM waveform. at t.p.13. The antenna will propagate
this AM signal over a maximum distance of about 1.4 feet. We will now attempt to
receive the propagated AM waveform with the ST2201/ ST2202 board, by using the
receiver's on board antenna.
Note: If more than one ST2201 transmitter/receiver system is in use at one time, it is
possible that there may be interference between nearby transmitters if antenna
propagation is used. To eliminate this problem, use a cable between each
RESULT:-
AM signal has been demodulated using envelope detector and peak diagonal clipping
effect has been observed.
PRECAUTIONS:-
1. Do not use open ended wires for connecting 230 V power supply.
2. Before connecting the power supply plug into socket, ensure power supply should be
switched off.
3. Ensure all connections should be tight before switching on the power supply.
4. Take the reading carefully.
QUIZ / ANSWERS:-
EXPERIMENT No.4
THEORY:-
Frequency Deviation It is the amount by which carrier frequency is varied from its
unmodulated value and it is same as frequency variation.
Max Frequency deviation ∆W =│KfX(t)│max……………………(10)
Very often we write ∆W = δ ;
Maxium allowed deviation =75 khz
Deviation Ratio
It is the ratio of deviation in carrier frequency to the maximum modulating frequency.
In single tone FM, modulation index and the deviation ratio will be the same. If
the modulating signal(AF) is 15 kHZ at a certain amplitude and the carrier shift is
75kHZ, the transmitter will produce eight(8) significant sidebands as shown in the table
above. The corresponding deviation ratio / modulation index is known as Maximum
Deviation Ratio.
However in multi tone FM, the amplitude of highest frequency component may
not necessarily be maximum. Modulation index will be different for each signal
frequency component. The deviation ratio in this case will not be equal to any particular
modulation index.
Frequency Spectrum
Analysis of equation (15) which is a sine function of another sine function shows:
S(t) = A{ J0.( mf) sin W ct + J1( mf){sin(W ct+ W mt) + sin(W ct - W mt)}
+J2( mf){sin(W ct+2Wmt) + sin(W ct - 2Wmt)}
+J3( mf){sin(W ct+3Wmt) + sin(W ct - 3Wmt)}
+J4( mf){sin(W ct+4Wmt) + sin(W ct - 4Wmt)]+………… ]
The output consists of a carrier and an apparently infinite number of pairs of side bands
having an amplitude coefficient Jn (mf), which is a Bessel function of mf and of the
order n denoted by the subscript. Values of these coefficients are available readily in
table form as well as in graphic form as shown below.
Analysis of FM waveforms Wave forms of carrier, modulating signal, modulated
signal as well as graphical form of plot of Jn (mf) versus values of mf are shown below.
It can be seen that:
1. Unlike AM, FM output contains carrier component of frequency fc as well as
infinite number of side bands separated from the carrier frequency by fm, 2fc,
3fc,…….and thus have a recurrence frequency of fm.
2. The values of each Jn coefficient, which represent the amplitude of a pair of side
bands, fluctuates on either side of zero, gradually diminishes with increasing value of
mf like damped oscillations. The values of Jn coefficients also eventually decrease, but
only past increased value of n. As the value of mf increases, the value of J0 decreases
from 1 and the values of J1 to Jn increases from 0 and fluctuate around mean value of 0.
3. The modulation index determines how many side band components have significant
values.
4. Unlike AM, in FM, while the amplitude of modulated signal remains constant, the
value of the carrier component decreases with increase in mf like a damped oscillation.
It means that while the total transmitted power remains constant in FM, the number side
bands of significant amplitude (and therefore the effective band width) increase with
increase in mf .This increases the immunity to noise in FM unlike AM.
5. As the value of mf increases, The carrier component becomes zero for certain values
of modulation index, called eigen values which are approximately 2.4,5.5.8.6.11.8 and
so on. These disappearances of carrier for specific values of mf, form a handy basis for
measuring deviation.
BLOCK DIAGRAM:-
The audio oscillator supplies the information signal and could, if we wish, be replaced
by a microphone and AF amplifier to provide speech and music instead of the sine wave
signals that we are using with ST2203. The FM modulator is used to combine the
carrier wave and the information signal in much the same way as in the AM transmitter.
The only difference in this case is that the generation of the carrier wave and the
modulation process is carried out in the same block. It is not necessary to have the two
processes in same block, but in our case, it is. The output amplifier increases the power
in the signal before it is applied to the antenna for transmission just as it did in the
corresponding block in the FM transmitter.
Figure 1: FM Transmitter
Controlling the VCO :
To see how the VCO is actually controlled, let us assume that it is running at the same
frequency as an un-modulated input signal. The input signal is converted into a square
wave and, together with the VCO output, forms the two inputs to an Exclusive - OR
gate. Remember that the Exclusive - OR gate provides an output whenever the two
inputs are different in value and zero output whenever they are the same. The provided
an output from the Exclusive -OR gate with an on-off ratio of unity and an average
voltage at the output of half of the peak value. Now let us assume that the FM signal at
the input decreases in frequency (see fig. 34). The period of the 'squared up' FM signal
increases and the mean voltage level from the Exclusive -OR gate decreases. The mean
voltage level is both the demodulated output and the control voltage for the VCO. The
VCO frequency will decrease until its frequency matches the incoming FM signal.
PROCEDURE:--
1. Ensure that the following initial conditions exist on the ST2202 board.
a. All switched faults off.
b. Amplitude pot (in mixer amplifier block) in fully clockwise position.
c. VCO switch in 'ON' position.
2. Turn the audio oscillator block's amplitude pot to its fully clockwise position, and
examine the block's output t.p.1 on an oscilloscope. This is the audio frequency sine
wave, which will be used as our modulating signal. Note that the sine wave's frequency
can be adjusted from about 300Hz to approximately 3.4 KHz, by adjusting the audio
oscillator's frequency pot.
3. Connect the output of audio oscillator to VCO section’s MOD In socket.
4. Turn ON the power supply.
5. Observe the modulating signal and modulated output at the VCO’s MOD OUT
socket by using CRO.
4. Calculate mf = δ / fm.
5. Vary the modulating frequency keeping carrier freq constant and repeat steps 3 & 4.
6. Vary the carrier frequency keeping modulator freq constant and repeat steps 3 & 4.
7. Tabulate the results.
OBSERVATION TABLE:-
1.
2.
3.
SAMPLE CALCULATION:-
m f = δ / fm
= 2 × 8.3 × 103 / 1000
= 16.6
WAVEFORMS:-
RESULT:-
PRECAUTIONS:-
1. Do not use open ended wires for connecting to 230 V power supply.
2. Before connecting the power supply plug into socket, ensure power supply should be
switched off
3. Ensure all connections should be tight before switching on the power supply.
4. Take the reading carefully.
5. Power supply should be switched off after completion of experiment.
QUIZ / ANSWERS:-
EXPERIMENT No.5
THEORY:
Simply connect the audio output to the socket labeled VCO modulation in and observe
the FM modulated waveform on the oscilloscope at the VCO modulation out terminal.
Keep the amplitude of audio output to approx 4 V p-p and frequency 2 kHz approx.
Observe a stable FM modulated waveform on CRO Now turn the timebase speed of
CRO little higher and you will observe the same waveforms as under (like Bessel
function).
Now disconnect the audio amplifier's output from modulation IN and connect it to audio
IN, keep the reactance/varactor switch in varactor position. Observe the output of mixer
/ amplifier circuit. Keep the oscilloscope in X10 position now observe the full
waveform by shifting the X position. It is as shown in fig. Mark the resemblance
between the output of VCO and the Varactor modulator. They are same. The freq.
modulation in VCO was more because the Frequency difference between the carrier and
the modulating signal was very less.
FM Using Reactance Modulator: In fig. 3, the left hand half is the previous varactor
modulator simply an oscillator and a tuned circuit, which generates the un-modulated
carrier. The capacitor C and the resistor R are the two components used for the phase
shifting, and together with the transistor, form the voltage controlled capacitor. This
voltage-controlled capacitor is actually in parallel with the tuned circuit. This is not easy
to see but figure 18 may be helpful. In the first part of the figure, the capacitor and
associated components have been replaced by the variable capacitor, shown dotted.
BLOCK DIAGRAM:-
PROCEDURE:-
1. Ensure that the following initial conditions exist on the ST2202 board.
a. All switched faults off.
b. Amplitude pot (in mixer amplifier block) in fully clockwise position.
c. VCO switch (in phase locked loop detector block) in 'OFF' position.
2. Make the connections as shown in fig 3.
3. Switch 'on' the power.
4. Turn the audio oscillator block's amplitude pot to its fully clockwise position, and
examine the block's output t.p.1 on an oscilloscope. This is the audio frequency sine
wave, which will be used as our modulating signal. Note that the sine wave's frequency
can be adjusted from about 300Hz to approximately 3.4KHz, by adjusting the audio
oscillator's frequency pot. Note also that the amplitude of this modulating signal is
adjusted by audio oscillator amplitude pot. Leave the amplitude pot in min. position.
5. Connect the output socket of the audio oscillator block to the audio input socket of
the modulator circuit’s block.
For FM Varactor Modulator
6. Set the reactance / varactor switch to the varactor position. This switch selects the
varactor modulator and also disables the reactance modulator to prevent any
interference between the two circuits.
7. The output signal from the varactor modulator block appears at t.p. 24 before being
buffered and amplified by the mixer / amplifier block, any capacitive loading (e.g. due
to oscilloscope probe) may slightly affect the modulators output frequency. In order to
avoid this problem we monitor the buffered FM output signal the mixer / amplifier
block at t.p.34.
8. Put the varactor modulator's carrier frequency pot in its midway position, and then
examine t.p. 34. Note that it is a sine wave of approximately 1.2 Vp-p, centered on 0V.
This is our FM carrier, and it is un-modulated since the varactor modulators audio input
signal has zero amplitude.
9. The amplitude of the FM carrier (at t.p.34) is adjustable by means of the
mixer/amplifier block's amplitude pot, from zero to its pot level. Try turning this pot
slowly anticlockwise, and note that the amplitude of the FM signal can be reduced to
zero. Return the amplitude pot to its fully clockwise position.
10. Try varying the carrier frequency pot and observe the effects.
11. Also, see the effects of varying the amplitude and frequency pots in the audio
oscillator block.
12. Turn the carrier frequency pot in the varactor modulator block slowly clockwise and
note that in addition to the carrier frequency increasing there is a decrease in the amount
of frequency deviation that is present.
13. Return the carrier frequency pot to its midway position, and monitor the audio input
(at t.p.6) and the FM output (at p.34) triggering the oscilloscope on the audio input
signal. Turn the audio oscillator's amplitude pot throughout its range of adjustment, and
note that the amplitude of the FM output signal does not change. This is because the
audio information is contained entirely in the signals frequency and not in its amplitude.
14. By using the optional audio input module ST2108 the human voice can be used as
the audio modulating signal, instead of using ST2203's audio oscillator block. If you
have an audio input module, connect the module's output to the audio input socket in the
modulator circuit’s block. The input signal to the audio input module may be taken
from an external microphone be (supplied with the module) or from a cassette recorder,
by choosing the appropriate switch setting on the module.
For FM Reactance Modulator:
6. Put the reactance /varactor switch in the reactance position. This switches the output
of the reactance modulator through to the input of the mixer/amplifier block ~ and also
switches off the varactor modulator block to avoid interference between the two
modulators.
7. The output signal from the reactance modulator block appears at tp.13, before being
buffered and amplified by the mixer/amplifier block. Although the output from the
reactance modulator block can be monitored directly at tp.13, any capacitive loading
affect this point (e.g. due to an oscilloscope probe) may slightly affect the modulator's
output frequency. In order to avoid this problem we will monitor the buffered FM
output signal from the mixer/amplifier block at t.p. 34.
8. Put the reactance modulator's pot in its midway position (arrow pointing towards top
of PCB) then examine t.p. 34. Note that the monitored signal is a sine wave of
approximately 1.2V peak/peak centered on 0 volts D.C. This is our FM carrier, and it is
presently un-modulated since the reactance modulator's audio input signal has, zero
amplitude.
9. The amplitude of the FM carrier (at t.p.34) is adjustable by means of the
mixer/amplifier block's amplitude pot, from zero to its present level. Try turning this pot
slowly anticlockwise, and note that the amplitude of the FM signal can be reduced to
zero. Return the amplitude pot to its fully clockwise position.
10. The frequency of the FM carrier signal (at t.p.34) should be approximately 455Khz
at the moment This carrier frequency can be varied from 453Khz to 460Khz (approx.)
by adjusting the carrier frequency pot in the reactance modulator block. Turn this pot
over its range of adjustment and note that the frequency of the monitored signal can be
seen to vary slightly. Note also that the carrier frequency is maximum when the pot is in
fully clockwise position.
11. Try varying the amplitude & frequency pot in audio oscillators block, and also sees
the effect of varying the carrier frequency pot in the mixer/amplifiers block.
12. Monitor the audio input (at t.p.6) and the FM output (at t.p.34) triggering the
oscilloscope on the audio input signal. Turn the audio oscillator's amplitude pot
throughout its range of adjustment and note that the amplitude of the FM output signal
does not change. This is because the audio information is contained entirely in the
signal's frequency, and not in its amplitude.
RESULT:-
PRECAUTIONS:-
1. Do not use open ended wires for connecting to 230 V power supply.
2. Before connecting the power supply plug into socket, ensure power supply should be
switched off
3. Ensure all connections should be tight before switching on the power supply.
4. Take the reading carefully.
5. Power supply should be switched off after completion of experiment.
QUIZ / ANSWERS:-
EXPERIMENT No.6
THEORY:-
A FM receiver is very similar to an AM receiver. The most significant change is that the
demodulator must now extract the information signal from a frequency rather than
amplitude modulated wave.
Figure 1: FM Receiver
and decreases, the VCO frequency is made to follow it. To do this, the input control
voltage must increase and decrease. These change of DC voltage level that forms the
demodulated signal. The AM signal then passes through a signal buffer to prevent any
loading effects from disturbing the VCO and then through an audio amplifier if
necessary. The frequency response is highly linear as shown in figure 2.
FOSTER SEELEY DETECTOR
The foster Seeley circuit is shown in fig. 4. At first glance, it looks rather complicated
but it becomes simpler if we consider it a bit at a time.
FM input signal decreased below the unmodulated value, the phase shift due to
capacitor C5 increases above 90° as the parallel tuned circuit becomes slightly
inductive. This causes the voltage across diode D2 to increase and the final output from
the demodulator becomes negative. The effect of noise is to change the amplitude of the
incoming FM signal resulting in a proportional increase and decrease in the amplitude
of diode voltages VD1 and VD2 and the difference in voltage is the demodulated
output, the circuit is susceptible to noise interference and should be preceded by a noise
limiter circuit.
BLOCK DIAGRAM:-
PROCEDURE:-
5. The low pass filter/amplifier block strongly attenuates the high-frequency ripple
component at the detector's output and also blocks the D.C. offset voltage.
Consequently the signal at the output of the low- pass filter/amplifier block (at t.p.73)
should be very closely resemble the original audio making signal, if not then slowly
adjust the freq. adjust pot of PLL block.
6. Adjust the audio oscillator block's amplitude and frequency pots, and compare the
original audio signal with the final demodulated signal.
FM Detection using Foster-Seelay Detector:
1. Ensure that the following initial conditions exist on the ST2203 module:
a. All switched faults OFF;
b. Audio amplifier block's amplitude pot in fully clockwise (MAX)
position.
c. Audio amplifier block's frequency pot in fully counter-clockwise
(MIN) position.
d. Amplitude pot (in the mixer/amplifier block) in fully clockwise
position.
e. VCO switch (in phase-locked loop detector block) in OFF position.
2. Make connection as shown in figure 42
3. Turn on power to the ST2203 module.
4. We will now investigate the operation of the foster-Seeley detector on the ST2203
module. In the Foster-Seeley / ratio detector block, select the Foster-Seeley detector by
putting the switch in the Foster-Seeley position.
5. Initially, we will use the varactor modulator to generate our FM signal, since this is
the more linear of the two modulators, as fast as its frequency/voltage characteristic is
concerned. To select the varactor modulator, put the reactance/ varactor switch in the
varactor position. Ensure that the varactor modulator's carrier frequency pot is in the
midway position.
6. The audio oscillator's output signal (which appears at t.p.1) is now being used by the
varactor modulator, to frequency-modulate a 455Khz carrier sine wave. As we saw
earlier, this FM waveform appears at the FM output socket from the mixer/amplifier
block. You will probably need to have an X-expansion control on your oscilloscope.
7. Now monitor the audio input signal to the varactor modulator block (at t.p. 14)
together with the foster-seeley output from the foster-seeley/ratio detector block (at t.p.
52), triggering the oscilloscope on t.p. 14. The signal at t.p. 52 should contain two
components:
· A sine wave at the same frequency as the audio signal at t.p. 14.
· A High frequency ripple component of small amplitude.
8. The low-pass filter/amplifier strongly attenuates this high-frequency ripple
component, and blocks any small D.C. offset voltage that might exist at the detector's
output. Consequently, the signal at the output of the low-pass filter/ amplifier block (at
t.p. 73) should very closely resemble the original audio modulating signal.
9. Monitor the audio input to the varactor modulator (at t.p. 14) and the output of the
low pass filter / amplifier block (at t.p. 73) and adjust the gain pot (in the low pass filter/
amplifier block) until the amplitudes of the monitored audio waveforms are the same.
10. Adjust the audio oscillator block's amplitude and frequency pots, and compare the
original audio signal with the final demodulated signal.
RESULT:-
PRECAUTIONS:-
1. Do not use open ended wires for connecting to 230 V power supply.
2. Before connecting the power supply plug into socket, ensure power supply should be
switched off
3. Ensure all connections should be tight before switching on the power supply.
4. Take the reading carefully.
5. Power supply should be switched off after completion of experiment.
QUIZ / ANSWERS:-
EXPERIMENT No.7
APPARATUS REQUIRED:- (i)C.R.O. (ii) CRO Probe (ii) DSB/SSB Transmitter (ST
2201) and Receiver Trainer (ST 2202) (iv) Connecting leads
BLOCK DIAGRAM:-
THEORY:-
(for instance). Tuning of the local oscillator and the RF stage may use a variable
capacitor, or varicap diode. The tuning of one (or more) tuned circuits in the RF stage
must track the tuning of the local oscillator.
Mixer stage: The signal is then fed into a circuit where it is mixed with a sine wave
from a variable frequency oscillator known as the local oscillator (LO). The mixer uses
a non-linear component to produce both sum and difference beat frequencies signals,
each one containing the modulation contained in the desired signal. The output of the
mixer may include the original RF signal at fd, the local oscillator signal at fLO, and the
two new frequencies fd+fLO and fd-fLO. The mixer may inadvertently produce additional
frequencies such as 3rd- and higher-order intermodulation products. The undesired
signals are removed by the IF bandpass filter, leaving only the desired offset IF signal at
fIF which contains the original modulation (transmitted information) as the received
radio signal had at fd.
Intermediate frequency stage:The stages of an intermediate frequency amplifier are
tuned to a particular frequency not dependent on the receiving frequency; this greatly
simplifies optimization of the circuit.[6] The IF amplifier (or IF strip) can be made
highly selective around its center frequency fIF, whereas achieving such a selectivity at a
much higher RF frequency would be much more difficult. By tuning the frequency of
the local oscillator fLO, the resulting difference frequency fLO - fd (or fd-fLO when using so-
called low-side injection) will be matched to the IF amplifier's frequency fIF for the
desired reception frequency fd. One section of the tuning capacitor will thus adjust the
local oscillator's frequency fLO to fd + fIF (or. less often, to fd - fIF) while the RF stage is
tuned to fd. Engineering the multi-section tuning capacitor (or varactors) and coils to
fulfill this condition across the tuning range is known as tracking. Other signals
produced by the mixer (such as due to stations at nearby frequencies) can be very well
filtered out in the IF stage, giving the superheterodyne receiver its superior
performance. However, if fLO is set to fd + fIF , then an incoming radio signal at fLO + fIF
will also produce a heterodyne at fIF; this is called the image frequency and must be
rejected by the tuned circuits in the RF stage. The image frequency is 2fIF higher (or
lower) than fd, so employing a higher IF frequency fIF increases the receiver's image
rejection without requiring additional selectivity in the RF stage. Usually the
intermediate frequency is lower than the reception frequency fd, but in some modern
receivers (e.g. scanners and spectrum analyzers) it is more convenient to first convert an
entire band to a much higher intermediate frequency; this eliminates the problem of
image rejection. Then a tunable local oscillator and mixer convert that signal to a
second much lower intermediate frequency where the selectivity of the receiver is
accomplished. In order to avoid interference to receivers, licensing authorities will
avoid assigning common IF frequencies to transmitting stations. Standard intermediate
frequencies used are 455 kHz for medium-wave AM radio, 10.7 MHz for broadcast FM
receivers, 38.9 MHz (Europe) or 45 MHz (US) for television, and 70 MHz for satellite
and terrestrial microwave equipment.
Bandpass filter: The IF stage includes a filter and/or multiple tuned circuits in order to
achieve the desired selectivity. This filtering must therefore have a band pass equal to or
less than the frequency spacing between adjacent broadcast channels. Ideally a filter
would have a high attenuation to adjacent channels, but maintain a flat response across
the desired signal spectrum in order to retain the quality of the received signal. This
may be obtained using one or more dual tuned IF transformers or a multipole ceramic
crystal filter.
Demodulation: The received signal is now processed by the demodulator stage where
the audio signal (or other baseband signal) is recovered and then further amplified. AM
demodulation requires the simple rectification of the RF signal (so-called envelope
detection), and a simple RC low pass filter to remove remnants of the intermediate
frequency. FM signals may be detected using a discriminator, ratio detector, or phase-
locked loop. Continuous wave (morse code) and single sideband signals require a
product detector using a so-called beat frequency oscillator, and there are other
techniques used for different types of modulation. The resulting audio signal (for
instance) is then amplified and drives a loudspeaker. When so-called high-side injection
has been used, where the local oscillator is at a higher frequency than the received
signal (as is common), then the frequency spectrum of the original signal will be
reversed. This must be taken into account by the demodulator (and in the IF filtering) in
the case of certain types of modulation such as single sideband.
RECEIVER CHARACTERISTICS:
The important characteristics of receivers are sensitivity, selectivity, & fidelity
described as follows:
Sensitivity:
The sensitivity of radio receiver is that characteristic which determines the minimum
strength of signal input capable of causing a desired value of signal output. Therefore,
expressing in terms of voltage or power, sensitivity can be defined as the minimum
voltage or power at the receiver input for causing a standard output. In case of
amplitude-modulation broadcast receivers, the definition of sensitivity has been
standardized as "amplitude of carrier voltage modulated 30% at 400 cycles, which when
applied to the receiver input terminals through a standard dummy antenna will develop
an output of 0.5 watt in a resistance load of appropriate value substituted for the loud
speaker" .
Selectivity:
The selectivity of a radio receiver is that characteristic which determines the extent to
which it is capable of differentiating between the desired signal and signal of other
frequencies.
Fidelity:
This is defined as the degree with which a system accurately reproduces at its output
the essential characteristics of signals which is impressed upon its input.
PROCEDURE:-
2. Apply AM signal with 400 Hz modulating frequency and 30% modulation taken
from AM generator into Rx input socket.
3. Set the input carrier frequency to suitable value that lies within the AM band (525
KHz - 1600 KHz). Also set signal level to 100mV.
4. Tune the Receiver using tuning control. Also adjust gain potentiometer provided in
R.F. amplifier section of ST2202 so as to get unclipped demodulated signal at detector's
output (output of audio amplifier).
5. Note the voltage level at receiver's final output stage i.e. audio amplifier's output on
CRO (voltage at resonance (Vr)).
6. Now gradually offset the carrier frequency in suitable steps of 5 KHz or 10 KHz
below and above the frequency adjusted in step 2 without changing the tuning of
receiver while maintaining the input signal level.
7. Now record the signal level at output of audio amplifier for different input carrier
frequency, on CRO (i.e. voltage off resonance (Vi)).
8. Tabulate the readings as under:
RESULT:-
Superhetrodyne receiver has been studied and plot for receiver parameters viz.
sensitivity, selectivity and fidelity has been drawn.
PRECAUTIONS:-
1. Do not use open ended wires for connecting to 230 V power supply.
2. Before connecting the power supply plug into socket, ensure power supply should be
switched off
3. Ensure all connections should be tight before switching on the power supply.
4. Take the reading carefully.
5. Power supply should be switched off after completion of experiment.
QUIZ / ANSWERS:-
THEORY:-
In Pulse Modulation some parameter of the pulsed carrier is varied according to the
instantaneous value of the modulating signal. Pulse modulation may be broadly
subdivided into two categories: Analog & Digital. In the former, the indication of
sample amplitude may be infinitely variable, while in the latter a code which indicates
the sample amplitude to the nearest pre-determined level is sent. Pulse-Amplitude &
Pulse-Time Modulation are both analog while the Pulse-code and Delta modulation are
both digital. All the modulation systems have sampling in common, but they differ from
each other in the manner of indicating the sample amplitude. In PAM the signal is
sampled at a regular intervals and each sample is made proportional to the instant of
sampling. In single polarity PAM is fixed, AC level is acted to ensure that all the pulse
are +Ve going. The frequency spectrum is decaying but with decaying amplitude. The
rate of decay depends upon the width of the pulses. As the pulses are made wider, the
spectrum decays faster.
BLOCK DIAGRAM:-
Pulse Unipolar to
generator Bipolar
Converter
PAM
Modula-
tor
Audio
frequency
generator
WAVEFORM FORMS:-
Fig 1: Principle of PAM; (1) original Signal, (2) PAM-Signal, (a) Amplitude of Signal,
(b) Time
PROCEDURE:-
RESULT:-
PRECAUTIONS:-
1. Do not use open ended wires for connecting to 230 V power supply.
2. Before connecting the power supply plug into socket, ensure power supply should be
switched off.
3. Ensure all connections should be tight before switching on the power supply.
4. Take the reading carefully.
5. Power supply should be switched off after completion of experiment.
QUIZ / ANSWERS:-
EXPERIMENT No.8(b)
THEORY:-
PWM is a part of PTM modulation. The PWM is also called PDM (pulse duration
modulation) and sometimes it is also called PLM (pulse length modulation).
In PWM width of each pulse depends on the instantaneous value of the base
band signal at the sampling instant. In pulse width modulation continuous waveform is
sampled at regular intervals and the width of each pulse is kept proportional to the
magnitude of signal at that instant in PWM. In pulse width modulation pulse is varied
accordance with the modulating signal but the amplitude and starting time of each pulse
is fixed .In PWM, the information about the base band signal lies in the trailing edge of
the pulse
PWM has the disadvantage, when compared with PPM that its pulses are of
varying width and therefore of varying power content .This means that transmitter must
be powerful enough to handle the maximum- width pulses, although the average power
transmitted is perhaps only half of the peak power. PWM still works if synchronization
between transmitter and receiver fails.
PWM may be generated by applying trigger pulses to control the duration of these
pulses. The emitter coupled mono-stable multi-vibrator is used as voltage to time
converter, since its gate width is dependent on the voltage to which the capacitor C is
charged .If this voltage is varied in accordance with a signal voltage, a series of
rectangular pulses will be obtained, with widths varying as required. The demodulation
of pulse width modulation is a simple process. PWM is fed to an integrating circuit
from which a signal emerges whose amplitude at any time is proportional to the pulse
width at that time.
BLOCK DIAGRAM:-
Pulse
generator
PWM
Modula-
tor or
monostab
-le CRO
multivibr
-ator
Audio
frequency
generator
PROCEDURE:-
____________
Data | || ||||| | |
| || ||||| | |
_________| |____| |___||________||_| |___________
Data 0 1 2 4 0 4 1 0
RESULT:-
PRECAUTIONS:-
1. Do not use open ended wires for connecting to 230 V power supply.
LAB MANUAL (IV SEM ECE) Page 57
COMMUNICATION SYSTEMS LAB (EE‐226‐F)
2. Before connecting the power supply plug into socket, ensure power supply should be
switched off
3. Ensure all connections should be tight before switching on the power supply.
4. Take the reading carefully.
5. Power supply should be switched off after completion of experiment.
QUIZ / ANSWERS:-
EXPERIMENT No.8(c)
THEORY:-
In pulse position modulating the amplitude of pulse is kept constant and position of the
pulse in relation to the position of the reference pulse or synchronize pulse is varied by
each sample value of modulating signal.
PPM may be obtained from PWM. In PWM each pulse has a leading edge and a
trailing edge but the location of leading edge are fixed where trailing edge are depends
on the pulse width. Thus PPM may be obtained from PWM by simply getting side of
the leading edger and slots tops of PWM pulses. In pulse position modulating the
amplitude of pulse is kept constant and position of the pulse in relation to the position of
the reference pulse or synchronize pulse is varied by each sample value of modulating
signal. In PWM each pulse has a leading edge and a trailing edge but the location of
leading edge are fixed where trailing edge are depends on the pulse width. The trailing
edges of PWM pulses are in fact position modulated. Thus PPM may be obtained from
PWM by simply getting rid of the leading edge and slots tops of PWM pulses. In
comparison with PWM, PPM has the advantage of requiring constant transmitter power
output, but the disadvantage of depending on transmitter –receiver synchronization.
BLOCK DIAGRAM:-
Pulse
generator
PWM
Modula- PPM
tor or Modula-
monostab tor or
-le differenti CRO
multivibr ator
-ator
Audio
frequency
generator
PROCEDURE:--
OUTPUT WAVEFORMS:-
RESULT:-
PRECAUTIONS:-
1. Do not use open ended wires for connecting to 230 V power supply.
2. Before connecting the power supply plug into socket, ensure power supply should be
switched off.
3. Ensure all connections should be tight before switching on the power supply.
4. Take the reading carefully.
5. Power supply should be switched off after completion of experiment
QUIZ / ANSWERS:-
EXPERIMENT No.9
APPARATUS REQUIRED:- (i) C.R.O. (ii) CRO Probe (ii) TDM Pulse Code
Modulation Transmitter Trainer (ST 2103) and TDM Pulse Code Modulation Receiver
Trainer (ST 2104) (iv) Connecting leads.
THEORY:-
Figure 1:Pulse Amplitude Modulated wave with large time Intervals between samples
operation is repeated after every 15 bits. The complete cycle of 15 bits is called as
timing frame. The start of the timing frame is denoted by the TX.TO signal (t.p.4)
which goes high during the bit time 0. The various bits reserved for the data appearing
in the middle of each transmitter clock cycle is shown in fig. The fig.12 shows the
complete timing frame .
Bit 0: This bit is reserved for the synchronization information generated by the Pseudo
random sync code generator block More about its operation in the later section. When
the Pseudo Random Sync Code is switched OFF a '0' is transmitted.
Bit 1 to 7: These carry a 7 bit data word corresponding to the last sample taken from the
analog channel CH.0. Remember that the trainer transmits lowest significant bit (LSB)
first. This time interval during which the coded information regarding the analog
information is transmitted is called as the timeslot. Since the present timeslot
corresponds to channel 0 it is known as timeslot 0.
Bit 8 to 14: This timeslot termed as timeslot 1 contains the 7 bit word corresponding to
the last sample taken of analog channel1. As with channel 0 the least significant bit is
transmitted first. The receiver requires two signals for its correct operation & reliable
communication, namely.
a. Receiver clock operating at the same frequency as that of the ST2103 clock.
b. Synchronization signal, which allows the receiver to synchronies its
clock/operation with the transmitter’s clock operation. All these requirements
can be achieved by transmitting two essential information signals:
I. A Transmit clock signal.
II. A Frame synchronization signal.
The simplest method is to transmit the synchronization information & the clock over a
separate transmission link. This results in a simplest receiver. It is used in data
communication LAN (Local Area Network) & in telemetry systems. However it is
waste of media & is not economical for long distance communications. The ST2103
provides these two signals at TX. clock output (t.p.3) & TX.TO output (t.p.4). In this
mode the Pseudo random sync code generator& detector (on ST2104) are switched
OFF. The second technique is to transmit the synchronization code along with
transmitted data to be sufficiently different from the information samples. The ST2103
involves the use of a pseudo-random sync code generator. These codes are bit streams
of '0's & '1's whose occurrence is detected by some rules. The Pseudo - Random Sync
Code gets its name from the fact that the occurrence of '0's & '1 's in the stream is
random for a portion of sequence i.e. there is equal probability of occurrence of '0' and
'1 '. This portion of sequence is 15 bit long on ST2103. On the receiver the pseudo-
random sync code detector recognizes the Pseudo random code & use it to identify,
which incoming data bit is associated, with which transmitter timeslot The advantage of
this technique is that if the synchronization is temporarily lost, due to noise corruption,
it can be re-established as the signal clears. Hence there is minimal loss of transmitted
information. Also this technique reduces the separate link required for synchronization
signal transmission.
Mode 1: Mode 1 is TDM system of three transmission links between transmitter &
receiver. They are information, TX clock & TX.TO (synchronization) signal links. The
Pseudo random sync code generator& Detector are switched OFF in this case.
Mode 2: Mode 2 is TDM system of two transmission links between transmitter &
receiver. These are information & TX clock signal links. The synchronization is
established by sync codes transmitted along with the data stream. No need to say that
the pseudo random sync generator & detector are switched ON.
Mode 3: Mode 3 is TDM system of one link between transmitter & receiver, namely the
link carrying information. Synchronization is again established by the sync codes. The
clock signal is regenerated by the phase locked loop (PLL) circuit at the receiver from
the transition of the information data bits.
BLOCK DIAGRAM:-
PROCEDURE:-
RESULT:-
PRECAUTIONS:-
1. Do not use open ended wires for connecting to 230 V power supply.
2. Before connecting the power supply plug into socket, ensure power supply should be
switched off.
3. Ensure all connections should be tight before switching on the power supply.
4. Take the reading carefully.
5. Power supply should be switched off after completion of experiment.
QUIZ / ANSWERS:-
EXPERIMENT No.10
AIM:--To study the pulse code modulation and demodulation with parity and Hamming
codes.
APPARATUS REQUIRED:- (i) C.R.O. (ii) CRO Probe (ii) TDM Pulse Code
Modulation Transmitter Trainer (ST 2103) and TDM Pulse Code Modulation Receiver
Trainer (ST 2104) (iv) Connecting leads.
THEORY:-
PCM is a digital process. In this instead of sending a pulse train capable of continuously
varying one of the parameters, the PCM generator produces a series of numbers. Each
one of these digits, almost always in binary code, represents the approximate amplitude
of the signal sample at that instant .
In pulse code modulation, the massage signal is rounded to the nearest of a finite set of
allowable values. So that both time and amplitude are discrete form. This allows the
massage to be transmitted by means of coded electrical signals. There by distinguishing
PCM from all other methods. Modulations with increasing ability of wide band
communication channel coupled with the emergence of required device technology. The
use of PCM has become a practical reality. The essential operation in the transmitter of
PCM system are sampling, quantizing, and encoding. The quantizing and encoding
operation are performed in the same circuit called A / D converter. The essential
operations in the receiver are regeneration of unpaired signal, decoding and
demodulation of train of quantized.
Many different types of codes have been developed and are in use to reduce error in
digital communication. The commonly used Codes employed in ST2103 & ST2104
are:
Parity Coding:
It is the simplest method of error coding. Parity is a method of encoding such that the
number of 1's in a codeword is either even or odd Signal parity is established as follows.
Each word is examined to determine whether it contains an odd or even number of '1'
bits. If even parity is to be established (known as Even parity), a '1' bit is added to each
word containing odd '1' and a '0' bit is added to each word containing even '1 'so the
result is that all the code words contain an even number of 1 bits after encoding.
Similarly, the parity coding can ensure that the total number of '1's in the encoded word
is odd. In such number of '1's in the encoded word is odd. In such cases it is called as
odd parity. Continuing with the example of even parity, after transmission, each code
word is examined to see if it contains an even number of 1 bits. If it does not, the
presence of an error is indicated. If it does, the parity bit remains and the data is passed
to the user. Note that single bit parity code can detect single errors only and it cannot
provide error correction because there is no way of knowing which bit is in error. It is
for this reason that parity coding is normally only used on transmission systems where
the probability of error occurring is deemed to be low.
Hamming Coding:
Hamming coding, decode each word at transmitter into a new code by stuffing the word
with extra redundant bits. As the name suggests, the redundant bits do not convey
information but also provides a method of allowing the receiver to decide when an error
has occurred & which bit is in error since the system is binary, the bit in error is easily
corrected.
Three bit hamming code provides single bit error detection and correction.
The ST2103 & ST2104 involves the use of 7 bit word. Therefore only four bits are used
for transmitting data if hamming code is selected. The format becomes.
D6 D5 D4 D3 C2 C1 C0
Where C2, C1 & C0 are Hamming Code Bits.
Hamming code was invented by R.W. Hamming. It uses three redundant bits, as
opposed to the single redundant bit needed by simple parity checking. But it provides a
facility of single bit error detection & correction.
Code Generation on Trainer
The code on this trainer is generated by addicting parity check bit to each group as
shown below :
Group 1 D6, D5, D4 Parity Bit - C2
Group 2 D6, D5, D3 Parity Bit - C1
Group 3 D6, D4, D3 Parity Bit – C0
The Groups & Parity bit forms an even parity check group. If an error occurs in any of
the digits, the parity is lost & can be detected at receiver e.g. Let us encode binary value
D6, D5, D4, D3 of '1101'
Group 1 D6 D5 D4 C2
1100
Group 2 D6 D5 D3 C1
1111
Group 3 D6 D4 D3 C0
1010
So, the data word after coding will be
D6 D5 D4 D3 C2 C1 C0
1101010
At the receiver, the four digits representing a particular quantized value are taken in as
three groups. The Error Detection/ Correction Logic carries out even parity checks on
the three groups.
Group 1 D6 D5 D4 C2 .
Group 2 D6 D5 D3 C1
Group 3 D6 D4 D3 C0
If none of them fails, then no error has occurred in transmission & all bit values are
valid.
BLOCK DIAGRAM:-
PROCEDURE:-
RESULT:-
Pulse code modulation and demodulation is studied with error check codes.
PRECAUTIONS:-
1. Do not use open ended wires for connecting to 230 V power supply.
2. Before connecting the power supply plug into socket, ensure power supply should be
switched off.
3. Ensure all connections should be tight before switching on the power supply.
4. Take the reading carefully.
QUIZ / ANSWERS:-
EXPERIMENT No.11
THEORY:-
Differential Encoding
The circuit is caalled a series voltage regsgulator becaause the load current padasses throughh
the sseries transis Q1.stor
The main drawbback of serie regulator is that the pass transistor can be desdestroyed byy
essive load current.exce
Mannchester codde
the eencoded sign is zero, analagain preventting baseline drift of the repeated sigeegnal, makingg
it ea to regeneasyerate and prreventing wa of energ Howeve there are today manyastegy.er,y
more sophisticat codes (8BetedB/10B encodding) which accomplish the same ai with lesshimss
banddwidth overrhead, and less synchhronisation ambiguity in patholoogical casess.
Regaardless of thhese losses, MManchester ccoding has bbeen adopted into many efficient
anddd
wide used telecommunicatelytions standar such as Ethernet.rds,
Page 733
(IV SEM ECEE) LAB MANUAL (
COMMUNICATION SYSTEMS LAB (EE‐226‐F)
PROCEDURE:
1 Make the connection according to the block diagram. Power supply should be
Switched off .
2 Connect frequency-modulated output to the AM De-Modulator input.
connections should be tight.
Connect the De-Modulator output to CRO.
3
Observe output on CRO. Take output carefully.
4
RESULT: Different pulse data coding and decoding formats have been studied.
PRECAUTIONS:-
1. Do not use open ended wires for connecting to 230 V power supply.
2. Before connecting the power supply plug into socket, ensure power supply should be
switched off
3. Ensure all connections should be tight before switching on the power supply.
4. Take the reading carefully.
5. Power supply should be switched off after completion
QUIZ / ANSWERS:-
THEORY:-
The binary ASK System was one of the earliest forms of digital modulation used in
wireless telegraphy. This simplest form of digital modulation is no longer used widely
in digital communication .Nevertheless it serves as a useful model which helps in
understanding certain concepts. In an ASK system, binary symbol 1 is represented by
transmitting a sinusoidal carrier wave of fixed amplitude Ac and fixed frequency fc for
the bit duration Tb seconds whereas binary symbol 0 is represented by switching off the
carrier for Tb seconds. This signal can be generated by switching off the carrier of a
sinusoidal oscillator on and off for the prescribed periods indicated by the modulating
pulse train. For this reason the scheme is also known as on-off keying (OOK).
Figure1: ASK wave forms: (a) Unmodulated carrier (b) Unipolar bit sequence (c) ASK
wave.
ASK signal can be generated by applying the incoming binary data (represented in
unipolar form) and the sinusoidal carrier to the two inputs of a product modulator
(balanced modulator) The resulting output is the ASK wave. This is illustrated in figure
modulation causes a shift of the baseband signal spectrum.
The ASK signal which is basically the product of the binary sequence and the carrier
signal .
BLOCK DIAGRAM:-
Modulating
Data
generator
ASK
Modulator
Carrier
Generator
PROCEDURE:-
1. Make the connection according to the circuit diagram.
2. Connect the modulator output to CRO.
3. Observe output on CRO.
PRECAUTIONS:-
I. Do not use open ended wires for connecting to 230 V power supply.
2. Before connecting the power supply plug into socket, ensure power supply should be
switched
Off.
3. Ensure all connections should be tight before switching on the power supply.
4. Take the reading carefully.
5. Power supply should be switched off after completion of experiment.
THEORY:-
FSK is one of the basic modulation techniques for the transmission of digital data .If the
frequency of the sinusoidal carrier is switched depending upon the input digital signal ,
then it is known as frequency shift keying. As the amplitude remains constant in FSK,
so the effect of non-linear ties, noise interference is minimum on digital detection. So
FSK is preferred over ASK.
Frequency shift keying consists of shifting of frequency of carrier from a mask
frequency to a space frequency according to the base band digital signal. Frequency
shift keying is identical to modulating an FM carrier with a binary digital signal
In an FSK system, two sinusoidal carrier waves of the same amplitude Ac but different
frequencies fc1 and fc2 are used to represent binary symbols 1and 0 respectively. It can
be easily verified that binary FSK waveform is a superposition of two binary ASK
waveforms , one with a frequency fc1 and other with a frequency fc2. No discrete
components appear in the signal spectrum of FSK signal. The main advantage of FSK
lies in its easy hardware implementation.
Generation of FSK signal:-
The PSK signal can be generated by applying the incoming binary data to a frequency
modulator. To the other input a sinusoidal carrier wave of constant amplitude Ac and
frequency fc is applied. As the modulating voltages changes from one level to another,
the frequency modulator output changes its frequency in the corresponding fashion.
Detection of FSK signal:-
FSK can be demodulated by using coherent and non-coherent detector. The detector
based on coherent detection requires phase and timing synchronization. Non coherent
detection can be done by using envelop detector.
BLOCK DIAGRAM:-
Modulating
Data
generator
FSK
Modulator
Carrier
Generator
PROCEDURE:-
WAVE FORMS:-
0 0 1 1 0 0 1 0 0 0 0 1 1
PRECAUTIONS:-
1. Do not use open ended wires for connecting to 230 V power supply.
2. Before connecting the power supply plug into socket, ensure power supply should be
switched off
3. Ensure all connections should be tight before switching on the power supply.
4. Take the reading carefully.
5. Power supply should be switched off after completion of experiment
QUIZ / ANSWERS:-
EXPERRIMENT NNo.13
THEEORY:-
PSK PSK invoK:-olves the phhase change at the carr sine wav between 0 to 180 inerierven
accoordance with the data stre to be traheamansmitted .
PSK moodulator is similar to AS modulator both used balanced mSKdmodulator too
multtiply the carrrier with baalanced moddulator signa The digita signal wit applied toal.altho
moddulation inpu for PSK gutgeneration is bipolar i.e. equal positi and negaiveative voltagee
levell.
egositive the ou put at modulator is a line wave inutnWhen the modulating input
is po
secroltage level, the output o modulatorofrphas with the carrier input whereas for positive vo
is a s wave which is switcsinewched out of pphase by 180 from the ca0arrier input.
Quaadrature Phhase-shift KKeying (QPPSK)
QPSSK:- in QPSK each pair at consecuti data bit is treated as a two bit co which isKivesodes
switc the phase of the carri sine wav between o at four pcheierveonephase 90º apart. The fourr
posssible combinnations at bib it code are 0º, 01, 10, a 11 each code represbandhsents either a
phas of 45º, 185º, 225º, a 315º lagseandgging, relati to the pivephase at the original unen
moddulated carrie QPSK oferffers an advantage over PSK is a n carrier th how eachnohath
phas represents a two bit csescode rather tthan a single bit. This memeans that eeither we cann
char phase per sec. or the same amoun of data can be transmirgerntnitted with .
Consstellation diaagram for QQPSK with GGray coding Each adjacg.cent symbol only differsls
by one bit.
Sommetimes know as quaterwnrnary or quadriphase PSK or 4-PSK QPSK uses four pointsK,s
on th constellathetion diagram equispace around a circle. With four phases QPSK canm,edhs,n
enco two bits per symbol shown in the diagram with Gray coding to model,mminimize thee
BER — twice th rate of BPRhePSK. Analys shows th this may be used eith to doublesishathere
Page 800
(IV SEM ECEE) LAB MANUAL (
COMMUNICATION SYSTEMS LAB (EE‐226‐F)
the data rate compared to a BPSK system while maintaining the bandwidth of the signal
or to maintain the data-rate of BPSK but halve the bandwidth needed.
BLOCK DIAGRAM:-
Carrier
Generator
Carrier
Modulation
Circuit CRO
Data Unipolar to
Generator Bipolar
Converter
Carrier
Generator
Carrier
Modulation
Circuit
Data Unipolar to
Generator Bipolar
Converter
Summing
amplifier
CRO
Qudrature
Carrier
Generator
Carrier
Modulation
Circuit
Data Unipolar to
Generator Bipolar
Converter
PROCEDURE:--
WAVE FORM:-
RESSULT:-
PREECAUTIONNS:-
QUI / ANSWEIZERS:-
Page 833
(IV SEM ECEE) LAB MANUAL (
COMMUNICATION SYSTEMS LAB (EE‐226‐F)
Ans. In QPSK two successive bits are combined. This combination of two bits forms
four distinguishing symbols. When the symbol is changed to next symbol the phase of
carrier is changed by 45ْ.
Q.8 How QPSK is generated?
Ans. The input binary sequence is first converted to a bipolar NRZ type of signal called
b(t) than it is divided by demultipluxer and added together after insertion of carrier. The
generates QPSK signal.
Q.9 How QPSK is detected?
Ans. Basically QPSK receiver uses a synchronous reception. A coherent carrier applied
to the two synchronous demodulator, each consists of a multiplier and an integrator.
The output is detected original signal.
Q.10 What is DPSK?
Ans. DPSK is differential phase shift keying and is a non-coherent versus of
PSK.DPSK does not need a coherent carrier at the demodulator. The input sequence of
binary bits is modified such that the next bit depends upon the previous bit.
EXPERIMENT No.14
THEORY:-
sampling time, transmit the difference between the sample value m(k) at sampling
time K and the sample value m(K-1) at time k-1. If such changes are transmitted, then
simply by adding up these changes we shall generate at the receiver a waveform
identical in form to m (t).
PROCEDURE:-
PRECAUTIONS:-
1. Do not use open ended wires for connecting to 230 V power supply.
2. Before connecting the power supply plug into socket, ensure power supply should be
switched off
3. Ensure all connections should be tight before switching on the power supply.
4. Take the reading carefully.
5. Power supply should be switched off after completion of experiment
QUIZ / ANSWERS:-
MATH-204-F
IV SSEMESSTER
NM LAB (MATH‐204‐F)
LIST OF EXPERIMENTS
SR. PAGE
NAME OF EXPERIMENT
NO. NO.
TO FIND THE ROOTS OF NON-LINEAR EQUATION USING
1 BISECTION METHOD.
3-5
TO FIND THE ROOTS OF NON-LINEAR EQUATION USING
2 NEWTON’S METHOD.
6–9
CURVE FITTING BY LEAST – SQUARE APPROXIMATIONS.
3
10-15
TO SOLVE THE SYSTEM OF LINEAR EQUATIONS USING
4 GAUSS - ELIMINATION METHOD.
16-20
TO SOLVE THE SYSTEM OF LINEAR EQUATIONS USING
5
GAUSS - SEIDAL ITERATION METHOD 21-25
TO SOLVE THE SYSTEM OF LINEAR EQUATIONS USING
6 GAUSS - JORDEN METHOD.
26-27
7 TO INTEGRATE NUMERICALLY USING TRAPEZOIDAL RULE. 28-30
8 31-33
TO INTEGRATE NUMERICALLY USING SIMPSON’S RULES.
9 TO FIND THE LARGEST EIGEN VALUE OF A MATRIX BY
POWER - METHOD. 34-37
10 TO FIND NUMERICAL SOLUTION OF ORDINARY
DIFFERENTIAL EQUATIONS BY EULER’S METHOD. 38-40
11 TO FIND NUMERICAL SOLUTION OF ORDINARY
DIFFERENTIAL EQUATIONS BY RUNGE- KUTTA METHOD. 41-43
12 TO FIND NUMERICAL SOLUTION OF ORDINARY
DIFFERENTIAL EQUATIONS BY MILNE’S METHOD. 44-47
Program 1
OBJECTIVES: To find the roots of non linear equations using
Bisection method.
SOURCE CODE:
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
double ffunction(double x)
{
return (x * sin(x) - 1);
}
/* -------------------------------------------------------- */
void main()
{
double Delta = 1E-6;/* Tolerance for width of interval */
int Satisfied = 0;/* Condition for loop termination */
double A, B;/* Endpoints of the interval [A,B] */
double YA, YB;/* Function values at the interval-borders */
int Max;/* Calculation of the maximum number of iterations */
int K;/* Loop Counter */
double C, YC;/* Midpoint of interval and function value there */
printf("-----------------------------------------------------\n");
printf("Please enter endpoints A and B of the interval [A,B]\n");
printf("EXAMPLE : A = 0 and B = 2. Type:0 2 \n");
scanf("%lf %lf", &A, &B);
printf("The interval ranges from %lf to %lf\n", A,B);
if( ( (YA >= 0) && (YB >=0) ) || ( (YA < 0) && (YB < 0) ) ){
printf("The values ffunction(A) and ffunction(B)\n");
printf("do not differ in sign.\n");
exit(0);/* exit program */
}
if(Satisfied == 1) break;
C = (A + B) / 2; /* Midpoint of interval */
YC = ffunction(C); /* Function value at midpoint */
} /* end of 'for'-loop */
printf("----------------------------------------------\n");
printf("The maximum number of iterations is : %d\n",Max);
printf("The number of performed iterations is : %d\n",K - 1);
printf("----------------------------------------------\n");
printf("The computed root of f(x) = 0 is : %lf \n",C);
printf("----------------------------------------------\n");
printf("The accuracy is +- %lf\n", B-A);
printf("----------------------------------------------\n");
printf("The value of the function f(C) is %lf\n",YC);
Quiz
Program 2
OBJECTIVES: To find the roots of non linear equations using Newton’s method.
Sorce code:
f(p_(k-1))
p_k = p_(k-1) - ----------- for k = 1, 2, ...
f'(p_(k-1))
-----------------------------------------------------------------------
----
*/
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
double ffunction(double x)
{
return ( pow(x,3) - 3 * x + 2 );
}
double dffunction(double x)
{
return ( 3 * pow(x,2) - 3 );
}
/* -------------------------------------------------------- */
void main()
{
double Delta = 1E-6; /* Tolerance */
double Epsilon = 1E-6; /* Tolerance */
double Small = 1E-6; /* Tolerance */
printf("----------------------------------------------\n");
printf("Please enter initial approximation of root !\n");
scanf("%lf",&P0);
printf("----------------------------------------------\n");
printf("Initial value for root: %lf\n",P0);
Y0 = dffunction(P0);
if(Cond) break;
else Dp = Y0/Df;
if( (RelErr < Delta) && (fabs(Y1) < Epsilon) ) { /* Check for
*/
P0 = P1;
Y0 = Y1;
}
printf("----------------------------------------------\n");
printf("The current %d -th iterate is %lf\n",K-1, P1);
printf("Consecutive iterates differ by %lf\n",Dp);
printf("The value of f(x) is %lf\n",Y1);
printf("----------------------------------------------\n");
printf("----------------------------------------------\n");
Quiz
Q.1)What is the use of Newton’s Raphsons method?
Answer: Newton Raphsons method is used to find the root of non Linear equation.
Q2)Explain Newton Raphson method in detail.
Answer: The Newton-Raphson method uses an iterative process to approach one root of a function.
The specific root that the process locates depends on the initial, arbitrarily chosen x-value.
Here, xn is the current known x-value, f(xn) represents the value of the function at xn, and
f'(xn) is the derivative (slope) at xn. xn+1 represents the next x-value that you are trying to
find. Essentially, f'(x), the derivative represents f(x)/dx (dx = delta-x). Therefore, the term
f(x)/f'(x) represents a value of dx.
The more iterations that are run, the closer dx will be to zero (0).
Q.4) Which of the following method converges faster-Regula Falsi method or Newton-
Raphson method?
Answer: Newton Raphson method.
Program 3
OBJECTIVES: Curve fitting by least square approximations
23M-1M
P_M(x) = c_1 + c_2*x + c_3*x + c_4*x +...+ c_M*x+ c_(M+1)*x
that fits the N data points (x_1, y_1), ... , (x_N, y_N).
-----------------------------------------------------------------------
----
*/
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
/* -------------------------------------------------------- */
void main(void)
{
extern void FactPiv();
printf("------------------------------------------\n");
do /* force proper input */
{
printf("Please enter number of points [Not more than
%d]\n",NMAX);
scanf("%d", &N);
} while( N > NMAX);
P[0] = N;
x = X[K-1];
p = X[K-1];
FactPiv(M+1, A, B);
} /* end main */
/*--------------------------------------------------------*/
void FactPiv(N, A, B)
int N;
double A[DMAX][DMAX];
double *B;
{
int T;
/* Start LU factorization */
if (A[Row[P-1]][P-1] == 0)
{
printf("The matrix is SINGULAR !\n");
printf("Cannot use algorithm --> exit\n");
exit(1);
}
/* Form multiplier */
/* Eliminate X_(p-1) */
Y[0] = B[Row[0]];
for ( K = 2; K <= N; K++)
{
SUM =0;
for ( C = 1; C <= K -1; C++) SUM += A[Row[K-1]][C-1] * Y[C-1];
Y[K-1] = B[Row[K-1]] - SUM;
}
if( A[Row[N-1]][N-1] == 0)
{
printf("The matrix is SINGULAR !\n");
printf("Cannot use algorithm --> exit\n");
exit(1);
}
/* Output */
printf("---------------------------------------------------:\n");
printf("The components of the vector with the solutions are:\n");
for( K = 1; K <= N; K++) printf("X[%d] = %lf\n", K, X[K-1]);
/*
-----------------------------------------------------------------------
----
");
Quiz
Q.1) Write down working procedure of Least square method
Answer: (a) To fit the straight line y=a+bx
i) Substitute the observed the set of n values in this equation.
ii) Form normal equation for each constant i.e. ∑y=na =b∑x, ∑xy=a∑x+b∑x2
iv) Substitute the values of a & b in y=a+bx, which is required line of best fit
Program 4
OBJECTIVES: To solve the system of linear equations using
gauss elimination method
Source Code:
(Gauss-Elimination-Iteration).
-----------------------------------------------------------------------
----
*/
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
/* -------------------------------------------------------- */
#define N 4
void main(void)
{
Float a[N][N+1],x[N],t,s;
Int i,j,k;
Printf(“Enter the element of the
argumented matrix row
wise\n”);
For(i=0;i<N;i++)
For(j=0;j<N+1;j++)
Scanf(“%f”,&a[i][j]);
For(j=0;j<N-1;j++)
For(i=j+1;i<N;i++)
{
t=a[i][j]/a[j][j];
for(k=0;k<N+1;k++)
a[i][k]=a[j][k]*t;
}
For(i=0;i<N;i++)
For(j=0;j<N+1;j++)
printf(“%8.4f%”,a[i][j]);
Printf(“\n”);
For(i=N-1;i>=0;i--)
{
s=0;
for(j=i+1;j<N;j++)
s+=a[i][j]*x[j];
x[i]=(a[i][N]-s)/a[i][i];
For(i=0;i<N;i++)
Printf(“x[%3d]=%7.4f\n”, i+1,x[i]);
We use elementary row operations to transform this matrix into a triangular one. We keep
the first row and use it to produce all zeros elsewhere in the first column. We have
Next we keep the first and second row and try to have zeros in the second column. We
get
Next we keep the first three rows. We add the last one to the third to get
x = 2 + y + z - w - v.
Using algebraic manipulations, we get
x=- - s - t.
Program 5
OBJECTIVES: To Solve The System Of Linear Equations Using
Gauss - Seidal Iteration Method
void main()
{
double x1=0,x2=0,x3=0,y1,y2,y3;
int i=0;
clrscr();
printf("\n__________________________________________\n");
printf("\nx1\t\tx2\t\tx3\n");
printf("\n__________________________________________\n");
printf("\n%f\t%f\t%f",x1,x2,x3);
do
{
y1=X1(x2,x3);
y2=X2(y1,x3);
y3=X3(y1,y2);
if(fabs(y1-x1)<ESP && fabs(y2-x2)<ESP && fabs(y3-x3)<ESP )
{
printf("\n__________________________________________\n");
printf("\n\nx1 = %.3lf",y1);
printf("\n\nx2 = %.3lf",y2);
printf("\n\nx3 = %.3lf",y3);
i = 1;
}
else
{
x1 = y1;
x2 = y2;
x3 = y3;
printf("\n%f\t%f\t%f",x1,x2,x3);
}
}while(i != 1);
getch();
}
/*
OUT PUT
___________
__________________________________________
x1 x2 x3
__________________________________________
0.0000000.0000000.000000
0.850000-1.0275001.010875
1.978588-1.1462440.880205
2.084265-1.1686290.866279
2.105257-1.1724750.863603
2.108835-1.1731450.863145
2.109460-1.1732620.863065
2.109568-1.1732820.863051
__________________________________________
x1 = 2.110
x2 = -1.173
x3 = 0.863
*/
Quiz
Q.1)Write down converges property of Gauss Seidal method.
Answer: The convergence properties of the Gauss–Seidel method are dependent on the
matrix A. Namely, the procedure is known to converge if either:
• A is symmetric positive-definite, or
• A is strictly or irreducibly diagonally dominant.
The Gauss–Seidel method sometimes converges even if these conditions are not satisfied.
where:
Then A can be decomposed into a lower triangular component L*, and a strictly upper
triangular component U:
The Gauss–Seidel method is an iterative technique that solves the left hand side of this
expression for x, using previous value for x on the right hand side. Analytically, this may
be written as:
However, by taking advantage of the triangular form of L*, the elements of x(k+1) can be
computed sequentially using forward substitution:
Note that the sum inside this computation of xi(k+1) requires each element in x(k) except
xi(k) itself.
The procedure is generally continued until the changes made by an iteration are below
some tolerance.
Suppose we choose (0, 0, 0, 0) as the initial approximation, then the first approximate
solution is given by
Using the approximations obtained, the iterative procedure is repeated until the desired
accuracy has been reached. The following are the approximated solutions after four
iterations.
Program 6
OBJECTIVES: To Solve The System Of Linear Equations Using
Gauss - Jorden Method.
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{float a[6][6],b[6],x[6],t,s;
int i,j,n,k;
clrscr();
cout<<"Enter the maximum no. of matrix"<<endl;
cin>>n;
cout<<"Enter th elements of matrix"<<endl;
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
cin>>a[i][j];
}
}
cout<<"enter the right constant"<<endl;
for(i=0;i<n;i++)
{
cin>>a[i][n];
}
for(k=0;k<n;k++)
{
for(i=0;i<n;i++)
if(i!=k)
{
for(j=k+1;j<n+1;j++)
{
a[i][j]=a[i][j]-(a[i][k]/a[k][k])*a[k][j]);
}}}
cout<<"the solution is"<<endl;
for(i=0;i<n;i++)
{
x[i]=(a[i][n]/a[i][i]);
cout<<"x["<<i<<"]="<<x[i]<<endl;
}
getch();
}
QUIZ
Q.3) What are the numerical method of gauss elimination and gauss Jordan method?
Answer: In Computer Programming, Algebra, Linear Algebra
Program 7
OBJECTIVES: To integrate numerically using trapezoidal rule.
(Trapezoidal Rule).
Composite Trapezoidal
b
/h M-1
| f(x)dx=- * [ f(A) - f(B)] h * sum
+ f(x_k)
/2 k=1
a
-----------------------------------------------------------------------
----
*/
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
double ffunction(double x)
{
return ( 1 / ( 1 + pow(x,2) ) );
}
/* -------------------------------------------------------- */
void main()
{
int K; /* loop counter*/
int M; /* INPUT : number of subintervals */
printf("----------------------------------------------\n");
printf("Please enter the boundaries of the integral [A,B]\n");
printf("EXAMPLE: A = -1 and B = 1, so type: -1 1\n");
scanf("%lf %lf",&A, &B);
printf("The boundaries of the integral are: %lf %lf\n",A, B);
printf("----------------------------------------------\n");
printf("Please enter the number of SUBINTERVALS.\n");
scanf("%d",&M);
printf("----------------------------------------------\n");
printf("----------------------------------------------\n");
Quiz
Q.1)What is use of Trapezoidal rule?
Answer: Trapezoidal rule is used to solve numerical differentiation.
Program 8
OBJECTIVES: To Integrate Numerically Using Simpson’s Rules.
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
float x[10],y[10],sum=0,h,temp;
int i,n,j,k=0;
float fact(int);
clrscr();
printf("\nhow many record you will be enter: ");
scanf("%d",&n);
for(i=0; i<n; i++)
{
printf("\n\nenter the value of x%d: ",i);
scanf("%f",&x[i]);
printf("\n\nenter the value of f(x%d): ",i);
scanf("%f",&y[i]);
}
h=x[1]-x[0];
n=n-1;
sum = sum + y[0];
for(i=1;i<n;i++)
{
if(k==0)
{
sum = sum + 4 * y[i];
k=1;
}
else
{
sum = sum + 2 * y[i];
k=0;
}
}
sum = sum + y[i];
sum = sum * (h/3);
printf("\n\n I = %f ",sum);
getch();
}
/*
______________________________________
OUT PUT
______________________________________
I = 0.693250
*/
QUIZ
Q.1) What is use of Simpsons one-third rule?
Answer: Simpsons one-third rule is used to find numerical integration of given equation.
Program 9
OBJECTIVES: To find the largest eigen value of matrix by
power method.
|Lambda_1| > |Lambda_2| >= |Lambda_3| >= ... >= |Lambda_n| > 0
-----------------------------------------------------------------------
----
*/
Source code:
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define MaxOrder 50
/* -------------------------------------------------------- */
void main(void)
{
int i, j;/* Loop counter */
int N;/* Order of Matrix */
double Epsilon = 1E-7;/* Tolerance */
double Max = 100;/* Maximum number of iterations */
double X[MaxOrder], Y[MaxOrder];
double A[MaxOrder][MaxOrder]; /* Matrix
double C1, DC, DV, Lambda = 0; */
int Count = 0, Iterating = 1;
double Sum, Err = 1;
double MaxElement;
printf("--------------Power Method---------------\n");
printf("--------- Example 11.5 on page 550 -------------\n");
printf("-----------------------------------------------\n");
printf("\n");
/* Initialize vector X */
MaxElement = 0;
for ( j = 0; j < N; j++ )
{
if( fabs(Y[j]) > fabs(MaxElement) ) MaxElement = Y[j];
}
C1 = MaxElement;
DC = fabs(Lambda - C1);
Sum = 0;
for ( i = 0; i < N; i++) Sum += pow( ( Y[i] - X[i] ), 2.0);
DV = sqrt(Sum);
Err = MAX(DC,DV);
Iterating = 0;
Count++;
printf("---------------------------------------\n");
printf("---------------------------------------\n");
printf("Lambda = %lf\n", Lambda);
Quiz
If we use this equation, then power method yields the smallest eigen values.
If we use this equation, then power method yields the smallest eigen values.
Program 10
OBJECTIVES: TO FIND NUMERICAL SOLUTION OF ORDINARY
DIFFERENTIAL EQUATIONS BY EULER’S METHOD.
/*
OUT PUT
---------
y1 = 5.000
*/
QUIZ
Q.5)Write the equation for Eulers method for findind approximate solution?
Program 11
OBJECTIVES: To Find Numerical Solution Of Ordinary
Differential Equations By Runge- Kutta Method.
#include <stdio.h>
#include <math.h>
void main()
{
double t, y[N];
int j;
fclose(output);
}
for (i=0;i<N;i++)
{
t1[i]=y[i]+0.5*(k1[i]=step*f(x,y,i));
}
for (i=0;i<N;i++)
{
t2[i]=y[i]+0.5*(k2[i]=step*f(x+h, t1, i));
}
for (i=0;i<N;i++)
{
t3[i]=y[i]+ (k3[i]=step*f(x+h, t2, i));
}
for (i=0;i<N;i++)
{
k4[i]= step*f(x+step, t3, i);
}
for (i=0;i<N;i++)
{
y[i]+=(k1[i]+2*k2[i]+2*k3[i]+k4[i])/6.0;
}
}
if (i==0)
x=y[1]; /* derivative of first equation */
if (i==1)
x= -0.2*y[1]-y[0]; /* derivative of second equation */
return x;
}
QUIZ
Program 12
OBJECTIVES: To find the numerical solution of differential
equation using mline method.
(Milne-Simpson Method)
4h
p_(k+1) = y_(k-3) + --- [2*f_(k-2) - f_(k-1) + 2*f_k]
3
h
y_(k+1) = y_(k-1) + --- [f_(K-1) + 4*f_k + f_(K+1)].
3
-----------------------------------------------------------------------
----
*/
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
{
return ( (t - y) / 2.0 );
}
/* -------------------------------------------------------- */
void main(void)
printf("------------Milne-Simpson Method----------------\n");
printf("--------- Example 9.13 on page 468 -------------\n");
printf("-----------------------------------------------\n");
printf("Please enter endpoints of the interval [A,B]:\n");
printf("For used Example type : 0, 3.0\n");
scanf("%lf, %lf", &A, &B);
printf("You entered [%lf, %lf]\n", A, B);
printf("-----------------------------------------\n");
printf("Please enter number of steps: ( > 3 and < %d !)\n", MAX+1);
scanf("%d",&N);
if( (N > MAX) || (N < 4) )
{
printf(" Number of steps must be greater than 3 and less than
%d\n",MAX+1);
printf(" Terminating. Sorry\n");
exit(0);
}
printf("-----------------------------------------\n");
H= (B - A) / N;
T[0] = A;
F1 = ffunction(T[1],Y[1]);
F2 = ffunction(T[2],Y[2]);
F3 = ffunction(T[3],Y[3]);
Pold = 0;
Yold = 0;
{
/* Milne Predictor */
Pnew = Y[K-3] + 4.0 * H * (2.0*F1 - F2 + 2.0*F3) / 3.0;
Pmod = Pnew + 28.0 * (Yold - Pold) / 29.0;
/* Next mesh point */
T[K+1] = A + H * (K+1);
/* Evaluate f(t,y) */
F4 = ffunction(T[K+1],Pmod);
/* Corrector */
Y[K+1] = Y[K-1] + H * (F2 + 4.0 * F3 + F4) / 3.0;
/* Update the values */
F1 = F2;
F2 = F3;
F3 = ffunction(T[K+1], Y[K+1]);
/* Output */
QUIZ
Program 13
OBJECTIVES: To find the numerical solution of differential
equation using laplace equation.
2
To approximate the solution of u_(xx)(x,y) + u_(yy) (x,y) = 0
-----------------------------------------------------------------------
---*/
Source code:
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define Max 50
/* Global Variables */
/* Prototypes */
double F1i(int i)
{
extern double H;
double arg;
arg = H * ( i - 1.0 );
double F2i(int i)
{
extern double H;
double arg;
arg = H * ( i - 1.0 );
double F3i(int i)
{
extern double H;
double arg;
arg = H * ( i - 1.0 );
double F4i(int i)
{
extern double H;
double arg;
arg = H * ( i - 1.0 );
/* -------------------------------------------------------- */
void main(void)
{
int i, j; /* Loop Counters
*/
double A, B; /* INPUT : Width and height of Rectangle
*/
double Ave; /* INPUT : Initial approximation
*/
int N, M; /* dimensions of the grid
*/
double U[Max][Max]; /* Grid-Amplitudes
*/
int Count; /* counter for while loop
*/
double Tol; /* stop criteria
*/
double w, Pi;
double H; /* Grid spacing
*/
double Relax, temp;
printf("-------------------------------------------------------
\n");
printf("------- Dirichlet Method for Laplace's Equation -------
\n");
printf("--------- Try Example 10.6 on page 528/529-------------
\n");
printf("-------------------------------------------------------
\n");
Pi = 3.1415926535;
Tol= 1.0;
Count = 0.0;
Tol = 0.0;
for ( j = 2; j <= M - 1; j++ )
{
for ( i = 2; i <= N - 1; i++ )
{
Relax = w * ( U[i][j+1] + U[i][j-1] + U[i+1][j] +
U[i-1][j] - 4.0 * U[i][j] ) / 4.0;
U[i][j] += Relax;
if( fabs(Relax) > Tol ) Tol = fabs(Relax);
}
Count++;
}
QUIZ
Q.1)What is the use of Laplace method?
Answer: Laplace method is used to find out the solution of partial differential equation.
Program 14
OBJECTIVES: To find the numerical solution of differential
equation using wave equation
2
To approximate the solution of u_(tt)(x,t) = c u_(xx)(x,t)
Souce code:
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define Max 50
/* Global Variables */
/* Prototypes */
double Fi(int i)
{
extern double H;
double arg;
arg = H * (i - 1);
if( (arg >= 0) && (arg <= 1.0) ) return ( sin ( 3.1415926 * arg)
);
else
{
printf(" Fi() :Argument not in range ! Exiting !\n");
double Gi(int i)
{
extern double H;
double arg;
arg = H * (i - 1);
/* -------------------------------------------------------- */
void main(void)
{
int i, j; /* Loop Counters
*/
double A, B; /* INPUT :Width and height of Rectangle
*/
double C; /* INPUT : Wave equation const.
*/
int N, M; /* Dimensions of the grid
*/
double K, R, R2, R22, S1, S2;
double U[Max][Max];/* Grid-Amplitudes
*/
printf("-------------------------------------------------------
\n");
printf("\n");
printf("Please enter dimension of grid in x-direction :\n");
printf("For present example type : 6\n");
scanf("%d",&N);
printf("Please enter dimension of grid in y-direction :\n");
printf("For present example type : 6\n");
scanf("%d",&M);
printf("You entered N = %d and M = %d\n", N, M);
printf("-------------------------------------------------------
\n");
printf("\n");
printf("Please enter the wave equation constant C :\n");
printf("For present example type : 2\n");
scanf("%lf",&C);
printf("You entered C = %lf\n", C);
printf("------------------------------------------------\n");
printf("\n");
H = A/ ( N - 1 );
K = B/ ( M - 1 );
R = C* K / H;
R2 = R* R;
R22 = R* R / 2.0;
S1 = 1.0 - R * R;
S2 = 2.0 - 2.0 * R * R;
/* Boundary conditions */
printf("\n");
}
Quiz
Program 15
OBJECTIVES: To find the numerical solution of differential
equation using heat equation.
Source code:
(Forward-Difference Method for the Heat Equation).
-----------------------------------------------------------------------
----
*/
/*
-----------------------------------------------------------------------
----
2
To approximate the solution of u_(t)(x,t) = c u_(x)(x,t)
-----------------------------------------------------------------------
----
*/
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define Max 50
/* Global Variables */
/* Prototypes */
double Fi(int i)
{
extern double H;
double arg;
arg = H * (i - 1);
if( (arg >= 0) && (arg <= 1.0) ) return (4.0 * arg - 4.0 * arg *
arg);
else
{
printf(" Fi() :Argument not in range ! Exiting !\n");
printf(" arg : %lf\n", arg);
exit(0);
}
}
/* -------------------------------------------------------- */
void main(void)
{
int i, j; /* Loop Counters
*/
double A, B; /* INPUT :Width and height of Rectangle
*/
double C; /* INPUT : Wave equation const.
*/
int N, M; /* Dimensions of the grid
*/
double K, S, C1, C2, R;
double U[Max][Max]; /* Grid-Amplitudes
*/
H = A/ ( N- 1 );
K = B/ ( M- 1 );
R = C* C *K / ( H * H );
S = 1.0 - 2.0 * R;
/* Boundary conditions */
/* First row */
printf("\n");
}
QUIZ
REFRENCES:
1. Numerical methods by B.S.Grewal
LAB MANUAL
IV SEMESTER
DIGITAL ELECTRONICS LAB (EE‐224‐F)
LIST OF EXPERIMENTS
SR. PAGE
NAME OF EXPERIMENT
NO. NO.
Introduction to Digital Electronics lab- nomenclature of digital ICS,
1 specifications, study of the data sheet, concept of vcc and ground,
verification of the truth tables of logic gates using TTL ICS.3-6
Implementation of the given Boolean function using logic gates in
both sop and pos forms.
2
7-8
Verification of state tables of RS, JK, T and D flip-flops using
3 NAND & nor gates.
9-11
Implementation and verification of decoder/de-multiplexer and
4 encoder using logic gates.
12-15
5 Implementation of 4x1 multiplexer using logic gates. 16-18
Implementation of 4-bit parallel adder using 7483 IC.
6
19-20
Design and verify the 4-bit synchronous counter.
7
21-24
8 Design and verify the 4-bit asynchronous counter. 25-27
9 To design and verify operation of half adder and full adder. 28-29
10 To design and verify operation of half subtractor. 30-31
To design & verify the operation of magnitude comparator.
11
32-33
12 To study and verify NAND as a universal gate. 34-35
EXPERIMENT NO: 1
Aim: - Introduction to Digital Electronics Lab- Nomenclature of Digital
Ics, Specifications, Study of the Data Sheet, Concept of Vcc and Ground,
Verification of the Truth Tables of Logic Gates using TTL Ics.
BRIEF THEORY:
AND Gate: The AND operation is defined as the output as (1) one if and only if all the
inputs are (1) one. 7408 is the two Inputs AND gate IC.A&B are the Input terminals &Y
is the Output terminal.
Y = A.B
OR Gate: The OR operation is defined as the output as (1) one if one or more than 0
inputs are (1) one. 7432 is the two Input OR gate IC. A&B are the input terminals & Y is
the Output terminal.
Y=A+B
NOT GATE: The NOT gate is also known as Inverter. It has one input (A) & one
output (Y). IC No. is 7404. Its logical equation is,
Y = A NOT B, Y = A’
NAND GATE: The IC no. for NAND gate is 7400. The NOT-AND operation is known
as NAND operation. If all inputs are 1 then output produced is 0. NAND gate is inverted
AND gate.
Y = (A. B)’
NOR GATE: The NOR gate has two or more input signals but only one output signal. IC
7402 is two I/P IC. The NOT- OR operation is known as NOR operation. If all the inputs
are 0 then the O/P is 1. NOR gate is inverted OR gate.
Y = (A+B)’
EX-OR GATE: The EX-OR gate can have two or more inputs but produce one output.
7486 is two inputs IC. EX-OR gate is not a basic operation & can be performed using
basic gates.
Y=A B
LOGIC SYMBOL:
. Logic Symbol of Gates
1 1
3 3 1 2
2 2
OR ANDD NOT
1 1 3 1
3 3
2 2 2
NAND
NOR XOR
CRATION:PIN CONFIGUR
74000(NAND) 7402(NNOR)
7486(EX-O7OR) 7432(OR)7
OCEDURE:PRO
(a) Fix the IC’s on btbreadboard & give the suupply.
(b) Conn the +ve terminal of supply to pi 14 & -ve to pin 7.nectint
(c) Give input at pin 1, 2 & take output from pin 3. It is same forenems
all exxcept NOT & NOR IC.
(d) For NNOR, pin 1 i output & p 2&3 are inputs.ispin
(e) For NNOT, pin 1 i input & pi 2 is outpuisinut.
(f) Note the values of output fo different ceorcombination of inputsn
& dr the TRUrawUTH TABLEE.
OBSEERVATION TABLE:N
UTSINPU OUTPUUTS
A’ A+B (A+B)’ (A**B) (A*B )’’ (A B))
A B ANND
TNOT
OR NOR NANDD Ex-ORR
0 0 1 0 1 0 1 0
0 1 1 1 0 0 1 1
1 0 0 1 0 0 1 1
1 1 0 1 0 1 0 0
S:PRECAUTIONS
1. Make the connections according t the IC pin diagram.ston
ections shou be tight.uld2. The conne
3. The Vcc a ground shandhould be appplied careful at the spellyecified pin onnly.
DIGITAL ELECTRONICS LAB (EE‐224‐F)
Ans. Gates are the digital circuits, which perform a specific type of logical operation.
EXPERIMENT NO: 2
Aim: Implementation of the Given Boolean Function using Logic Gates
in Both Sop and Pos Forms.
BRIEF THEORY: Karnaugh maps are the most extensively used tool for simplification
of Boolean functions. It is mostly used for functions having up to six variables beyond
which it becomes very cumbersome. In an n-variable K-map there are 2ⁿ cells. Each cell
corresponds to one of the combination of n variable, since there are 2ⁿ combinations of n-
variables. Gray code has been used for the identification of cells.
LOGIC DIAGRAM
SOP form
POS Form
PROCEDURE:
(a) With given equation in SOP/POS forms first of all draw a K-
map.
(b) Enter the values of the O/P variable in each cell corresponding
to its Min/Max term.
(c) Make group of adjacent ones.
(d) From group write the minimized equation.
(e) Design the ckt. of minimized equation & verify the truth table.
PRECAUTIONS:
1) Make the connections according to the IC pin diagram.
2) The connections should be tight.
3) The Vcc and ground should be applied carefully at the specified pin only.
EXPERIMENT NO: 3
Aim: Verification of State Tables of Rs, J-k, T and D Flip-Flops using
NAND & NOR Gates
BRIEF THEORY:
• RS FLIP-FLOP: There are two inputs to the flip-flop defined as R and S. When
I/Ps R = 0 and S = 0 then O/P remains unchanged. When I/Ps R = 0 and S = 1 the
flip-flop is switches to the stable state where O/P is 1 i.e. SET. The I/P condition
is R = 1 and S = 0 the flip-flop is switched to the stable state where O/P is 0 i.e.
RESET. The I/P condition is R = 1 and S = 1 the flip-flop is switched to the
stable state where O/P is forbidden.
CIRCUIT DIAGRAM:
SR Flip Flop D Flip Flop
PROOCEDURE:
1. Connect the circuit as shown in fitsigure.
ccvery IC.2. Apply Vc & ground signal to ev
toutput accorrding to the truth table.t3. Observe the input
&o
UTH TABLEE:TRU
SR FFLIP FLOP:
CLOCK S R Qn++1
1 0 0 NO CHAANGE
1 0 1 0
1 1 0 1
1 1 1 ?
LIPFLOP:D FL
INPUT OUTTPUT
0 0
1 1
FLIPFLOPJK F
CLOCK S R Qn++1
1 0 0 NO CHAANGE
1 0 1 0
1 1 0 1
1 1 1 Qnn’
LIPFLOPT FL
CLOCK S R Qn++1
1 0 1 NO CHAANGE
1 1 0 Qnn’
PRECAUTIONS:
EXPERIMENT NO: 4
Aim:- Implementation and Verification of Decoder/De-Multiplexer and
Encoder using Logic Gates.
BRIEF THEORY:
For an 8-to-3 binary encoder with inputs I0-I7 the logic expressions of the outputs
Y0-Y2 are:
Y0 = I1 + I3 + I5 + I7
Y1= I2 + I3 + I6 + I7
Y2 = I4 + I5 + I6 +I7
LOGIC DIAGRAM:
1:4 Demux
PROCEDURE:
1) Connect the circuit as shown in figure.
2) Apply Vcc & ground signal to every IC.
3) Observe the input & output according to the truth table.
OBSERVATION TABLE:
RESULT: Encoder/ decoder and demultiplexer have been studied and verified.
PRECAUTIONS:
output is going to have the same value as the data input. The other data outputs will
have the value 0.
Q. 3 What do you understand by encoder?
Ans. An encoder or multiplexer is therefore a digital IC that outputs a digital code
based on which of its several digital inputs is enabled.
Q. 4 What is the main difference between decoder and demultiplexer?
Ans. In decoder we have n input lines as in demultiplexer we have n select lines.
Q. 5 Why Binary is different from Gray code?
Ans. Gray code has a unique property that any two adjacent gray codes differ by only
a single bit.
Q. 6 Write down the method of Binary to Gray conversion.
Ans. Using the Ex-Or gates.
Q. 7 Convert 0101 to Decimal.
Ans. 5
Q. 8 Write the full form of ASCII Codes?
Ans. American Standard Code for Information Interchange.
Q.9. If a register containing 0.110011 is logically added to register containing
0.101010 what would be the result?
Ans.111011
Q10.Binary code is a weighted code or not?
Ans. Yes
EXPERIMENT NO : 5
Aim: Implementation of 4x1 Multiplexer using Logic Gates.
BRIEF THEORY:
PIN CONFIGURATION;–
IC 74153 (4x1 multiplexer)
LOGIC DIAGRAM:
PROCEDURE:
1. Fix the IC's on the bread board &give the input supply.
2. Make connection according to the circuit.
3. Give select signal and strobe signal at respective pins.
4. Connect +5 v Vcc supply at pin no 24 & GND at pin
no 12.
5. Verify the truth table for various inputs.
OBSERVATION TABLE:
EXPERIMENT NO - 6
BRIEF THEOR - A 4-bit adder is a circuit which adds two 4-bits numbers, say, A
and B. In addition, a 4-bit adder will have another single-bit input which is added to
the two numbers called the carry-in (Cin). The output of the 4-bit adder is a 4-bit sum
(S) and a carry-out (Cout) bit.
PIN CONFIGURATION–
Pin Diagram of IC 7483
IC 7483
LOGIC DIAGRAM:-
OBSERVATION TABLE –
PROCEDURE –
a) Make the connections as per the logic diagram.
b) Connect +5v and ground according to pin configuration.
c) Apply diff combinations of inputs to the i/p terminals.
d) Note o/p for summation.
e) Verify the truth table.
PRECAUTIONS:
1. Make the connections according to the IC pin diagram.
2. The connections should be tight.
3. The Vcc and ground should be applied carefully at the specified pin only.
EXXPERIMMENT N :7NO
Aim – Design and Ver the 4-B Synchrm:n,rifyBitronous Coounter
ARATUS REQUIRED Digital traRD:ainer kit and 4 JK flip flo each IC 7476 (i.e
duadop7alAPPA
JK fli flop) and two AND gates IC 7408ip8.
BRIE THEOREFRY: Counter is a circuit which cycl through st sequenc Two typertletatece.es
of counter, Synchhronous counter (e.g. paarallel) and AAsynchronou counter (e ripple). Iuse.g.In
leame flip-flop output to b used as clock signal spbesource for other flip-flopop.Rippl counter
sa
Synchhronous couunter use the same clock signal for al flip-flop.ll
CRATION:PIN CONFIGUR
Dual JK Mast Slave F Flop with clear & presetterFlipw
GICRAM:LOG DIAGR
4-Bit Synchhronous coounter
OBSERVATION TABLE:
Truth Table
States Count
04 03 02 01
0 0 0 0 0
0 0 0 1 1
0 0 1 0 2
0 0 1 1 3
0 1 0 0 4
0 1 0 1 5
0 1 1 0 6
0 1 1 1 7
1 0 0 0 8
1 0 0 1 9
1 0 1 0 10
1 0 1 1 11
1 1 0 0 12
1 1 0 1 13
1 1 1 0 14
1 1 1 1 15
PROCEDURE:
a) Make the connections as per the logic diagram.
b) Connect +5v and ground according to pin configuration.
c) Apply diff combinations of inputs to the i/p terminals.
d) Note o/p for summation.
e) Verify the truth table.
PRECAUTIONS:
1. Make the connections according to the IC pin diagram.
2. The connections should be tight.
3. The Vcc and ground should be applied carefully at the specified pin only.
EXPERIMENT NO: 8
Aim: – Design, and Verify the 4-Bit Asynchronous Counter.
APPARATUS REQUIRED: Digital trainer kit and 4 JK flip flop each IC 7476 (i.e dual
JK flip flop) and two AND gates IC 7408.
BRIEF THEORY: Counter is a circuit which cycle through state sequence. Two types
of counter, Synchronous counter (e.g. parallel) and Asynchronous counter (e.g. ripple). In
Ripple counter same flip-flop output to be used as clock signal source for other flip-flop.
Synchronous counter use the same clock signal for all flip-flop.
PIN CONFIGURATION:
LOGIC DIAGRAM:
4-Bit Asynchronous counter
PRECAUTIONS:
1. Make the connections according to the IC pin diagram.
2. The connections should be tight.
3. The Vcc and ground should be applied carefully at the specified pin only.
Q.1 How many flip-flops are required to make a MOD-32 binary counter?
Ans. 5.
Q.2 The terminal count of a modulus-11 binary counter is ________.
Ans.1010.
Q.3 Synchronous counters eliminate the delay problems encountered with
asynchronous counters because the:
Ans. Input clock pulses are applied simultaneously to each stage.
Q4. Synchronous construction reduces the delay time of a counter to the delay of:
Q6. When two counters are cascaded, the overall MOD number is equal to the
________ of their individual MOD numbers.
Ans. Product.
Q7. A BCD counter is a ________.
Ans. decade counter.
Q8. What decimal value is required to produce an output at "X" ?
Ans.5.
Q9. How many AND gates would be required to completely decode ALL the states of
a MOD-64 counter, and how many inputs must each AND gate have?
EXPERIMENT NO: 9
Aim:- To Design &Verify Operation of Half Adder &Full Adder.
BRIEF THEORY: We are familiar with ALU, which performs all arithmetic and logic
operation but ALU doesn’t perform/ process decimal no’s. They process binary no’s.
Half Adder: It is a logic circuit that adds two bits. It produces the O/P, sum & carry.
The Boolean equation for sum & carry are:
SUM = A + B
CARRY = A. B
Therefore, sum produces 1 when A&B are different and carry is 1when A&B are 1.
Application of Half adder is limited.
Full Adder: It is a logic circuit that can add three bits. It produces two O/P sum & carry.
The Boolean Equation for sum & carry are:
SUM = A + B + C
CARRY = A.B + (A+B) C
Therefore, sum produces one when I/P is containing odd no’s of one & carry is one when
there are two or more one in I/P.
LOGIC DAIGRAM:
Half Adder Full Adder
PROCEDURE:
(a) Connect the ckt. as shown in fig. For half adder.
(b) Apply diff. Combination of inputs to the I/P terminal.
(c) Note O/P for Half adder.
(d) Repeat procedure for Full wave.
(e) The result should be in accordance with truth table.
OBSERVATION TABLE:
HALF ADDER:
INPUTS OUTPUT
A B S C
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
FULL ADDER:
INPUTS OUTPUTS
A B C S CARRY
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
RESULT: The Half Adder & Full Adder ckts. are verified.
PRECAUTIONS:
1) Make the connections according to the IC pin diagram.
2) The connections should be tight.
3) The Vcc and ground should be applied carefully at the specified pin only.
EXPERIMENT NO :10
Aim:- To Study &Verify Half Subtractor.
LOGIC DIAGRAM :
TRUTH TABLE:
PROCEDURE:
EXPERIMENT NO: 11
Aim: - To Design & Verify the Operation of Magnitude Comparator
BRIEF THEORY: Comparator compares the value of signal at the input. It can be
designed to compare many bits. The adjoining figure shows the block diagram of
comparator. Here it receives to two 2-bit numbers at the input & the comparison is at
the output.
CIRCUIT DIAGRAM:
Comparator
1
3 1 2
2
1
3
2
4
6 3 4
5
PROCEDURE:
a. Make the connections according to the circuit diagram.
b. The output is high if both the inputs are equal.
c. Verify the truth table for different values.
OBSERVATION TABLE:
PRECAUTIONS:
1) Make the connections according to the IC pin diagram.
2) The connections should be tight.
3) The Vcc and ground should be applied carefully at the specified pin only.
Q1.What is comparator?
EXPERIMENT NO:12
BRIEF THEORY: NAND OR NOR sufficient for the realization of any logic
expression. because of this reason, NAND and NOR gates are known as UNIVERSAL
gates.
LOGIC DIAGRAM:
TRUTH TABLE:
NAND GATE AS INVERTER: The circuit diagram of implementation of NAND
gate as inverter.
A Y
0 1
1 0
A B Y
0 0 0
0 1 0
1 0 0
1 1 1
A B Y
0 0 0
0 1 1
1 0 1
1 1 1
PROCEDURE:
EXPERIMENT NO:13
AIM: - To Study 4 Bit ALU(IC 74181).
APPARATUS REQUIRED: IC 74181, etc.
BRIEF THEORY:
The 74181 is a 7400 series medium-scale integration (MSI) TTL integrated circuit,
containing the equivalent of 75 logic gates and most commonly packaged as a 24-pin
DIP. The 4-bit wide ALU can perform all the traditional add / subtract / decrement
operations with or without carry, as well as AND / NAND, OR / NOR, XOR, and
shift. Many variations of these basic functions are available, for a total of 16
arithmetic and 16 logical operations on two four-bit words. Multiply and divide
functions are not provided but can be performed in multiple steps using the shift and
add or subtract functions. Shift is not an explicit function but can be derived from
several available functions including (A+B) plus A.
IC 74181
PROCEDURE:
1. Connections are made as shown in the Circuit diagram.
2. Change the values of the inputs and verify at least 5 functions
given in the function table
PRECAUTIONS:
Ans. Machine codes are in binary, mnemonic codes are in shorthand English.
Q. Which of the following buses is primarily used to carry signals that direct other
3 ICs to find out what type of operation is being performed?
Q.4 Which of the following are the three basic sections of a microprocessor unit?
Q.6 A register in the microprocessor that keeps track of the answer or results of any
arithmetic or logic operation is the:
Ans. Accumulator.
Ans.1971
Q.8 What type of circuit is used at the interface point of an output port?
Ans. Latch.
Q.9 What type of circuit is used at the interface point of an input port?
Q.10 The register in the 8085A that is used to keep track of the memory address of the
next op-code to be run in the program is the:
EXPERIMENT NO:14
LIST OF MINI PROJECTS
1. IR Remote Switch
2. Clap Switch
3. Water-Level Controller
4. LED-Based Message Display
5. Ultra-Bright LED Lamp
6. Ding-Dong Bell Infrared Cordless Headphone
7. Mobile Phone Battery Charger
8. Telephone Number Display
9. Automatic Night Lamp With Morning Alarm
10. Three-Colour Display Using Bi-Colour LEDs
11. Remote-Operated Musical Bell
12. Simple Telephone Ring Tone Generator
13. Anti-Theft Alarm For Bikes
14. Automatic Speed-Controller For Fans and Coolers
15. Digital Stop Watch
16. Power-Supply Failure Alarm
17. Dark Room Timer
18. Remote-Controlled Power-Off Switch
19. Simple Low-Cost Digital Code Lock
20. Number Guessing Game
21. Fire Alarm Using Thermistor
22. Simple Analogue To Digital Converter
23. PC-Based 7-Segment Rolling Display
24. IR Burglar Deterrent
25. Variable Power Supply Using a Fixed-Voltage Regulator IC
26. Digital Speedometer
27. Heat-Sensitive Switch
28. Fully Automatic Emergency Light
29. Running Message Display
30. School/College Quiz Buzzer
31. Digital Dice With Numeric Display
32. Dancing Lights
33. Ready -To-Use Object Counter Laptop Protector
34. PC Based Digital Clock
35. Fancy Christmas Light
AN EXAMPLE
BRIEF THEORY: Here is a simple circuit for (T1 and T2) and two timers 555
ICs (IC1 and IC2). Both IC1 and IC2 are wired in astable multivibrator mode. Timer IC1
produces low frequency, while timer IC2 produces high frequency. As a result, a
beeping tone is generated when the liquid tank is full. Initially, when the tank is
empty, transistor T1 does not conduct. Consequently, transistor T2 conducts and pin 4
of IC1 is low. This low voltage disables IC1 and it does not oscillate. The low output
of IC1 disables IC2 and it does not oscillate. As a result, no sound is heard from the
speaker. But when the tank gets filled up, transistor T1 conducts. Consequently,
transistor T2 is cut off and pin 4 of IC1 becomes high. This high voltage enables IC1
and it oscillates to produce low frequencies at pin 3. This low-frequency output
enables IC2 and it also oscillates to produce high frequencies. As a result, sound is
produced from the speaker. Using preset VR1 you can control the volume of the
sound from the speaker. The circuit can be powered from a 9V battery or from mains
by using a 9V power adaptor.
CIRCUIT DIAGRAM:
PRECAUTIONS:
1) Make the connections according to the Circuit diagram using soldering iron
2) The connections should be tight.
3) The Vcc and ground should be applied carefully at the specified pin only