# Is this description correct?

**URL:** <https://forum.xod.io/t/is-this-description-correct/4163>\
**Category:** XOD Programming Questions\
**Created:** [June 24, 2020, 5:26pm UTC](https://forum.xod.io/t/is-this-description-correct/4163 "2020-06-24T17:26:44Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![krugdu](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@krugdu](https://forum.xod.io/u/krugdu)\
**Post date:** [June 24, 2020, 5:26pm UTC](https://forum.xod.io/t/is-this-description-correct/4163/1 "2020-06-24T17:26:44Z")

</div>

![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/1/1f8e684f238961ac03d135748c1bf0e99e38aab2.png)

I was expecting the description to say will pass false if any one of them is false. Is there a node that will do that?

---

<div class="post-metadata">

**Author:** ![danya](https://avatars.discourse-cdn.com/v4/letter/d/7ba0ec/32.png) [@danya](https://forum.xod.io/u/danya)\
**Post date:** [June 24, 2020, 5:36pm UTC](https://forum.xod.io/t/is-this-description-correct/4163/2 "2020-06-24T17:36:41Z")

</div>

AND: Outputs true if and only if all inputs are true.

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [June 24, 2020, 5:37pm UTC](https://forum.xod.io/t/is-this-description-correct/4163/3 "2020-06-24T17:37:15Z")

</div>

It is correct, because one or the other or all, you mean `xor` that is or exclusive, that only one must be true

---

<div class="post-metadata">

**Author:** ![krugdu](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@krugdu](https://forum.xod.io/u/krugdu)\
**Post date:** [June 24, 2020, 5:47pm UTC](https://forum.xod.io/t/is-this-description-correct/4163/4 "2020-06-24T17:47:17Z")

</div>

Is there a node that will pass a false if one or more out of the bunch is false? Sorry, I’m new to programming.  
Or will pass true if only one or more are true?

---

<div class="post-metadata">

**Author:** ![gweimer](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@gweimer](https://forum.xod.io/u/gweimer)\
**Post date:** [June 24, 2020, 6:11pm UTC](https://forum.xod.io/t/is-this-description-correct/4163/5 "2020-06-24T18:11:38Z")

</div>

As stated above, “and” will output false unless ALL inputs are true (outputs false if ANY inputs are false; outputs true if [and only if] ALL inputs are true). “or” will output true if ANY input is true (outputs false if all inputs are false).

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [June 24, 2020, 6:51pm UTC](https://forum.xod.io/t/is-this-description-correct/4163/6 "2020-06-24T18:51:01Z")

</div>

> **[Logic gate](https://en.wikipedia.org/wiki/Logic_gate)**
>
> A 'logic gate' is an idealized or physical electronic device implementing a Boolean function, a logical operation performed on one or more binary inputs that produces a single binary output. Depending on the context, the term may refer to an ideal logic gate, one that has for instance zero rise time and unlimited fan-out, or it may refer to a non-ideal physical device (see Ideal and real op-amps for comparison).
> Logic gates are primarily implemented using diodes or transistors acting as electron...

---

<div class="post-metadata">

**Author:** ![krugdu](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@krugdu](https://forum.xod.io/u/krugdu)\
**Post date:** [June 24, 2020, 7:34pm UTC](https://forum.xod.io/t/is-this-description-correct/4163/7 "2020-06-24T19:34:43Z")

</div>

I ended up using 1’s and 0’s to get the logic to work. Thank you for the feedback everyone.

---

<div class="post-metadata">

**Author:** ![krugdu](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@krugdu](https://forum.xod.io/u/krugdu)\
**Post date:** [June 24, 2020, 9:34pm UTC](https://forum.xod.io/t/is-this-description-correct/4163/8 "2020-06-24T21:34:49Z")

</div>

How do I get both nodes to trigger the same port?

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/8/8654cfc31f1fee14a3e7e07bcf80473697be87e4.png)  
I want to attach RV to SIG, but maintain V2 to SIG.

---

<div class="post-metadata">

**Author:** ![krugdu](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@krugdu](https://forum.xod.io/u/krugdu)\
**Post date:** [June 24, 2020, 9:41pm UTC](https://forum.xod.io/t/is-this-description-correct/4163/9 "2020-06-24T21:41:27Z")

</div>

Is this acceptable?

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/1/1b4580bf4ddd6c6d56592ddaf300141fd1e53a21.png)

---

<div class="post-metadata">

**Author:** ![gweimer](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@gweimer](https://forum.xod.io/u/gweimer)\
**Post date:** [June 25, 2020, 12:40am UTC](https://forum.xod.io/t/is-this-description-correct/4163/10 "2020-06-25T00:40:31Z")

</div>

No. You do not want two nodes controlling the same port like that. You will just get the port switching between the two values very quickly.

You also cannot directly connect two outputs to a single input pin since XOD would not know which one to use our how to join them. You must determine how they should be joined and code that. The easiest solution would be to use an “and” or “or” node to join the two outputs. Which solution is “correct” depends on what exactly you want it to do. Perhaps neither will work for you and you need a more complex solution.

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [June 25, 2020, 1:42am UTC](https://forum.xod.io/t/is-this-description-correct/4163/11 "2020-06-25T01:42:18Z")

</div>

if the port must be active by either of the 2 node, add an OR

if you need it to be activated only with 1 use XOR

if you want it to be activated only when 2 are true use AND

if you want it to be activated only when 2 are false use NAND

---

<div class="post-metadata">

**Author:** ![krugdu](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@krugdu](https://forum.xod.io/u/krugdu)\
**Post date:** [June 25, 2020, 2:06am UTC](https://forum.xod.io/t/is-this-description-correct/4163/12 "2020-06-25T02:06:06Z")

</div>

I don’t want to activate the port simultaneously from both nodes. I only want a single function to manipulate D8 when the node is pulsed individually. I’d prefer to keep the function nodes separate, as shown, if possible. Can I generate an intermediate node between the function nodes and the digital write node?

---

<div class="post-metadata">

**Author:** ![krugdu](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@krugdu](https://forum.xod.io/u/krugdu)\
**Post date:** [June 25, 2020, 3:17am UTC](https://forum.xod.io/t/is-this-description-correct/4163/13 "2020-06-25T03:17:22Z")

</div>

In my novice imagination I picture a digital-write node that is veridic. When it’s expanded more boolean signal ports (SIG) are exposed. This would allow more than one operation to activate it individually at a given time when triggered by the pulse of a function node. Only one function should operate at a given time. If more than one function node is pulsed it would complete one function before starting another in the order they were activated. What do you think?

---

<div class="post-metadata">

**Author:** ![gweimer](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@gweimer](https://forum.xod.io/u/gweimer)\
**Post date:** [June 25, 2020, 3:45am UTC](https://forum.xod.io/t/is-this-description-correct/4163/14 "2020-06-25T03:45:24Z")

</div>

Digital-write sets a pin on or off. Pulses and functions completing don’t make much sense in that context…

The “and”, “or”, “xor”, etc. mentioned above are your intermediate nodes between your function nodes and digital-write. If that isn’t doing what you want, you are probably going about this wrong and we would be able to help more if we knew exactly what you are trying to do.

---

<div class="post-metadata">

**Author:** ![krugdu](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@krugdu](https://forum.xod.io/u/krugdu)\
**Post date:** [June 25, 2020, 11:29am UTC](https://forum.xod.io/t/is-this-description-correct/4163/15 "2020-06-25T11:29:50Z")

</div>

Can I share my code with you?

---

<div class="post-metadata">

**Author:** ![krugdu](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@krugdu](https://forum.xod.io/u/krugdu)\
**Post date:** [June 25, 2020, 3:19pm UTC](https://forum.xod.io/t/is-this-description-correct/4163/16 "2020-06-25T15:19:43Z")

</div>

“Or” was the answer. Thank you for your patience. I started constructing a custom node to do what I wanted and by the end I was left with an or node with two boolean inputs and one boolean output. That’s when i realized i was making this more difficult then it really was. Sorry for my stupidity.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/eb7348baa04192c2ef932d1db54d44f09f8a7888.png) [@system](https://forum.xod.io/u/system)\
**Post date:** [July 25, 2020, 3:19pm UTC](https://forum.xod.io/t/is-this-description-correct/4163/17 "2020-07-25T15:19:44Z")

</div>

Closed on July 25, 2020, 3:19pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
