PUZZLE #3085: Logic Gate Circuit (diff 1)
A digital logic circuit with 15 gates (15x NOT). Simulate the gates forward from the given inputs. The output bits encode a 3-character word using 5-bit binary (A=00000 through Z=11001).
DATA
| Difficulty |
1
|
| Word Length |
3
|
| Output Width |
15
|
| Encoding |
5-bit binary (A=00000, B=00001, ..., Z=11001)
|
| Gates |
{'id': 'g0', 'type': 'NOT', 'inputs': ['i0'], 'output': 'o0'}, {'id': 'g1', 'type': 'NOT', 'inputs': ['i1'], 'output': 'o1'}, {'id': 'g2', 'type': 'NOT', 'inputs': ['i2'], 'output': 'o2'}, {'id': 'g3', 'type': 'NOT', 'inputs': ['i3'], 'output': 'o3'}, {'id': 'g4', 'type': 'NOT', 'inputs': ['i4'], 'output': 'o4'}, {'id': 'g5', 'type': 'NOT', 'inputs': ['i5'], 'output': 'o5'}, {'id': 'g6', 'type': 'NOT', 'inputs': ['i6'], 'output': 'o6'}, {'id': 'g7', 'type': 'NOT', 'inputs': ['i7'], 'output': 'o7'}, {'id': 'g8', 'type': 'NOT', 'inputs': ['i8'], 'output': 'o8'}, {'id': 'g9', 'type': 'NOT', 'inputs': ['i9'], 'output': 'o9'}, {'id': 'g10', 'type': 'NOT', 'inputs': ['i10'], 'output': 'o10'}, {'id': 'g11', 'type': 'NOT', 'inputs': ['i11'], 'output': 'o11'}, {'id': 'g12', 'type': 'NOT', 'inputs': ['i12'], 'output': 'o12'}, {'id': 'g13', 'type': 'NOT', 'inputs': ['i13'], 'output': 'o13'}, {'id': 'g14', 'type': 'NOT', 'inputs': ['i14'], 'output': 'o14'}
|
| Inputs |
{
"i0": 1,
"i1": 0,
"i10": 0,
"i11": 0,
"i12": 1,
"i13": 1,
"i14": 1,
"i2": 1,
"i3": 0,
"i4": 0,
"i5": 1,
"i6": 1,
"i7": 1,
"i8": 1,
"i9": 1
}
|
| Output Nodes |
o0, o1, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14
|
| N Gates |
15
|
| N Inputs |
15
|
| 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: 15 gates (15x NOT), 15 inputs, 3 chars (15 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 1
— website sponsored —
[ ad space ]