solution of k map in c

solution of k map in c

write a program in c to solve k-map with digital circuit

View Answers

August 31, 2014 at 12:32 PM

/*C program that implements a basic K-MAP of 3 variables This is just a basic program . You need to take the logic further to implement an efficient algorithm. If ur unable to get the logic plz ask and i'll upload the complete program till then keep working.

Written By: KALYANA SRINIVAS */

include

include

include

int i,j; int temp[8]; int matrix[8]={0,1,2,3,4,5,6,7}; void main() {
printf("\nEnter the function where K-MAP is to be defined: "); for(i=0;i<8;i++) { scanf("%d",&temp[i]); } for(i=0,j=0;i<8;j++) { if(temp[i]==matrix[j]) { matrix[j]=1; i++; } } for(i=0;i<8;i++) { if(temp[0]==1||temp[1]==1) { matrix[1]=1; } else { matrix[1]=0; } if(matrix[i]!=0 && matrix[i]!= 1) { matrix[i]=0; } printf("%d\t",matrix[i]); } puts(""); if(matrix[0]==1 && matrix[1]==1 && matrix[2]==1 && matrix[3]==1 && matrix[4]==1 && matrix[5]==1 && matrix[6]==1 && matrix[7]==1) puts("Result=1"); if(matrix[1]==1 && matrix[2]==1 && matrix[3]==1) puts("Result= !X!Y + !XY!Z"); getch(); }









Related Tutorials/Questions & Answers:
solution of k map in c
solution of k map in c  write a program in c to solve k-map with digital circuit
program on k-map with graphical circuit in c
program on k-map with graphical circuit in c  write a program in c to solve k-map with digital circuit
Advertisements
Solution to C prog
Solution to C prog   Hi, Pls any body help, why the following prog crashing while running. #include<stdio.h> #include<conio.h> int main(){ int n,*fact(int *n); printf("Enter the number:"); scanf
Site map - C Tutorials
| Site Map | Business Software Services India Tutorial Section   C Tutorials  | Java Tutorials | PHP Tutorials  | Linux...; | XPath Tutorials | HTML TutorialsADS_TO_REPLACE_1 C Tutorial Section
SOLUTION: How to compile Objective C on Windows with GNU Step ?
SOLUTION: How to compile Objective C on Windows with GNU Step ?  <p>I just started learning ObjC today and found this tutorial informative, except the fact that the above program needs some more instructions to run. Here
solution
solution   A developer wants you to develop a simple take away restaurant order service. The system reads from a file containing information about the restaurant (such as the name, place and menu). The system then allows the user
solution
solution   A developer wants you to develop a simple take away restaurant order service. The system reads from a file containing information about the restaurant (such as the name, place and menu). The system then allows the user
c++
c++  Characterize the following algorithm in terms of Big-O notation. for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++) for (int k = 1; k <= n; k++) cout << i + j + k
Map
Map  If I have an object implementing the Map interface in Java and I... way of going through the map either iterator or for each loop or for loop... HashMap(); hm.put(1,"A"); hm.put(2,"B"); hm.put(1,"C"); hm.put(3,"D
map
map  using map, i want display message based on id selected [both are strings]   i do no   Hi Friend, Try the following code...) { Map map=new HashMap(); map.put("Message1","Hello
ModuleNotFoundError: No module named 'k'
ModuleNotFoundError: No module named 'k'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'k' How to remove the ModuleNotFoundError: No module named 'k' error
C++
and the second row are the two generated numbers. b g c z k e <- letter index...C++  Hi I do not understand the question stated below. Does anyone... for clarification on the above question. Element a b c ΓΆβ?¬Β¦ΓΆβ?¬Β¦ΓΆβ?¬Β¦ x y z Index 0 1 2
C++
C++  How can i write this in dev c
C++
C++  How can i write this in dev c
c#
c#  how to find out the size of the BMP image in C
c++
c++  use a prgrm as an example to xplain-: a)class b)object c)message d)cope resolution operator
c++
c++  write a programme that calculates the area and circumference of a rectangle
c#
c#  how to find out the size of the BMP image
c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used
c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used
c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used
C++
C++  dear sir How to create windows form application for login screen using C++? USER Name -TESTADMIN Password -testuser
c++
c++  differenciate btw.-a)local & public variables b)pre-defined & user defined functions c)fnctn prototype,defination & fnctn code.use code examples
c++
c++  differenciate btw.-a)local & public variables b)pre-defined & user defined functions c)fnctn prototype,defination & fnctn code.use code examples
C++
C++  differenciate btw.-a)local & public variables b)pre-defined & user defined functions c)fnctn prototype,defination & fnctn code.use code examples
C++
C++  Describe the principle advantages of deploying a linked list versus a static array when implementing a Queue or a Stack
c++
c++  write a prgrm tht accepts 3 integer values,then with a function to swap the values
C++
C++  Trace the bubble sort using the following integers,which represent the elements in an array. 5,7,3,8,6,7,3
C++
C++  I have been asked to write a programme that gets five values,gets the sum,average and product please help me
C#
C#  i need a code that will make program perform the basic operations upon the data Listview save, update and cancel
Artifacts of com.artit-k
List of Artifacts of com.artit-k maven depenency
c++
c++  write a program that gets a key or character from the keyboard and displays it ASII code in decimal, hexadecimal and binary form.It must also give a description of the key pressed
c++
c++  write a prgrm tht calculates the surface area of a cylinder.the prgrm shld find the circumfrance and have a function that calculates the fadius and another to calculate the surface area
C++
C++  write a prgrm tht gets five values,gets the sum,average &...; #include <conio.h> void main() { clrscr(); int a,b,c,d,e,sum; float average...;>b>>c>>d>>e; sum=a+b+c+d+e; average=sum/5; product=a*b*c*d
c++
c++  .write a program that accepts 5 subjects of a student,it should have a function to calculate the average & another function to grade.grade should be as follows-<40=E,40-49=D,50-59=C,60-69=B & >70
c++
c++  Consider the following function: int funcExercise7(int list[], int size) { int sum = 0; for (int index = 0; index < size; index++) sum = sum + list[index]; return sum
c++
c++  Consider the following declarations: class xClass { public: void... private members does class xClass have? c. How many constructors does class xClass.... Write a C++ statement that prints the values of the data members of the object
C#
C# register form  i want to generate a user id automatically after filling their register form and i want to show their id to their email? please reply me soon
c++
c++  Consider the following declarations: class xClass { public: void func(); void print() const; xClass (); xClass (int, double); private: int u... private members does class xClass have? c. How many constructors does class xClass
c++
c++  Write a console based C++ program that reads student information from a text file, build an array of objects of type class StudentInfo... name with the minimum GPA 7) Display Student GPAs as Letter Grades (A, B, C, D
c++
c++  .write a prgrm tht accepts 5 subjects of a student,it shld hv a function to calculate the average & another function to grade.grade shld be as follows-<40=E,40-49=D,50-59=C,60-69=B & >70
c++
c++  Characterize the following algorithm in terms of Big-O notation. Also find the exact number of additions executed by the loop. (Assume that all variables are properly declared.) for (int i = 1; i <= n; i++) sum = sum + i
C++
C++  . Consider the definition of the following class: class CC { public: CC(); //Line 1 CC(int); //Line 2 CC(int, int); //Line 3 CC(double, int); //Line 4 . . . private: int u; double v
c++
c++  Write the definition of the class dayType that implements the day of the week in a program. The class dayType should store the day... on an object of type dayType: a. Set the day. b. Print the day. c. Return the day
c++
c++   Assume vector "x" of integers with values of 7, 3, 5, 8, 1, 9, 0, 4, 2, 6. Second, assume integer variables "a," "b" and "y" with values of 3, x.size()-5 and 0, respectively. Third, assume a for-loop header which: 3.1
c++
c++  write a programme that calculates the area and circumference of a rectangle   #include<conio.h> #include<iostream.h> class rect { int l,b; int area; int peri; public: void get_rect() { cout<<"\n
ModuleNotFoundError: No module named 'k-parser'
ModuleNotFoundError: No module named 'k-parser'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'k-parser' How to remove the ModuleNotFoundError: No module named 'k-parser
ModuleNotFoundError: No module named 'k-seq'
ModuleNotFoundError: No module named 'k-seq'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'k-seq' How to remove the ModuleNotFoundError: No module named 'k-seq'
ModuleNotFoundError: No module named 'k-sequencing'
ModuleNotFoundError: No module named 'k-sequencing'  Hi, My Python... 'k-sequencing' How to remove the ModuleNotFoundError: No module named 'k-sequencing' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'k-torch'
ModuleNotFoundError: No module named 'k-torch'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'k-torch' How to remove the ModuleNotFoundError: No module named 'k-torch

Ads