Skip to content

Instantly share code, notes, and snippets.

@Zirak
Last active December 17, 2015 12:29
Show Gist options
  • Select an option

  • Save Zirak/5609568 to your computer and use it in GitHub Desktop.

Select an option

Save Zirak/5609568 to your computer and use it in GitHub Desktop.
Fun with logic
Beginning of discussion:http://chat.stackoverflow.com/transcript/message/9502109#9502109
Beginning of exercises shown below: http://chat.stackoverflow.com/transcript/message/9502812#9502812
Assumption: ↑ (nand) is defined
not A = ¬A = A ↑ A
A and B = A ∧ B = ¬(A ↑ B)
A or B = A ∨ B = ¬(¬A ∧ ¬B)
A → B = (A ∧ B) ∨ (¬A ∧ B) ∨ (¬A ∧ ¬B) = ¬(A ∧ ¬B)
T = A → A ∧ ¬A
T = A ∨ ¬A
F = A → ¬A
F = A ∧ ¬A
A XOR B = (A ∧ ¬B) ∨ (¬A ∧ B)
F = A XOR A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment