Ramblings

ULTRACOMFY's personal homepage.

User Tools

Site Tools


inclusion

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
inclusion [2024/03/15 23:43] ultracomfyinclusion [2025/04/09 20:13] (current) ultracomfy
Line 1: Line 1:
 +~~Title:Inclusion~~
 <WRAP column right 18%> <WRAP column right 18%>
 {{page>Templates:Science}} {{page>Templates:Science}}
 </WRAP>  </WRAP> 
  
-<fs xx-large>Inclusion</fs>, or "inclusivity" in logic and computer science broadly refers to a quality inherent to certain expressions. Specifically, an expression is inclusive if a proposed range of an expression includes the start and end point of that range. Take this expression as an example:+<fs xx-large>Inclusion</fs>, or "inclusivity" in [[logic]] and [[computer science]] broadly refers to a quality inherent to certain expressions. Specifically, an expression is inclusive if a proposed range of an expression includes the start and end point of that range. Take this expression as an example:
  
 ====== Computer Science ====== ====== Computer Science ======
Line 16: Line 17:
  
 [[logic operator#and|AND]] is a [[logic operator|logical operator]] that returns true if TWO conditions are met at the same time. A kid can have:\\ [[logic operator#and|AND]] is a [[logic operator|logical operator]] that returns true if TWO conditions are met at the same time. A kid can have:\\
-((Ice Cream) AND (Candy))\\+(Ice Cream) AND (Candy)\\
 It gets both. It gets both.
  
  
 [[logic operator#or|OR]], on the other hand, returns true if at least one of the conditions is met. What does the kid hold in its hands?\\ [[logic operator#or|OR]], on the other hand, returns true if at least one of the conditions is met. What does the kid hold in its hands?\\
-((Ice Cream) OR (Candy))\\+(Ice Cream) OR (Candy)\\
 Imagine you are asked "does it hold candy or ice cream?", you look at the kid and find that it holds both, but you can only respond with "yes" or "no", you would say "yes". Imagine you are asked "does it hold candy or ice cream?", you look at the kid and find that it holds both, but you can only respond with "yes" or "no", you would say "yes".
  
  
 [[logic operator#xor|XOR]] is an //exclusive// or. It returns true only when one, and only one condition is met.\\ [[logic operator#xor|XOR]] is an //exclusive// or. It returns true only when one, and only one condition is met.\\
-((Ice Cream) XOR (Candy))\\ +(Ice Cream) XOR (Candy)\\ 
-The child can have ice cream XOR candy - ie. one or the other, but not both.+The child can have ice cream XOR candy - ie. one or the other, but not both.((It was really hard to find a real world example use case for XOR, I gave up, googled for it and went with [[https://stackoverflow.com/a/18944879|this]] one. While real world analogies for XOR are hard to imagine, they have important use cases in [[programming]].))
inclusion.1710542627.txt.gz · Last modified: 2024/03/15 23:43 by ultracomfy

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki