Giter Club home page Giter Club logo

qmc's Introduction

Q-M

Usage

N M D M{...} D{...}

N: Number of variables
M: Number of minterms
D: Number of don't-care terms
M{...}: Minterms
D{...}: Don't-care terms

Run

gcc qmc.cpp && ./a.out

qmc's People

Contributors

redchenjs avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

qmc's Issues

Minterms been read as decimal numbers

scanf_s("%d", &input[i]); (qmc.cpp, line 352) when reading minterms reads those as decimal numbers, not as binary sequence. This causes issues in the same file, line 354: input[i] >= (0x01 << n) can be evaluated as false even when the inputs are correct - the right side is equal to 2^n, while the left side can exceed 10^n, if the first bit in minterm is 1.

I chose
bitset<26> b(to_string(input[i])); input[i] = b.to_ullong();
to convert decimal reading to binary, but I am not sure, if this is an optimal solution.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.