Giter VIP home page Giter VIP logo

quine-mccluskey's Introduction

Quine McCluskey Solver

There are many ways to simplify boolean expression, one of them is using the Quine McCluskey algorithm. This is a python implementation of the algorithm.

Description of the algorithm

The best way to visualize how the algorithm works is by looking at an example.

Setup

The first step is to find all the combinations of ones and zeroes that result in one.

setup

Grouping similars

Next we group all the combinations by number of ones

group

Combine and simplify

Then we make pairs from adjacent groups where there is a one digit difference, and combine them putting an X where the different digit was. If there is a term that can't be combined it is carried to the next step.

combine

Repeat

Repeat the process until its no longer possible to simplify

repeat

Convert Back to Binary Variables

Now you can just write the solution by writing the remaining terms as multiplications (ANDs) and sum them, in this case the solution is: Bฬ… + AC

Getting Started

There used to be a website where you where able to use the program, but the server is no longer running, so to use the program you have to install python and clone the repository to your machine and run either the script_input.py file or the terminal_input.py file.

Running the script

When you run the script you will be presented with the folowing options

First type the number of variables.
Then type an outing or the truth tables ones.
For the outing write in the format '1 0 1 0 1 0 1 0'
For the truth table write in the format '000 001 010'
Input number of variables: 
(If you don't want this kind of input type enter) Input table output : 
(If you don't want this kind of input type enter) Input truth table with in a single line : 

The outing format is the S column of the truth table separated by spaces. And the truth table represents the combinations that result in ones.

Author

Luc Joffily Ribas

quine-mccluskey's People

Contributors

luc16 avatar lucjribas avatar

Watchers

James Cloos avatar

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.