No description
Find a file
2019-10-13 18:06:36 +02:00
test FIRST 2016-02-04 12:05:48 +01:00
.gitignore FIRST 2016-02-04 12:05:48 +01:00
CMakeLists.txt FIRST 2016-02-04 12:05:48 +01:00
implicant.cpp Fix header for std::pow 2019-10-13 18:06:36 +02:00
implicant.h License 2016-02-04 13:56:11 +01:00
LICENSE FIRST 2016-02-04 12:05:48 +01:00
main.cpp CLI improvements 2016-02-05 14:35:56 +01:00
qm.cpp DOC 2016-02-04 14:29:28 +01:00
qm.h License 2016-02-04 13:56:11 +01:00
README.md FIRST 2016-02-04 12:05:48 +01:00

OpenQM is a implementation of QuineMcCluskey algorithm focused on usability, relased under GNU GPLv3 license. It provide a library to integrate the algorithm in other prjects and a simple CLI executable.

Build

Installing the dependencies

  • cmake
  • libboost

Compile!

git clone https://github.com/Andreabont/OpenQM.git
mkdir build
cd build
cmake ..
make
make test

Usage in CLI

#>./OpenMP 
Insert implicants followed by return. Write 'q' or 'quit' to exit...
1001
1110
1100
q

Solution:
1001 (9)
11-0 (12, 14)

Expression: ab'c'd + abd'

Usage as library

Implicants

#include <vector>
#include "implicant.h"

int main() {

    Implicant singleImplicant = "0101";

    std::vector<Implicant> listOfImplicants = {
        "0001",
        "1001",
        "1011",
        "1100",
        "1101",
        "1110",
        "1111"
    };

}

Apply QuineMcCluskey

# Get the QM solution
std::vector<Implicant> solution = makeQM(implicant_list, dont_care_list);

# Get the boolean expression
std:string expression = getBooleanExpression(solution);