# LMD Async Tutoring

**URL:** https://discuss.criticalfallibilism.com/t/lmd-async-tutoring/1933
**Category:** Tutoring
**Created:** [April 23, 2024, 12:05am UTC](https://discuss.criticalfallibilism.com/t/lmd-async-tutoring/1933 "2024-04-23T00:05:39Z")
**Posts on this page:** 1
**Showing post:** 410

<div class="post-metadata">

### Author: ![LMD](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/lmd/32/3213_2.png) [@LMD](https://discuss.criticalfallibilism.com/u/LMD)
#### Post date: [July 19, 2024, 1:33am UTC](https://discuss.criticalfallibilism.com/t/lmd-async-tutoring/1933/410 "2024-07-19T01:33:38Z")

</div>

> [@Eternity Async Tutoring](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/394):
>
> Keep working on the rest. More hints are available.

Here is nand, nor, and xor. I got xor on my first attempt (and the others, but they were easier after knowing negation). My solution to xor reminds me of this equivalent logical expression I made earlier:

> [@LMD](#):
>
> > xor(A, B) = (A v B)^~(A^B)
> 
> This one shows you how ‘xor’ is like ‘or’, but with an amendment. It means: true if A or B is true but not if both are true.

**nand(x, y): 1 - (x \* y)**

nand(1, 1): 1 - (1) = 0  
nand(1, 0): 1 - (0) = 1  
nand(0, 1): 1 - (0) = 1  
nand(0, 0): 1 - (0) = 1

**nor:(x, y): 1 - ceil(x/2 + y/2)**

nor(1, 1): 1 - ceil(0.5 + 0.5) = 0  
nor(1, 0): 1 - ceil(0.5 + 0) = 0  
nor(0, 1): 1 - ceil(0 + 0.5) = 0  
nor(0, 0): 1 - ceil(0 + 0) = 1

**xor(x, y) = ceil(x/2 + y/2) - xy**

xor(1, 1) = ceil(0.5 + 0.5) - 1 = 0  
xor(1, 0) = ceil(0.5 + 0) - 0 = 1  
xor(0, 1) = ceil(0 + 0.5) - 0 = 1  
xor(0, 0) = ceil(0 + 0) - 0 = 0

---

_[View the full topic](https://discuss.criticalfallibilism.com/t/lmd-async-tutoring/1933)._
