<< Back to Off-topic Forum   Search

Posts 1 - 4 of 4   
Heredity --> Logic Gate?: 2020-03-18 17:43:29


adamg5
Level 57
Report
Hey!
So I discovered that even if one plant is tall, the output is tall. If both plants are short, the output is short.
If tall is 1 and short is 0, does that mean heredities are based off of the OR gate?
Heredity --> Logic Gate?: 2020-03-18 18:52:49


Battle Master ⚔
Level 58
Report
depends, it can also be an XOR gate tho
Heredity --> Logic Gate?: 2020-03-18 19:35:00


Norman 
Level 58
Report
Hey!
So I discovered that even if one plant is tall, the output is tall. If both plants are short, the output is short.
If tall is 1 and short is 0, does that mean heredities are based off of the OR gate?


@adamg5:
You are describing a logical OR conjuction here. About whether heredities are based off of the OR gate I'm not entirely sure what you mean with that question. If you are building something and you run out of OR gates (or you write code and your OR operator key isn't working,...) you can substitute OR with other logical operators however:

A||B <=> !(!A&&!B)

or in other terms:

A OR B
is equivalent to
NOT (NOT A AND NOT B)

Edited 3/18/2020 19:37:07
Heredity --> Logic Gate?: 2020-03-18 21:06:03


adamg5
Level 57
Report
The OR gate is the gate in which if either input isn't 0, the output is 1.
A B O
0 0 0
1 0 1
0 1 1
1 1 1
T = 1
t = 0
t t t
T t T
t T T
T T T
Posts 1 - 4 of 4