
ISMAIL A. answered 05/07/21
PhD in Computer Science. 20+ years of Experience.
You need to cascade. It initially looks like you can just divide the numbers and get the result, i.e. ceiling(26/3)=9 ANDs, where the ceiling function rounds the result up. However, these are just intermediate results and you need to keep AND'ing until you reach the final answer:
26 signals --(> 9 AND gates x 3 inputs each), makes 27 pins - 26 used by signal inputs - 1 extra pin should be connected to a "1" or Voltage. Next, output of these 9 ANDs should be connected & consolidated using 3 ANDs:: 9 AND gates outputs --> (3 ANDs x 3 inputs). Finally, the last 3 AND outs need +1 more AND gate to be consolidated. That makes 3 layers: 9 + 3 + 1 = 13 AND gates.
If any of 26 signals is a "0", the this will cascade through the layers, causing a "0" out at the end.
Iff all 26 signals are "1", then we get a "1" at the output.