Advertisements
Advertisements
Question
Write the canonical form of the cardinal terms, m3 and M5 for F (A, B, C, D).
Solution
M3 for F(A,B,C,D) = (0011)2 = A'.B'.C.D (in minterm)
= A+B+C'+D' (in maxterm)
M5 for F(A,B,C,D) = (0101)2 = A'.B.C'.D (in minterm)
= A+B'+C+D' (in maxtrem)
APPEARS IN
RELATED QUESTIONS
The keyword that allows multi-level inheritance in Java programming is ______.
A class Ins Sort contains an array of integers which sorts the elements in a particular order.
Some of the members of the class are given below.
Class name | InsSort |
arr[ ] | stores the array elements |
size | stores the number of elements in the array |
Methods/Member functions: | |
InsSort(int s) | constructor to initialise size= s |
void getArray( ) | accepts the array elements |
void insertionSornt( ) | sorts the elements of the array in descending order using the in descending order using the Insertion Sort technique |
double find( ) | calculates and returns the average of all the odd numbers in the array |
void display( ) | displays the elements of the array in a sorted order along with the average of all the odd numbers in the array by invoking the function find( ) with an appropriate message |
Specify the class InsSort giving details of the constructor(), void getArray( ), void insertionSort( ), double find() and void display(). Define a main( ) function to create an object and call all the functions accordingly to enable the task.
Design a class Coding to perform some string related operations on a word containing alphabets only.
Example: Input: "Java"
Output: Original word: Java
J=74
a=97
v= 118
a=97
Lowest ASCII code: 74
Highest ASCII code: 118
Some of the members of the class are given below:
Class name | Coding |
Data members/instance variables: | |
wrd | stores the word |
len | stores the length of the word |
Methods/Member functions: | |
Coding() | constructor to initialise the data members with legal initial values |
void accept( ) | to accept a word |
void find() | to display all the characters of 'wrd' along with their ASCII codes. Also display the lowest ASCII code and the highest ASCII code, in 'wrd' |
void show() | to display the original word and all the characters of 'wrd' along with their ASCII codes. Also display the lowest ASCII code and the highest ASCII code in 'wrd', by invoking the function find() |
Specify the class Coding giving details of the constructor( ), void accept( ), void find( ) and void show(). Define a main() function to create an object and call all the functions accordingly to enable the task.