GithubHelp home page GithubHelp logo

rohityadav-sas / k-map-solver Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 14.42 MB

The Karnaugh Map (KMap) Solver is a C++ application that provides a graphical interface for solving Karnaugh Maps. It allows users to interactively input values into a KMap grid and calculate the corresponding minterms. The project is currently under development and aims to include the simplification of Boolean expressions in the future.

Makefile 0.63% C++ 99.37%
digital-logic karnaugh-map-solver k-map-solver raylib-cpp

k-map-solver's Introduction

Karnaugh Map (K-Map) Solver in C++

This project is a Karnaugh Map (KMap) Solver written in C++. It's currently under development and uses the Raylib library for the graphical user interface.

Table of Contents

Features

  • Interactive K-Map Grid
  • Calculation of MinTerms
  • Supported upto 4 variables
  • Simplification of Boolean expressions (not completed yet)

Installation

  1. Install Dependencies:

    Ensure you have installed all necessary dependencies for your platform. For detailed instructions, refer to the Raylib documentation.

  2. Update System Environment Variables:

    Add the following path to your system environment variables:

    C:\raylib\w64devkit\bin
    
  3. Navigate to Source Directory:

    Open a terminal and navigate to the following path:

    C:\raylib\raylib\src
    
  4. Compile Raylib:

    In the terminal, run the following command:

    mingw32-make PLATFORM=PLATFORM_DESKTOP
    
  5. Locate Compiled Library:

    After the command executes successfully, a new file named libraylib.a will be created.

  6. Replace Existing Library:

    Copy the newly created libraylib.a file and replace the existing libraylib.a file in the lib folder within your project directory.

  7. Create Makefile:

    Create a Makefile in your project directory and add the following content:

    # Define the source files for the project
    SOURCES = ./src/fourvar.cpp ./src/grid.cpp ./src/kmapsolver.cpp ./src/main.cpp ./src/threevar.cpp ./src/twovar.cpp
    
    # Default target to compile the project
    default:
     # Compile the source files into an executable named game.exe
     g++ $(SOURCES) -o ./build/game.exe -g -O1 -Wall -Wno-missing-braces -I include/ -L lib/ -lraylib -lopengl32 -lgdi32 -lwinmm
     
     # Run the compiled executable
     ./build/game.exe
    
    
  8. Run the Program:

    To compile and run the program, execute the following command in the terminal:

    make
    

Usage

Click on the cells in the KMap grid to toggle between 0 and 1. After setting up your KMap, click on the "Calculate" button to calculate the minterms.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License.

k-map-solver's People

Contributors

rohityadav-sas avatar prabesh6907 avatar

Watchers

 avatar

Forkers

prabesh6907

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.