PUZZLE #4845: Logic Gate Circuit (diff 2)
A digital logic circuit with 60 gates (60x NOT). 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 |
2
|
| Word Length |
6
|
| Output Width |
30
|
| Encoding |
5-bit binary (A=00000, B=00001, ..., Z=11001)
|
| Gates |
{'id': 'g0', 'type': 'NOT', 'inputs': ['i0'], 'output': 'n1'}, {'id': 'g1', 'type': 'NOT', 'inputs': ['n1'], 'output': 'o0'}, {'id': 'g2', 'type': 'NOT', 'inputs': ['i1'], 'output': 'n2'}, {'id': 'g3', 'type': 'NOT', 'inputs': ['n2'], 'output': 'o1'}, {'id': 'g4', 'type': 'NOT', 'inputs': ['i2'], 'output': 'n3'}, {'id': 'g5', 'type': 'NOT', 'inputs': ['n3'], 'output': 'o2'}, {'id': 'g6', 'type': 'NOT', 'inputs': ['i3'], 'output': 'n4'}, {'id': 'g7', 'type': 'NOT', 'inputs': ['n4'], 'output': 'o3'}, {'id': 'g8', 'type': 'NOT', 'inputs': ['i4'], 'output': 'n5'}, {'id': 'g9', 'type': 'NOT', 'inputs': ['n5'], 'output': 'o4'}, {'id': 'g10', 'type': 'NOT', 'inputs': ['i5'], 'output': 'n6'}, {'id': 'g11', 'type': 'NOT', 'inputs': ['n6'], 'output': 'o5'}, {'id': 'g12', 'type': 'NOT', 'inputs': ['i6'], 'output': 'n7'}, {'id': 'g13', 'type': 'NOT', 'inputs': ['n7'], 'output': 'o6'}, {'id': 'g14', 'type': 'NOT', 'inputs': ['i7'], 'output': 'n8'}, {'id': 'g15', 'type': 'NOT', 'inputs': ['n8'], 'output': 'o7'}, {'id': 'g16', 'type': 'NOT', 'inputs': ['i8'], 'output': 'n9'}, {'id': 'g17', 'type': 'NOT', 'inputs': ['n9'], 'output': 'o8'}, {'id': 'g18', 'type': 'NOT', 'inputs': ['i9'], 'output': 'n10'}, {'id': 'g19', 'type': 'NOT', 'inputs': ['n10'], 'output': 'o9'}, {'id': 'g20', 'type': 'NOT', 'inputs': ['i10'], 'output': 'n11'}, {'id': 'g21', 'type': 'NOT', 'inputs': ['n11'], 'output': 'o10'}, {'id': 'g22', 'type': 'NOT', 'inputs': ['i11'], 'output': 'n12'}, {'id': 'g23', 'type': 'NOT', 'inputs': ['n12'], 'output': 'o11'}, {'id': 'g24', 'type': 'NOT', 'inputs': ['i12'], 'output': 'n13'}, {'id': 'g25', 'type': 'NOT', 'inputs': ['n13'], 'output': 'o12'}, {'id': 'g26', 'type': 'NOT', 'inputs': ['i13'], 'output': 'n14'}, {'id': 'g27', 'type': 'NOT', 'inputs': ['n14'], 'output': 'o13'}, {'id': 'g28', 'type': 'NOT', 'inputs': ['i14'], 'output': 'n15'}, {'id': 'g29', 'type': 'NOT', 'inputs': ['n15'], 'output': 'o14'}, {'id': 'g30', 'type': 'NOT', 'inputs': ['i15'], 'output': 'n16'}, {'id': 'g31', 'type': 'NOT', 'inputs': ['n16'], 'output': 'o15'}, {'id': 'g32', 'type': 'NOT', 'inputs': ['i16'], 'output': 'n17'}, {'id': 'g33', 'type': 'NOT', 'inputs': ['n17'], 'output': 'o16'}, {'id': 'g34', 'type': 'NOT', 'inputs': ['i17'], 'output': 'n18'}, {'id': 'g35', 'type': 'NOT', 'inputs': ['n18'], 'output': 'o17'}, {'id': 'g36', 'type': 'NOT', 'inputs': ['i18'], 'output': 'n19'}, {'id': 'g37', 'type': 'NOT', 'inputs': ['n19'], 'output': 'o18'}, {'id': 'g38', 'type': 'NOT', 'inputs': ['i19'], 'output': 'n20'}, {'id': 'g39', 'type': 'NOT', 'inputs': ['n20'], 'output': 'o19'}, {'id': 'g40', 'type': 'NOT', 'inputs': ['i20'], 'output': 'n21'}, {'id': 'g41', 'type': 'NOT', 'inputs': ['n21'], 'output': 'o20'}, {'id': 'g42', 'type': 'NOT', 'inputs': ['i21'], 'output': 'n22'}, {'id': 'g43', 'type': 'NOT', 'inputs': ['n22'], 'output': 'o21'}, {'id': 'g44', 'type': 'NOT', 'inputs': ['i22'], 'output': 'n23'}, {'id': 'g45', 'type': 'NOT', 'inputs': ['n23'], 'output': 'o22'}, {'id': 'g46', 'type': 'NOT', 'inputs': ['i23'], 'output': 'n24'}, {'id': 'g47', 'type': 'NOT', 'inputs': ['n24'], 'output': 'o23'}, {'id': 'g48', 'type': 'NOT', 'inputs': ['i24'], 'output': 'n25'}, {'id': 'g49', 'type': 'NOT', 'inputs': ['n25'], 'output': 'o24'}, {'id': 'g50', 'type': 'NOT', 'inputs': ['i25'], 'output': 'n26'}, {'id': 'g51', 'type': 'NOT', 'inputs': ['n26'], 'output': 'o25'}, {'id': 'g52', 'type': 'NOT', 'inputs': ['i26'], 'output': 'n27'}, {'id': 'g53', 'type': 'NOT', 'inputs': ['n27'], 'output': 'o26'}, {'id': 'g54', 'type': 'NOT', 'inputs': ['i27'], 'output': 'n28'}, {'id': 'g55', 'type': 'NOT', 'inputs': ['n28'], 'output': 'o27'}, {'id': 'g56', 'type': 'NOT', 'inputs': ['i28'], 'output': 'n29'}, {'id': 'g57', 'type': 'NOT', 'inputs': ['n29'], 'output': 'o28'}, {'id': 'g58', 'type': 'NOT', 'inputs': ['i29'], 'output': 'n30'}, {'id': 'g59', 'type': 'NOT', 'inputs': ['n30'], 'output': 'o29'}
|
| Inputs |
{
"i0": 1,
"i1": 0,
"i10": 1,
"i11": 0,
"i12": 0,
"i13": 0,
"i14": 1,
"i15": 0,
"i16": 1,
"i17": 0,
"i18": 0,
"i19": 0,
"i2": 1,
"i20": 0,
"i21": 1,
"i22": 1,
"i23": 0,
"i24": 1,
"i25": 0,
"i26": 0,
"i27": 1,
"i28": 1,
"i29": 0,
"i3": 1,
"i4": 0,
"i5": 0,
"i6": 1,
"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, o20, o21, o22, o23, o24, o25, o26, o27, o28, o29
|
| N Gates |
60
|
| N Inputs |
30
|
| 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 (60x NOT), 30 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 2
— website sponsored —
[ ad space ]