PUZZLE #5347: Logic Gate Circuit (diff 6)
A digital logic circuit with 60 gates (5x AND, 16x BUF, 3x NAND, 7x NOR, 4x NOT, 5x OR, 8x XNOR, 12x XOR). Simulate the gates forward from the given inputs. The output bits encode a 4-character word using 5-bit binary (A=00000 through Z=11001).
DATA
| Difficulty |
6
|
| Word Length |
4
|
| Output Width |
20
|
| Encoding |
5-bit binary (A=00000, B=00001, ..., Z=11001)
|
| Gates |
{'id': 'g0', 'type': 'XNOR', 'inputs': ['i0', 'i1'], 'output': 'n1'}, {'id': 'g1', 'type': 'OR', 'inputs': ['n1', 'i2'], 'output': 'n2'}, {'id': 'g2', 'type': 'BUF', 'inputs': ['n2'], 'output': 'o0'}, {'id': 'g3', 'type': 'XNOR', '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': 'XNOR', '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': 'XNOR', 'inputs': ['i9', 'i10'], 'output': 'n7'}, {'id': 'g10', 'type': 'NOR', 'inputs': ['n7', 'i11'], 'output': 'n8'}, {'id': 'g11', 'type': 'BUF', 'inputs': ['n8'], 'output': 'o3'}, {'id': 'g12', 'type': 'XNOR', 'inputs': ['i12', 'i13'], 'output': 'n9'}, {'id': 'g13', 'type': 'NOR', 'inputs': ['n9', 'i14'], 'output': 'n10'}, {'id': 'g14', 'type': 'BUF', 'inputs': ['n10'], 'output': 'o4'}, {'id': 'g15', 'type': 'XOR', 'inputs': ['i15', 'i16'], 'output': 'n11'}, {'id': 'g16', 'type': 'NOR', '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': 'NOR', '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': 'OR', 'inputs': ['n17', 'i26'], 'output': 'n18'}, {'id': 'g26', 'type': 'BUF', 'inputs': ['n18'], 'output': 'o8'}, {'id': 'g27', 'type': 'XOR', 'inputs': ['i27', 'i28'], 'output': 'n19'}, {'id': 'g28', 'type': 'NOR', 'inputs': ['n19', 'i29'], 'output': 'n20'}, {'id': 'g29', 'type': 'NOT', 'inputs': ['n20'], 'output': 'o9'}, {'id': 'g30', 'type': 'XOR', 'inputs': ['i30', 'i31'], 'output': 'n21'}, {'id': 'g31', 'type': 'AND', 'inputs': ['n21', 'i32'], 'output': 'n22'}, {'id': 'g32', 'type': 'BUF', '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': 'BUF', 'inputs': ['n24'], 'output': 'o11'}, {'id': 'g36', 'type': 'XOR', 'inputs': ['i36', 'i37'], 'output': 'n25'}, {'id': 'g37', 'type': 'NAND', 'inputs': ['n25', 'i38'], 'output': 'n26'}, {'id': 'g38', 'type': 'NOT', 'inputs': ['n26'], 'output': 'o12'}, {'id': 'g39', 'type': 'XNOR', 'inputs': ['i39', 'i40'], 'output': 'n27'}, {'id': 'g40', 'type': 'NOR', 'inputs': ['n27', 'i41'], 'output': 'n28'}, {'id': 'g41', 'type': 'BUF', 'inputs': ['n28'], 'output': 'o13'}, {'id': 'g42', 'type': 'XOR', 'inputs': ['i42', 'i43'], 'output': 'n29'}, {'id': 'g43', 'type': 'AND', 'inputs': ['n29', 'i44'], 'output': 'n30'}, {'id': 'g44', 'type': 'NOT', 'inputs': ['n30'], 'output': 'o14'}, {'id': 'g45', 'type': 'XOR', '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': 'XOR', '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': 'AND', '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': 'OR', 'inputs': ['n37', 'i56'], 'output': 'n38'}, {'id': 'g56', 'type': 'BUF', 'inputs': ['n38'], 'output': 'o18'}, {'id': 'g57', 'type': 'XOR', 'inputs': ['i57', 'i58'], 'output': 'n39'}, {'id': 'g58', 'type': 'OR', 'inputs': ['n39', 'i59'], 'output': 'n40'}, {'id': 'g59', 'type': 'NOT', 'inputs': ['n40'], 'output': 'o19'}
|
| Inputs |
{
"i0": 0,
"i1": 0,
"i10": 0,
"i11": 0,
"i12": 0,
"i13": 0,
"i14": 0,
"i15": 1,
"i16": 0,
"i17": 0,
"i18": 1,
"i19": 0,
"i2": 1,
"i20": 0,
"i21": 1,
"i22": 0,
"i23": 0,
"i24": 0,
"i25": 0,
"i26": 0,
"i27": 1,
"i28": 0,
"i29": 0,
"i3": 0,
"i30": 1,
"i31": 0,
"i32": 1,
"i33": 1,
"i34": 0,
"i35": 1,
"i36": 1,
"i37": 0,
"i38": 1,
"i39": 0,
"i4": 0,
"i40": 0,
"i41": 0,
"i42": 1,
"i43": 0,
"i44": 1,
"i45": 1,
"i46": 0,
"i47": 1,
"i48": 1,
"i49": 0,
"i5": 0,
"i50": 0,
"i51": 0,
"i52": 0,
"i53": 1,
"i54": 0,
"i55": 0,
"i56": 0,
"i57": 0,
"i58": 0,
"i59": 0,
"i6": 0,
"i7": 0,
"i8": 0,
"i9": 0
}
|
| Output Nodes |
o0, o1, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14, o15, o16, o17, o18, o19
|
| N Gates |
60
|
| N Inputs |
60
|
| 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: 60 gates (5x AND, 16x BUF, 3x NAND, 7x NOR, 4x NOT, 5x OR, 8x XNOR, 12x XOR), 60 inputs, 4 chars (20 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 6
— website sponsored —
[ ad space ]