X Tutup
Skip to content
This repository was archived by the owner on Feb 8, 2019. It is now read-only.

EvanHahn/truth-table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

make truth tables with coffeescript.

i had a homework assignment that made us generate truth tables, and there's no way i was doing all that by hand when i had a Computer Machine! so i made this. maybe it'll be useful to you!

test.coffee should do a good job explaining how this works. here's the output of that:

┌───┬───┬─────────┬────────────┬────────────────────────┐
│ P │ Q │ (!P)||Q │ !((!Q)||P) │ ((!P)||Q)===!((!Q)||P) │
├───┼───┼─────────┼────────────┼────────────────────────┤
│ F │ F │ T       │ F          │ F                      │
├───┼───┼─────────┼────────────┼────────────────────────┤
│ F │ T │ T       │ T          │ T                      │
├───┼───┼─────────┼────────────┼────────────────────────┤
│ T │ F │ F       │ F          │ T                      │
├───┼───┼─────────┼────────────┼────────────────────────┤
│ T │ T │ T       │ F          │ F                      │
└───┴───┴─────────┴────────────┴────────────────────────┘

About

generate truth tables from the command line. made for a class

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

X Tutup