Giter Site home page Giter Site logo

speelbarrow / kmap Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 128 KB

A program for generating k-maps based on user input.

License: Eclipse Public License 2.0

Go 68.52% Gherkin 31.48%
kmap k-map karnaugh-map command-line command-line-tool cli go golang go117 golang117

kmap's Introduction

kmap CI/CD Go Reference

A program for generating k-maps based on user input.

EXAMPLES

> kmap
  
  What is the size of the k-map? (3): 
  3
  What are the arguments to the k-map?: 
  0,1,6,7
  What are the don`t care conditions of of the k-map?:
  2, 4
  
                y
    -----------------
    | 1 | 1 | 0 | X |
    -----------------
  x | X | 0 | 1 | 1 |
    -----------------
            z
> kmap -s 2 -a '1, 2' -dc ''
          y
    ---------
    | 0 | 1 |
    ---------
  x | 1 | 0 |
    ---------

INSTALLATION

  • With Go 1.17+ installed:

    > go install github.com/noah-friedman/kmap/bin/kmap@latest
  • Without Go 1.17+ installed:

    See Releases for pre-compiled binaries.

USAGE

After running the kmap program the user is prompted for three inputs:

  • The size of the k-map (a.k.a. the number of variables in the k-map)

    Valid: [2-4]

  • The arguments of the k-map

    Valid: [0-2size)

  • The don't care conditions of the k-map

    Valid: [0-2size)

NOTE: The arguments and don't care conditions must not overlap.

When inputting the arguments of the k-map the user may provide a series of valid numbers seperated by any characters as long as each separation contains the same characters. Otherwise, an error will occur.

Instead of inputting parameters directly, the user may provide arguments to the kmap program:

  • -s or -size for the size parameter
  • -a or -args for the arguments to the k-map
  • -dc or -dont-care for the don't care conditions of the k-map

EXIT CODES

  • 0: Everything went fine, the program executed successfully
  • 1: Some kind of bug or error in the way I wrote the program.
  • 2: Some kind of bug in a library called by the program (possibly due to a misunderstanding of the library on my part).

kmap's People

Contributors

speelbarrow avatar

Stargazers

 avatar

Watchers

 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.