Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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?

share|improve this question
    
I don't think so, but you can do it with addition, subtraction, and logical or. –  Dan Brumleve Jan 11 '12 at 3:52

2 Answers 2

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.

share|improve this answer
    
this is the same of $(x+y)\dot- 1$ ? –  juanpablo Jan 11 '12 at 21:21
    
Yes, indeed, it is the same. –  JDH Jan 11 '12 at 21:45

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).

share|improve this answer
    
mmm I think in this solution, but I need the if ... I only have additions and subtractions –  juanpablo Jan 11 '12 at 13:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.