SlideShare a Scribd company logo
Submission Date: 18 -11-2016
//Bilal Aslam
//programfor implimentationof K-Map
#include <iostream>
usingnamespace std;
intmain() {
intm0,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11,m12,m13,m14,m15;
intarr[16]={m0,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11,m12,m13,m14,m15};
cout<<"Enter 1 or 0 in m0: "<< endl;
cin>>m0;
cout<<"Enter 1 or 0 in m1: "<< endl;
cin>>m1;
cout<<"Enter 1 or 0 in m2: "<< endl;
cin>>m2;
cout<<"Enter 1 or 0 in m3: "<< endl;
BY BILAL ASLAM
Karnaugh map
The Karnaugh map, also known as the K-map, is a method to
simplify boolean algebra expressions
cin>>m3;
cout<<"Enter 1 or 0 in m4: "<< endl;
cin>>m4;
cout<<"Enter 1 or 0 in m5: "<< endl;
cin>>m5;
cout<<"Enter 1 or 0 in m6: "<< endl;
cin>>m6;
cout<<"Enter 1 or 0 in m7: "<< endl;
cin>>m7;
cout<<"Enter 1 or 0 in m8: "<< endl;
cin>>m8;
cout<<"Enter 1 or 0 in m9: "<< endl;
cin>>m9;
cout<<"Enter 1 or 0 in m10: "<< endl;
cin>>m10;
cout<<"Enter 1 or 0 in m11: "<< endl;
cin>>m11;
cout<<"Enter 1 or 0 in m12: "<< endl;
cin>>m12;
cout<<"Enter 1 or 0 in m13: "<< endl;
cin>>m13;
cout<<"Enter 1 or 0 in m14: "<< endl;
cin>>m14;
cout<<"Enter 1 or 0 in m15: "<< endl;
cin>>m15;
cout<<endl;
cout<<" C'D' "<<"C'D "<<"C D" <<" C D'" << endl;
cout<<"A'B'"<<" "<< m0<<" "<< m1<<" "<< m3<<" "<<m2<<endl;
cout<<"A'B"<<" "<< m4<<" "<< m5<<" "<< m7<<" "<< m6<<endl;
cout<<"A B"<<" "<<m12<<" "<< m13<<" "<< m15<<" "<< m14<<endl;
cout<<"A B'"<<" "<<m8<<" "<< m9<<" "<< m11<<" "<< m10<<endl;
if((m0==1)&&(m1==1)&&(m2==1)&&(m3==1)&&(m4==1)&(m5==1)&&(m6==1)&&(m7==1)&&(m8==1)&
&(m9==1)&&(m10==1)&&(m11==1)&&(m12==1)&&(m13==1)&&(m14==1)&&(m15==1))
cout<<endl<<"SimplifiedFunctionisF:"<<1 <<endl;
else
if((m0==0)&&(m1==0)&&(m2==1)&&(m3==0)&&(m4==0)&(m5==0)&&(m6==0)&&(m7==0)&&(m8==0)&
&(m9==0)&&(m10==0)&&(m11==0)&&(m12==0)&&(m13==0)&&(m14==0)&&(m15==0))
cout<<"SimplifiedFunctionisF:"<<"A'B'C D'" <<endl;
else
if((m0==0)&&(m1==0)&&(m2==1)&&(m3==1)&&(m4==0)&(m5==0)&&(m6==0)&&(m7==0)&&(m8==0)&
&(m9==0)&&(m10==0)&&(m11==0)&&(m12==0)&&(m13==0)&&(m14==0)&&(m15==0))
cout<<"SimplifiedFunctionisF:"<<"A'B'C" <<endl;
else
if((m0==0)&&(m1==1)&&(m2==1)&&(m3==1)&&(m4==0)&(m5==0)&&(m6==0)&&(m7==0)&&(m8==0)&
&(m9==0)&&(m10==0)&&(m11==0)&&(m12==0)&&(m13==0)&&(m14==0)&&(m15==0))
cout<<"SimplifiedFunctionisF:"<<"A'B'D+A'B'C" <<endl;
else
cout<<"SimplifiedFunctionisF:"<<"0" <<endl;
return0; }
Output:
Karnaugh map program Assignment

More Related Content

PPT
Production 1
PPTX
Tugasan 9 Pisah Ragaman (A168202)
PDF
AWS DEV DAY SEOUL 2017 Buliding Serverless Web App - 직방 Image Converter
PDF
2018 China Natural Gas Pipeline Map
PDF
Cheap Coal and Market Access
PPTX
Cobb Douglas Production Function
PPTX
NUMERICAL METHOD
PPTX
COBB DOUGLAS PRODUCTION FUNCTION THEORY
Production 1
Tugasan 9 Pisah Ragaman (A168202)
AWS DEV DAY SEOUL 2017 Buliding Serverless Web App - 직방 Image Converter
2018 China Natural Gas Pipeline Map
Cheap Coal and Market Access
Cobb Douglas Production Function
NUMERICAL METHOD
COBB DOUGLAS PRODUCTION FUNCTION THEORY

What's hot (18)

PDF
Tugasan pisah ragaman (a168892)
PPTX
Build 2017 - B8037 - Explore the next generation of innovative UI in the Visu...
PPTX
The Distribution of Shagai /Presentation/ - Шагайны тархалт
PPTX
Numerical integration
PDF
PDF
Final Presentation-DATNYC
PDF
Issue 1 Abusing Q Map
PPT
Cobb-Douglas Production Function
PDF
2018 IMSM: Splicing of Multi-Scale Downscaler Air Quality Sufaces - US EPA Wo...
PDF
Functions 1
PPTX
The Tracktor Project
PPTX
NYC Taxi
PDF
In-Car Navigation with OSRM - Wherecamp Berlin 2016
PDF
Query Expansion with Locally-Trained Word Embeddings (ACL 2016)
PPTX
cobb douglas production function
PPTX
R kmethod
PDF
2012-04-12_Cad-Q Revit Superbrukerdag_Visualisering som del av Designprosessen
PDF
Radiation damping
Tugasan pisah ragaman (a168892)
Build 2017 - B8037 - Explore the next generation of innovative UI in the Visu...
The Distribution of Shagai /Presentation/ - Шагайны тархалт
Numerical integration
Final Presentation-DATNYC
Issue 1 Abusing Q Map
Cobb-Douglas Production Function
2018 IMSM: Splicing of Multi-Scale Downscaler Air Quality Sufaces - US EPA Wo...
Functions 1
The Tracktor Project
NYC Taxi
In-Car Navigation with OSRM - Wherecamp Berlin 2016
Query Expansion with Locally-Trained Word Embeddings (ACL 2016)
cobb douglas production function
R kmethod
2012-04-12_Cad-Q Revit Superbrukerdag_Visualisering som del av Designprosessen
Radiation damping
Ad

Viewers also liked (8)

PPT
Karnaugh maps z 88
PPTX
karnaugh maps
PPTX
Karnaugh map
PPT
KMAP
PPTX
Karnaugh Maps
PPSX
Chapter iii: Number System
PPT
Karnaugh Map
Karnaugh maps z 88
karnaugh maps
Karnaugh map
KMAP
Karnaugh Maps
Chapter iii: Number System
Karnaugh Map
Ad

Recently uploaded (20)

PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
Digital Logic Computer Design lecture notes
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
UNIT 4 Total Quality Management .pptx
DOCX
573137875-Attendance-Management-System-original
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
Geodesy 1.pptx...............................................
PPTX
Sustainable Sites - Green Building Construction
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
web development for engineering and engineering
PPTX
Construction Project Organization Group 2.pptx
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Digital Logic Computer Design lecture notes
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
CYBER-CRIMES AND SECURITY A guide to understanding
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Operating System & Kernel Study Guide-1 - converted.pdf
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
UNIT 4 Total Quality Management .pptx
573137875-Attendance-Management-System-original
CH1 Production IntroductoryConcepts.pptx
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Geodesy 1.pptx...............................................
Sustainable Sites - Green Building Construction
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
web development for engineering and engineering
Construction Project Organization Group 2.pptx

Karnaugh map program Assignment

  • 1. Submission Date: 18 -11-2016 //Bilal Aslam //programfor implimentationof K-Map #include <iostream> usingnamespace std; intmain() { intm0,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11,m12,m13,m14,m15; intarr[16]={m0,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11,m12,m13,m14,m15}; cout<<"Enter 1 or 0 in m0: "<< endl; cin>>m0; cout<<"Enter 1 or 0 in m1: "<< endl; cin>>m1; cout<<"Enter 1 or 0 in m2: "<< endl; cin>>m2; cout<<"Enter 1 or 0 in m3: "<< endl; BY BILAL ASLAM Karnaugh map The Karnaugh map, also known as the K-map, is a method to simplify boolean algebra expressions
  • 2. cin>>m3; cout<<"Enter 1 or 0 in m4: "<< endl; cin>>m4; cout<<"Enter 1 or 0 in m5: "<< endl; cin>>m5; cout<<"Enter 1 or 0 in m6: "<< endl; cin>>m6; cout<<"Enter 1 or 0 in m7: "<< endl; cin>>m7; cout<<"Enter 1 or 0 in m8: "<< endl; cin>>m8; cout<<"Enter 1 or 0 in m9: "<< endl; cin>>m9; cout<<"Enter 1 or 0 in m10: "<< endl; cin>>m10; cout<<"Enter 1 or 0 in m11: "<< endl; cin>>m11; cout<<"Enter 1 or 0 in m12: "<< endl; cin>>m12; cout<<"Enter 1 or 0 in m13: "<< endl; cin>>m13; cout<<"Enter 1 or 0 in m14: "<< endl; cin>>m14; cout<<"Enter 1 or 0 in m15: "<< endl; cin>>m15;
  • 3. cout<<endl; cout<<" C'D' "<<"C'D "<<"C D" <<" C D'" << endl; cout<<"A'B'"<<" "<< m0<<" "<< m1<<" "<< m3<<" "<<m2<<endl; cout<<"A'B"<<" "<< m4<<" "<< m5<<" "<< m7<<" "<< m6<<endl; cout<<"A B"<<" "<<m12<<" "<< m13<<" "<< m15<<" "<< m14<<endl; cout<<"A B'"<<" "<<m8<<" "<< m9<<" "<< m11<<" "<< m10<<endl; if((m0==1)&&(m1==1)&&(m2==1)&&(m3==1)&&(m4==1)&(m5==1)&&(m6==1)&&(m7==1)&&(m8==1)& &(m9==1)&&(m10==1)&&(m11==1)&&(m12==1)&&(m13==1)&&(m14==1)&&(m15==1)) cout<<endl<<"SimplifiedFunctionisF:"<<1 <<endl; else if((m0==0)&&(m1==0)&&(m2==1)&&(m3==0)&&(m4==0)&(m5==0)&&(m6==0)&&(m7==0)&&(m8==0)& &(m9==0)&&(m10==0)&&(m11==0)&&(m12==0)&&(m13==0)&&(m14==0)&&(m15==0)) cout<<"SimplifiedFunctionisF:"<<"A'B'C D'" <<endl; else if((m0==0)&&(m1==0)&&(m2==1)&&(m3==1)&&(m4==0)&(m5==0)&&(m6==0)&&(m7==0)&&(m8==0)& &(m9==0)&&(m10==0)&&(m11==0)&&(m12==0)&&(m13==0)&&(m14==0)&&(m15==0)) cout<<"SimplifiedFunctionisF:"<<"A'B'C" <<endl; else if((m0==0)&&(m1==1)&&(m2==1)&&(m3==1)&&(m4==0)&(m5==0)&&(m6==0)&&(m7==0)&&(m8==0)& &(m9==0)&&(m10==0)&&(m11==0)&&(m12==0)&&(m13==0)&&(m14==0)&&(m15==0)) cout<<"SimplifiedFunctionisF:"<<"A'B'D+A'B'C" <<endl; else cout<<"SimplifiedFunctionisF:"<<"0" <<endl;