PUZZLE #2675: Logic Gate Circuit (diff 3)
A digital logic circuit with 30 gates (6x AND, 9x NAND, 8x NOR, 7x OR). 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 |
3
|
| Word Length |
6
|
| Output Width |
30
|
| Encoding |
5-bit binary (A=00000, B=00001, ..., Z=11001)
|
| Gates |
{'id': 'g0', 'type': 'OR', 'inputs': ['i0', 'i1'], 'output': 'o0'}, {'id': 'g1', 'type': 'NOR', 'inputs': ['i2', 'i3'], 'output': 'o1'}, {'id': 'g2', 'type': 'NAND', 'inputs': ['i4', 'i5'], 'output': 'o2'}, {'id': 'g3', 'type': 'NAND', 'inputs': ['i6', 'i7'], 'output': 'o3'}, {'id': 'g4', 'type': 'AND', 'inputs': ['i8', 'i9'], 'output': 'o4'}, {'id': 'g5', 'type': 'NOR', 'inputs': ['i10', 'i11'], 'output': 'o5'}, {'id': 'g6', 'type': 'NOR', 'inputs': ['i12', 'i13'], 'output': 'o6'}, {'id': 'g7', 'type': 'NAND', 'inputs': ['i14', 'i15'], 'output': 'o7'}, {'id': 'g8', 'type': 'OR', 'inputs': ['i16', 'i17'], 'output': 'o8'}, {'id': 'g9', 'type': 'OR', 'inputs': ['i18', 'i19'], 'output': 'o9'}, {'id': 'g10', 'type': 'AND', 'inputs': ['i20', 'i21'], 'output': 'o10'}, {'id': 'g11', 'type': 'NOR', 'inputs': ['i22', 'i23'], 'output': 'o11'}, {'id': 'g12', 'type': 'NAND', 'inputs': ['i24', 'i25'], 'output': 'o12'}, {'id': 'g13', 'type': 'OR', 'inputs': ['i26', 'i27'], 'output': 'o13'}, {'id': 'g14', 'type': 'AND', 'inputs': ['i28', 'i29'], 'output': 'o14'}, {'id': 'g15', 'type': 'NAND', 'inputs': ['i30', 'i31'], 'output': 'o15'}, {'id': 'g16', 'type': 'AND', 'inputs': ['i32', 'i33'], 'output': 'o16'}, {'id': 'g17', 'type': 'AND', 'inputs': ['i34', 'i35'], 'output': 'o17'}, {'id': 'g18', 'type': 'NOR', 'inputs': ['i36', 'i37'], 'output': 'o18'}, {'id': 'g19', 'type': 'NAND', 'inputs': ['i38', 'i39'], 'output': 'o19'}, {'id': 'g20', 'type': 'NAND', 'inputs': ['i40', 'i41'], 'output': 'o20'}, {'id': 'g21', 'type': 'OR', 'inputs': ['i42', 'i43'], 'output': 'o21'}, {'id': 'g22', 'type': 'AND', 'inputs': ['i44', 'i45'], 'output': 'o22'}, {'id': 'g23', 'type': 'NAND', 'inputs': ['i46', 'i47'], 'output': 'o23'}, {'id': 'g24', 'type': 'NOR', 'inputs': ['i48', 'i49'], 'output': 'o24'}, {'id': 'g25', 'type': 'NOR', 'inputs': ['i50', 'i51'], 'output': 'o25'}, {'id': 'g26', 'type': 'OR', 'inputs': ['i52', 'i53'], 'output': 'o26'}, {'id': 'g27', 'type': 'NAND', 'inputs': ['i54', 'i55'], 'output': 'o27'}, {'id': 'g28', 'type': 'NOR', 'inputs': ['i56', 'i57'], 'output': 'o28'}, {'id': 'g29', 'type': 'OR', 'inputs': ['i58', 'i59'], 'output': 'o29'}
|
| Inputs |
{
"i0": 0,
"i1": 0,
"i10": 1,
"i11": 1,
"i12": 0,
"i13": 0,
"i14": 0,
"i15": 1,
"i16": 1,
"i17": 1,
"i18": 0,
"i19": 0,
"i2": 1,
"i20": 0,
"i21": 0,
"i22": 0,
"i23": 0,
"i24": 0,
"i25": 0,
"i26": 0,
"i27": 0,
"i28": 0,
"i29": 0,
"i3": 1,
"i30": 1,
"i31": 1,
"i32": 0,
"i33": 1,
"i34": 0,
"i35": 1,
"i36": 1,
"i37": 0,
"i38": 0,
"i39": 0,
"i4": 1,
"i40": 1,
"i41": 1,
"i42": 1,
"i43": 0,
"i44": 0,
"i45": 0,
"i46": 1,
"i47": 1,
"i48": 1,
"i49": 1,
"i5": 1,
"i50": 1,
"i51": 0,
"i52": 1,
"i53": 1,
"i54": 0,
"i55": 0,
"i56": 1,
"i57": 0,
"i58": 1,
"i59": 1,
"i6": 0,
"i7": 0,
"i8": 0,
"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 |
30
|
| 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: 30 gates (6x AND, 9x NAND, 8x NOR, 7x OR), 60 inputs, 6 chars (30 output bits). Simulate forward, decode 5-bit binary.
|
| Answer Format |
5-bit binary string (e.g., "01010")
|
author's note: Audited: logic-gate diff 3
— website sponsored —
[ ad space ]