2
$\begingroup$

the table of logic and ($ \wedge $) is

0 0 0  0 1 0 1 0 0 1 1 1 

I can build a "logic and" operation with additions and subtractions?

  • 0
    I don't think so, but you can do it with addition, subtraction, and logical or.2012-01-11

2 Answers 2

3

If you mean truncated subtraction, so that negative results are truncated to zero, that is, $x\dot-y=0$ when $x\leq y$, then since $\neg x=1\dot-x$, it follows that de Morgan's law amounts to $x\wedge y=1\dot-\Bigl((1\dot-x)+(1\dot- y)\Bigr),$ which is what you want.

  • 0
    Yes, indeed, it is the same.2012-01-11
0

If I understand you correctly, then yes you can. You could have one rule for (0, 0) and one rule for the other cases as follows: If (x, y)=(0, 0), then (x^y)=(x+y). Otherwise (x^y)=((x+y)-1).

  • 0
    mmm I think in this solution, but I need the `if` ... I only have additions and subtractions2012-01-11