Editing
Propositional Logic
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== <span style="color: #FFFFFF;">Applying</span> == '''Modeling 'The Logic Gate' (Simulating a digital circuit):''' <syntaxhighlight lang="python"> def logic_gate(p, q, gate_type): """ Simulates the core logical connectives. """ if gate_type == "AND": return p and q elif gate_type == "OR": return p or q elif gate_type == "XOR": # Exclusive OR (One or the other, but not both) return p != q elif gate_type == "IF_THEN": return not p or q # Logical equivalent of P -> Q return None # P: True (User is logged in) | Q: False (User has paid) # Gate: AND (Allow access?) print(f"Access Granted: {logic_gate(True, False, 'AND')}") # Gate: IF_THEN (If logged in, then show profile?) print(f"Show Profile: {logic_gate(True, True, 'IF_THEN')}") </syntaxhighlight> ; Logic Landmarks : '''The Organon (350 BC)''' → Aristotle's collection of works that defined the first rules of logic (Syllogisms), which ruled the world for 2,000 years. : '''The Laws of Thought (1854)''' → George Boole's book that "Algebraized" logic, showing that you can treat True/False just like 1/0. This is why we call it "Boolean Logic." : '''Shannon’s Thesis (1937)''' → Claude Shannon's discovery that you can build "Boolean Logic" using electrical switches (Relays), launching the computer age. : '''Wittgenstein’s Tractatus (1921)''' → The book that introduced "Truth Tables" as a way to solve all the problems of philosophy through pure logic. </div> <div style="background-color: #8B4500; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;">
Summary:
Please note that all contributions to BloomWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BloomWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information