Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FeatureRequest: Support for different indexing method for implicants #12

Open
DanglmaierSimon opened this issue Jan 4, 2019 · 2 comments

Comments

@DanglmaierSimon
Copy link

DanglmaierSimon commented Jan 4, 2019

Currently the only way to index cells in the \implicant command is via the number value the cell has, that is sometimes rather counter-intuitive, since KV maps are numbered in a non-standard way. I propose a way of indexing the cells based on the x/y-Positions within the grid.

Example: Drawing an implicant from top right to bottom left on a 4x4 grid.

Current implementation: Type \implicant{0}{10}.

Problem: The indexing is counterintuitive, since you constantly have to calculate, which value corresponds to which cell.

Proposal: Index the grid from [0, 0] in the top left corner to [3, 3] in the bottom right. The above example could then be simplified to \implicant{0,0}{3,3}, which is more intuitive, since it is related to the cells position, not its index value. This is also just a syntax i thought of, it could be implemented differently.

@2pi
Copy link
Owner

2pi commented Jan 25, 2019

Thanks for the suggestion. While the karnaugh-index order might be considered counterintuitive, I believe that introducing yet another indexation system on top of the already existing will be more confusing for everyone. (Hopefully #10 could help in this department.)

I've been thinking about your proposal and come to the conclusion that it might be a good idea to add the option to use binary digits instead of decimal when selecting the cells. To produce the example image one would use this instead;

\implicant{01}{01} % <= instead of {1}{1}
\implicant{10}{10} % <= instead of {2}{2}

Which is, as you might have noticed, simply the concatenation of the row and column value for each cell.

What do you think about this? Anyone else who what something like this?

@DanglmaierSimon
Copy link
Author

DanglmaierSimon commented Jan 28, 2019

I guess that could work as well. Showing the indices in the diagram itself would certainly help, the only problem then is, that those are only visible when the pdf has been created, not while you are writing it. You would have to generate the karnaugh map, read off the indices, enter it into the document, then recompile to check, if you got it right. The method with {01}{10} would certainly be an improvement though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants