Created
August 27, 2016 01:02
-
-
Save phase/36ea95280add9e55a30441bd32a6dc22 to your computer and use it in GitHub Desktop.
Decomposing Boolean Algebra
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Not(a) = Nand(a,a) | |
And(a,b) = Not(Nand(a,b)) | |
Or(a,b) = Not(And(Not(a),Not(b))) | |
Xor(a,b) = Or(And(a,Not(b)),And(Not(a),b))) | |
Or(a, b) = | |
Nand( //Not | |
Nand( //And | |
Nand(Nand(a, a), Nand(b, b)), //First And input | |
Nand(Nand(a, a), Nand(b, b)) //Second And input | |
), | |
Nand( // Copy of above for the Not | |
Nand(Nand(a, a), Nand(b, b)), | |
Nand(Nand(a, a), Nand(b, b)) | |
) | |
) | |
Or(a, b) = Nand(Nand(Nand(Nand(a, a), Nand(b, b)), Nand(Nand(a, a), Nand(b, b))), Nand(Nand(Nand(a, a), Nand(b, b)), Nand(Nand(a, a), Nand(b, b)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment