Problem3- Cyclic codes

Synchronization methods

Synchronization Methods:-

For optimum demodulation of ASK, FSK and PSK waveforms, timing information is needed at the receiver. In particular, the integrate and dump operation in correlation receivers and the sampling operation in other types of receivers must be carefully controlled and synchronized with the incoming signal for optimum performance.

Three general methods are used for synchronization in digital modulation schemes. These methods are

  1. Use of primary (or) Secondary time standard.
  2. Utilization of a separate synchronization signal.
  3. Extraction of clock information from the modulated waveform itself, referred to as self-synchronization.

 

In the first method, the receiver and transmitter are solved to a precise master timing source. This method is often used in large data communication networks. In point to point data communication this method is very seldom used because of its cost.

separate synchronization signals in the form of pilot tones are widely used to in point to point data communication systems. In this method, a special synchronization signal (or) sinusoidal signal of known frequency is transmitted along with the information carrying modulation wave form the synchronization signal is sent along with the modulation wave form using one of the following methods.

  1. By frequency division Multiplexing, where in the frequency of the pilot tone is chosen to coincide with a null in the power spectral density of the signalling wave form.
  2. By time division Multiplexing where the modulated wave form is interrupted for a short period of time during which the synchronizing signal is transmitted.
  3. By additional modulation such as the one shown in figure.

In all of the above methods, the synchronization signal is isolated at the receiver and the zero crossings of the synchronization signal control the sampling operations at the Receiver.

All three methods discussed above and over head(or additional requirements) to the system in terms of an increase in power and Band Width requirements (or) a reduction in the data rate in addition to increasing the equipment complexity.

Self-synchronization methods extract a local carrier reference as well as timing information from the received wave forms. The Block Diagram of a system that derives a coherent local carrier from a PSK wave form is shown in figure(1) similar systems can be used to extract such a reference signal for other types of digital modulation schemes.

A feedback version of the squaring synchronizer is shown figure(2) . This version makes use of a PLL for extracting the correct phase and the frequency of the carrier wave form.

<

p style=”text-align: justify;”>

Problem1-Cyclic Codes

pb 1. for a (7,4) Cyclic code if  V={0101110} is the received code word . Then find the Syndrome if the generating polynomial is  g(x) = x3 + x + 1 

Ans.  The syndrome polynomial S(x) can be find by dividing V(x) by g(x).

As Syndrome S(x) is zero, the received code word is a valid code word and is nothing but the transmitted code word.

 

 

Binary Cyclic Codes

Binary Cyclic Codes:-

Binary Cyclic Codes form a sub class of linear block codes.

Binary  Cyclic Codes have two advantages

  1. Encoding and syndrome calculations can be easily implemented using simple shift registers with feedback connections.
  2. These codes have a fair amount of mathematical structure that makes it possible to design codes with useful error correcting properties.

we know that a linear block code can be represented in Matrix form. Here, we will develop a polynomial representation for cyclic codes and this representation is used to derive procedures for encoding and syndrome calculations.

A special sub classes of cyclic codes that are suitable for correcting burst type of errors in a system.

Algebraic structure of Cyclic Codes:-

An (n , k) linear block code C is also called as a cyclic code if it has the following property 

if an n-tuple code vector of C is V then the n-tuple 

Obtained by shifting V Cyclically one place to the right is also a code vector of ‘C’.

This we can illustrate by using an example

This Cyclical shifting property, allows us to treat the elements of a code word as the coefficients of a polynomial of degree(n-1).

for example  is an n-bit code word can be represented as a polynomial of degree (n-1) as 

where   vo , v1 , v2 , ……..vn-1 are elements of code word are represented as coefficients of polynomial.

The elements are binary 1’s and 0’s in general. Hence these codes are called Binary Cyclic Codes . Then binary addition and multiplication of these elements is as follows

if V is shifted i positions to the right then

we can obtain from  Vi(x) from V(x) as the remainder resulting xi V(x) by dividing with  xn+1  when 

i.e,

 

Inheritance

1. In Java, inheritance allows a subclass to:

Ans. Override  or extend the methods and fields from the superclass.

2. To create a subclass in Java, you use the ___ keyword followed by the name of the superclass.

Ans. extends.

3. The superclass in Java is also known as the

Ans. Parent class.

4. Which keyword in Java is used to refer to the methods and fields of the superclass?

Ans. Super.

 
 
 
 

Polymorphism

1. What are the two main mechanisms of polymorphism in Java?

Ans. Method Overloading and Method Overriding.

2. What is method overloading in Java?

Ans. A way to provide different implementations of the same method for different types of input.

3. What is method overriding in Java?

Ans. A way to provide new implementation for a method that is already defined in a super class.

 
 
 

Multi-D Array Practical

1. What is the purpose of the following java code?

int[][] arr = new int[3][4];

Ans. It creates a two- dimensional array with 3 rows and 4 columns.

2. What is the output of the following Java code?

int[][] arr = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};

for (int i = 0; i < arr.length; i++) {

for (int j = 0; j < arr[i].length; j++) {

System.out.print(arr[i][j] + ” “);

}

System.out.println();

}

Ans. 1  2  3  4  5  6  7  8  9.

3. What is the output of the following Java code?

int[][] arr = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};

int sum = 0;

for (int i = 0; i < arr.length; i++) {

for (int j = 0; j < arr[i].length; j++) {

sum += arr[i][j];

}

}

System.out.println(sum);

Ans. 45.

One Dimensional Array – Practical 2

  1. What is the output of the following code?

int[] numbers = {1, 2, 3, 4, 5};

int sum = 0;

for(int i=0; i<numbers.length; i++)

sum += numbers[i];

}

System.out.println(sum);

Ans. 15.

2. Give the output of the given code below.

String[] nums = new String[] { "1", "9", "10" };
Arrays.sort(nums);
System.out.println(Arrays.toString(nums));

Ans. [1, 10, 9] .

Introduction to Arrays

1. What is the output of the following pseudo-code?

String[] languages = {“Telugu”, “Tamil”, “Sanskrit”, “English”};
languages[4] = “Japanese”;
System.out.println(languages[0]);

Ans. Array Index Out of Bounds exception.

2. What is the syntax for initializing an array in Java?

Ans. type[] array Name = new type[size];

3. How do you access a specific element in a one-dimensional array in Java?

Ans. array[index];

4. What is the default value of an integer array element in Java?

Ans. 0.

 
 
 

Break & Continue Practical

 1. What is the output of the given code?

public class Test{

    public static void main(String []args){
        for(int i = 0; i < 10; i++){
            if(i % 2 == 0){
                continue;
            }
            System.out.println(i);
        }
    }
}

Ans. program will print all odd numbers between 0 to 10.

2. Where can the “break” statement be used in Java?

Ans. Inside both a loop and switch statement.

 

 

The switch….case Practical

1.What is the output of the Java program below?

String animal = "GOAT";
switch(animal)
{
  break: System.out.println("DOMESTIC");
}

Ans. Compile error.

2. What is the output of Java program with SWITCH?

int num=20;
switch(num)
{
case 10: System.out.println("TEN"); break;
case 20: System.out.println("TWENTY"); break;
case 30: System.out.println("THIRTY");
}

Ans. TWENTY

 

Operators – Part 2

  1. What is the result of the following Java expression?

10 & 6

Ans.  2

2. What will be the output for the following expression?

12 ^ 5

Ans. 9

3. What is the syntax of ternary operator in Java?  

Ans. condition? expression1 : expression2;

4. What is the result of the following expression in Java? int x = 10, y = 5; 

int z = x > y ? x : y; 

System.out.println(z);

Ans. 15.

 

Operators – Part 1

 

 1. What is the output of following pseudo code? int a=350; System.out.println(~a)

Ans. -351.

2. What is the output of following pseudo code? int a=118; System.out.println(a++ + ++a);

Ans. 238.

3. What is the output of the following pseudo-code? int a= 118; System.out.println(a++ + a++);

Ans. 237.

4. What is the output of the following pseudo-code? System.out.println(102*110/15+43-21*94/20);

Ans. 693.

5. What is the output of the following pseudo-code? System.out.println(115<<42);

Ans. 117760.

6. What is the output of following pseudo code? int a= 2+3<<5/6; int b=6>>4%4; int res= (a<b)?b:a; system.out.println(res);

Ans. 6

 
 
 
 
 
 

Practical 1

 1.Choose the correct answer

What is the output of the following Java program?

public class Main {

public static void main(String[] args) {

int x = 5;

int y = 10;

System.out.println(x + y);

}

}

Ans. 15.

2. What is the correct way to declare a variable in Java?

Ans.  int x=5;

3.  What is the output of the following Java program?

public class Main {

public static void main(String[] args) {

String message = “Hello, World!”;

System.out.println(message);

}

}

Ans. Hello, World!

 

 

Common Errors in Python – Notes

The key takeaways are: 1). Errors in python: -Errors are the problems in a program due to which the program will stop the execution. On the other hand, exceptions are raised when some internal events occur which changes the normal flow of the program. 2). Syntax error: -When the proper syntax of the language is not followed then a syntax error is thrown. 3). Index error: – Lists are one of the most used data structures in Python. Index is the one used in a List. You might have gotten the message “Index Error: list index out of range” when your program ran into an error while using lists. 4). Module error: – As the name implies, this error occurs when you’re trying to access or use a module that cannot be found. In the case of the title, the “module named Python” cannot be found. 5). Key error: – generally means the key does not exist in a dictionary result in key error. 6). Import error: – There are two conditions when the Import Error will be raised. one is If the module does not exist and the second one is If we are trying to import submodule from the module. 7). Stop iteration error is thrown when the next function is going beyond the number of items in the iteration. 8). Type error: – Type Error is an exception in Python programming language that occurs when the data type of objects in an operation is inappropriate. For example, if you attempt to divide an integer with a string, the data types of the integer and the string object will not be compatible. Due to this, the Python interpreter will raise a Type Error exception as shown in the following example. 9). Value error: – A Value error in Python is a fairly simple concept. When you assign the wrong value to an object, you will get a Value error. 10). Name error: – It occurs when the variable is not defined. 11). Zero division error: – It occurs when the variable is divided by zero. 12). keyboard interrupt error: – Keyboard Interrupt exception is a part of Python’s built-in exceptions. When the programmer presses the ctrl + c or ctrl + z command on their keyboards, when present in a command line (in windows) or in a terminal (in mac os/Linux), this abruptly ends the program amidst execution

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Numbers and Math Functions – Activity

1. Insert the correct syntax to convert x into a floating point number. x=10 x= ______(x).
Ans.  float
2.  Insert the correct syntax to convert x into a integer. x = 5.5 x = _________(x)

Ans.  int
3. Divide 10 by 2, and print the result print(10 __ 2)

Ans. /
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Numbers and Math Functions – Notes

Numbers and Math functions: – There are three numeric types in Python int, float, complex. Variables of numeric types are created when you assign a value to them. example: -complex=1j To verify the type of any object in Python, use the type() function as print(type(variable)). example: – a=5 print(type(a)) You can convert from one type to another with the int(), float(), and complex() methods. example: – a=2 x=float(a) Mathematical functions: – Operators are used to perform operations on variables and values. Arithmetic operations are addition, subtraction, multiplication, division, modulus, exponential and floor division. addition: – The operator ‘+’ is used to add two numbers. subtraction: – The operator ‘-‘ is used to subtract two numbers. Multiplication: – The operator ‘*’ is used to multiply two numbers. division: – The operator ‘/’ is used to divide two numbers. Modulus: – The operator ‘%’ is used to find the remainder in division operation. Exponential operation: – (a**b) is used to find a to the power of b value. floor division:-(a//b) is dividing one number by another and then rounding the result to the closest integer that is smaller.

error: Content is protected !!