PUZZLE #5345: Logic Gate Circuit (diff 7)
A digital logic circuit with 90 gates (7x AND, 23x BUF, 9x NAND, 4x NOR, 7x NOT, 10x OR, 13x XNOR, 17x XOR). Simulate the gates forward from the given inputs. The output bits encode a 6-character word using 5-bit binary (A=00000 through Z=11001).
DATA
| Difficulty |
7
|
| Word Length |
6
|
| Output Width |
30
|
| Encoding |
5-bit binary (A=00000, B=00001, ..., Z=11001)
|
| Gates |
{'id': 'g0', 'type': 'XNOR', 'inputs': ['i0', 'i1'], 'output': 'n1'}, {'id': 'g1', 'type': 'NAND', 'inputs': ['n1', 'i2'], 'output': 'n2'}, {'id': 'g2', 'type': 'BUF', 'inputs': ['n2'], 'output': 'o0'}, {'id': 'g3', 'type': 'XOR', 'inputs': ['i3', 'i4'], 'output': 'n3'}, {'id': 'g4', 'type': 'OR', 'inputs': ['n3', 'i5'], 'output': 'n4'}, {'id': 'g5', 'type': 'BUF', 'inputs': ['n4'], 'output': 'o1'}, {'id': 'g6', 'type': 'XOR', 'inputs': ['i6', 'i7'], 'output': 'n5'}, {'id': 'g7', 'type': 'AND', 'inputs': ['n5', 'i8'], 'output': 'n6'}, {'id': 'g8', 'type': 'BUF', 'inputs': ['n6'], 'output': 'o2'}, {'id': 'g9', 'type': 'XOR', 'inputs': ['i9', 'i10'], 'output': 'n7'}, {'id': 'g10', 'type': 'OR', 'inputs': ['n7', 'i11'], 'output': 'n8'}, {'id': 'g11', 'type': 'BUF', 'inputs': ['n8'], 'output': 'o3'}, {'id': 'g12', 'type': 'XOR', 'inputs': ['i12', 'i13'], 'output': 'n9'}, {'id': 'g13', 'type': 'OR', 'inputs': ['n9', 'i14'], 'output': 'n10'}, {'id': 'g14', 'type': 'NOT', 'inputs': ['n10'], 'output': 'o4'}, {'id': 'g15', 'type': 'XOR', 'inputs': ['i15', 'i16'], 'output': 'n11'}, {'id': 'g16', 'type': 'NAND', 'inputs': ['n11', 'i17'], 'output': 'n12'}, {'id': 'g17', 'type': 'BUF', 'inputs': ['n12'], 'output': 'o5'}, {'id': 'g18', 'type': 'XOR', 'inputs': ['i18', 'i19'], 'output': 'n13'}, {'id': 'g19', 'type': 'AND', 'inputs': ['n13', 'i20'], 'output': 'n14'}, {'id': 'g20', 'type': 'BUF', 'inputs': ['n14'], 'output': 'o6'}, {'id': 'g21', 'type': 'XOR', 'inputs': ['i21', 'i22'], 'output': 'n15'}, {'id': 'g22', 'type': 'NAND', 'inputs': ['n15', 'i23'], 'output': 'n16'}, {'id': 'g23', 'type': 'BUF', 'inputs': ['n16'], 'output': 'o7'}, {'id': 'g24', 'type': 'XNOR', 'inputs': ['i24', 'i25'], 'output': 'n17'}, {'id': 'g25', 'type': 'NOR', 'inputs': ['n17', 'i26'], 'output': 'n18'}, {'id': 'g26', 'type': 'BUF', 'inputs': ['n18'], 'output': 'o8'}, {'id': 'g27', 'type': 'XNOR', 'inputs': ['i27', 'i28'], 'output': 'n19'}, {'id': 'g28', 'type': 'AND', 'inputs': ['n19', 'i29'], 'output': 'n20'}, {'id': 'g29', 'type': 'BUF', 'inputs': ['n20'], 'output': 'o9'}, {'id': 'g30', 'type': 'XOR', 'inputs': ['i30', 'i31'], 'output': 'n21'}, {'id': 'g31', 'type': 'NAND', 'inputs': ['n21', 'i32'], 'output': 'n22'}, {'id': 'g32', 'type': 'NOT', 'inputs': ['n22'], 'output': 'o10'}, {'id': 'g33', 'type': 'XOR', 'inputs': ['i33', 'i34'], 'output': 'n23'}, {'id': 'g34', 'type': 'NAND', 'inputs': ['n23', 'i35'], 'output': 'n24'}, {'id': 'g35', 'type': 'NOT', 'inputs': ['n24'], 'output': 'o11'}, {'id': 'g36', 'type': 'XOR', 'inputs': ['i36', 'i37'], 'output': 'n25'}, {'id': 'g37', 'type': 'OR', 'inputs': ['n25', 'i38'], 'output': 'n26'}, {'id': 'g38', 'type': 'NOT', 'inputs': ['n26'], 'output': 'o12'}, {'id': 'g39', 'type': 'XOR', 'inputs': ['i39', 'i40'], 'output': 'n27'}, {'id': 'g40', 'type': 'NAND', 'inputs': ['n27', 'i41'], 'output': 'n28'}, {'id': 'g41', 'type': 'NOT', 'inputs': ['n28'], 'output': 'o13'}, {'id': 'g42', 'type': 'XOR', 'inputs': ['i42', 'i43'], 'output': 'n29'}, {'id': 'g43', 'type': 'OR', 'inputs': ['n29', 'i44'], 'output': 'n30'}, {'id': 'g44', 'type': 'BUF', 'inputs': ['n30'], 'output': 'o14'}, {'id': 'g45', 'type': 'XNOR', 'inputs': ['i45', 'i46'], 'output': 'n31'}, {'id': 'g46', 'type': 'NAND', 'inputs': ['n31', 'i47'], 'output': 'n32'}, {'id': 'g47', 'type': 'BUF', 'inputs': ['n32'], 'output': 'o15'}, {'id': 'g48', 'type': 'XNOR', 'inputs': ['i48', 'i49'], 'output': 'n33'}, {'id': 'g49', 'type': 'NOR', 'inputs': ['n33', 'i50'], 'output': 'n34'}, {'id': 'g50', 'type': 'BUF', 'inputs': ['n34'], 'output': 'o16'}, {'id': 'g51', 'type': 'XNOR', 'inputs': ['i51', 'i52'], 'output': 'n35'}, {'id': 'g52', 'type': 'OR', 'inputs': ['n35', 'i53'], 'output': 'n36'}, {'id': 'g53', 'type': 'BUF', 'inputs': ['n36'], 'output': 'o17'}, {'id': 'g54', 'type': 'XOR', 'inputs': ['i54', 'i55'], 'output': 'n37'}, {'id': 'g55', 'type': 'AND', 'inputs': ['n37', 'i56'], 'output': 'n38'}, {'id': 'g56', 'type': 'NOT', 'inputs': ['n38'], 'output': 'o18'}, {'id': 'g57', 'type': 'XNOR', 'inputs': ['i57', 'i58'], 'output': 'n39'}, {'id': 'g58', 'type': 'OR', 'inputs': ['n39', 'i59'], 'output': 'n40'}, {'id': 'g59', 'type': 'BUF', 'inputs': ['n40'], 'output': 'o19'}, {'id': 'g60', 'type': 'XNOR', 'inputs': ['i60', 'i61'], 'output': 'n41'}, {'id': 'g61', 'type': 'OR', 'inputs': ['n41', 'i62'], 'output': 'n42'}, {'id': 'g62', 'type': 'BUF', 'inputs': ['n42'], 'output': 'o20'}, {'id': 'g63', 'type': 'XOR', 'inputs': ['i63', 'i64'], 'output': 'n43'}, {'id': 'g64', 'type': 'OR', 'inputs': ['n43', 'i65'], 'output': 'n44'}, {'id': 'g65', 'type': 'BUF', 'inputs': ['n44'], 'output': 'o21'}, {'id': 'g66', 'type': 'XNOR', 'inputs': ['i66', 'i67'], 'output': 'n45'}, {'id': 'g67', 'type': 'AND', 'inputs': ['n45', 'i68'], 'output': 'n46'}, {'id': 'g68', 'type': 'BUF', 'inputs': ['n46'], 'output': 'o22'}, {'id': 'g69', 'type': 'XOR', 'inputs': ['i69', 'i70'], 'output': 'n47'}, {'id': 'g70', 'type': 'OR', 'inputs': ['n47', 'i71'], 'output': 'n48'}, {'id': 'g71', 'type': 'BUF', 'inputs': ['n48'], 'output': 'o23'}, {'id': 'g72', 'type': 'XNOR', 'inputs': ['i72', 'i73'], 'output': 'n49'}, {'id': 'g73', 'type': 'NOR', 'inputs': ['n49', 'i74'], 'output': 'n50'}, {'id': 'g74', 'type': 'BUF', 'inputs': ['n50'], 'output': 'o24'}, {'id': 'g75', 'type': 'XNOR', 'inputs': ['i75', 'i76'], 'output': 'n51'}, {'id': 'g76', 'type': 'NAND', 'inputs': ['n51', 'i77'], 'output': 'n52'}, {'id': 'g77', 'type': 'NOT', 'inputs': ['n52'], 'output': 'o25'}, {'id': 'g78', 'type': 'XOR', 'inputs': ['i78', 'i79'], 'output': 'n53'}, {'id': 'g79', 'type': 'AND', 'inputs': ['n53', 'i80'], 'output': 'n54'}, {'id': 'g80', 'type': 'BUF', 'inputs': ['n54'], 'output': 'o26'}, {'id': 'g81', 'type': 'XNOR', 'inputs': ['i81', 'i82'], 'output': 'n55'}, {'id': 'g82', 'type': 'NOR', 'inputs': ['n55', 'i83'], 'output': 'n56'}, {'id': 'g83', 'type': 'BUF', 'inputs': ['n56'], 'output': 'o27'}, {'id': 'g84', 'type': 'XOR', 'inputs': ['i84', 'i85'], 'output': 'n57'}, {'id': 'g85', 'type': 'NAND', 'inputs': ['n57', 'i86'], 'output': 'n58'}, {'id': 'g86', 'type': 'BUF', 'inputs': ['n58'], 'output': 'o28'}, {'id': 'g87', 'type': 'XNOR', 'inputs': ['i87', 'i88'], 'output': 'n59'}, {'id': 'g88', 'type': 'AND', 'inputs': ['n59', 'i89'], 'output': 'n60'}, {'id': 'g89', 'type': 'BUF', 'inputs': ['n60'], 'output': 'o29'}
|
| Inputs |
{
"i0": 0,
"i1": 0,
"i10": 0,
"i11": 0,
"i12": 0,
"i13": 0,
"i14": 0,
"i15": 1,
"i16": 0,
"i17": 1,
"i18": 1,
"i19": 0,
"i2": 1,
"i20": 1,
"i21": 1,
"i22": 0,
"i23": 0,
"i24": 0,
"i25": 0,
"i26": 0,
"i27": 0,
"i28": 0,
"i29": 0,
"i3": 0,
"i30": 1,
"i31": 0,
"i32": 1,
"i33": 1,
"i34": 0,
"i35": 0,
"i36": 1,
"i37": 0,
"i38": 1,
"i39": 1,
"i4": 0,
"i40": 0,
"i41": 1,
"i42": 0,
"i43": 0,
"i44": 0,
"i45": 0,
"i46": 0,
"i47": 1,
"i48": 0,
"i49": 0,
"i5": 0,
"i50": 0,
"i51": 0,
"i52": 0,
"i53": 0,
"i54": 1,
"i55": 0,
"i56": 0,
"i57": 0,
"i58": 0,
"i59": 0,
"i6": 1,
"i60": 0,
"i61": 0,
"i62": 0,
"i63": 1,
"i64": 0,
"i65": 0,
"i66": 0,
"i67": 0,
"i68": 0,
"i69": 0,
"i7": 0,
"i70": 0,
"i71": 0,
"i72": 0,
"i73": 0,
"i74": 0,
"i75": 0,
"i76": 0,
"i77": 0,
"i78": 1,
"i79": 0,
"i8": 0,
"i80": 0,
"i81": 0,
"i82": 0,
"i83": 0,
"i84": 1,
"i85": 0,
"i86": 0,
"i87": 0,
"i88": 0,
"i89": 1,
"i9": 1
}
|
| Output Nodes |
o0, o1, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14, o15, o16, o17, o18, o19, o20, o21, o22, o23, o24, o25, o26, o27, o28, o29
|
| N Gates |
90
|
| N Inputs |
90
|
| Instructions |
Digital logic circuit — simulate the gates forward.
1. Start with the given input values (bits).
2. For each gate in topological order:
- Read its input values (from inputs or previous gate outputs)
- Compute output based on gate type:
BUF = input
NOT = 1 - input
AND = 1 if ALL inputs are 1, else 0
NAND = 0 if ALL inputs are 1, else 1
OR = 1 if ANY input is 1, else 0
NOR = 0 if ANY input is 1, else 1
XOR = 1 if odd number of 1s, else 0
XNOR = 1 if even number of 1s, else 0
3. After all gates are simulated, read the output nodes.
4. Group the output bits into 5-bit chunks.
5. Map each 5-bit value to a letter (0=A, 1=B, ..., 25=Z).
6. Concatenate to spell the hidden word.
|
| Hint |
Logic circuit: 90 gates (7x AND, 23x BUF, 9x NAND, 4x NOR, 7x NOT, 10x OR, 13x XNOR, 17x XOR), 90 inputs, 6 chars (30 output bits). Simulate forward, decode 5-bit binary.
|
| Answer Format |
5-bit binary string (e.g., "01010")
|
author's note: Pool fill: logic-gate diff 7
— website sponsored —
[ ad space ]