Skip to content

progabber/Logic-Conversion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Logic-Conversion

Given a formula in CNF (Conjunctive Normal Form), model it into a formula using only NAND gates with arbitrary fan-in while minimising number of gates used.

How to use:

Enter the number of clauses 'n' in the given CNF formula in the first line.
This is followed by 'n' lines each containing a strictly positive or negative number representing a proposition or its negation (e.g. 1 -4 3 represents p_1 AND ~p_4 AND p_3).
The program then outputs the minimum number of NAND gates required to model the CNF along with the connections required.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages