diff --git a/2024/24/illustration.jpeg b/2024/24/illustration.jpeg index d61c3abb..322a5b21 100644 Binary files a/2024/24/illustration.jpeg and b/2024/24/illustration.jpeg differ diff --git a/2024/24/index.html b/2024/24/index.html index 59a4ac5c..cabc6a4d 100644 --- a/2024/24/index.html +++ b/2024/24/index.html @@ -279,7 +279,7 @@

Crossed Wires

-

You and The Historians arrive at the edge of a large grove somewhere in the jungle. After the last incident, the Elves installed a small device that monitors the fruit. While The Historians search the grove, one of them asks if you can take a look at the monitoring device; apparently, it's been malfunctioning recently.

+

You and The Historians arrive at the edge of a large grove somewhere in the jungle. After the last incident, the Elves installed a small device that monitors the fruit. While The Historians search the grove, one of them asks if you can take a look at the monitoring device; apparently, it's been malfunctioning recently.

The device seems to be trying to produce a number through some boolean logic gates. Each gate has two inputs and one output. The gates all operate on values that are either true (1) or false (0).

Visit the website for the full story and full puzzle description.

The first half of the problem was a familiar logic circuit evaluator, we have done this before. I really liked the second part, although I don't have a super generic solution for it. I generated a graph from my input using Graphviz, then realized that the circuit tries to implement a full adder.

@@ -288,7 +288,7 @@

Crossed Wires

Which are chained one after the other like this:

full adder

I took the images from build-electronic-circuits.com.

-

I implemented this logic in my 'fix' method. I start with the output x01 and y01 and try to identify the gates for the individual steps. Where I found an error, I manually checked my input to figure out what went wrong. I had just two different +

I implemented this logic in my 'fix' method. I start with the inputs x01 and y01 and try to identify the gates for the individual steps. Where I found an error, I manually checked my input to figure out what went wrong. I had just two different kind of errors which can be corrected by the fixer.

namespace AdventOfCode.Y2024.Day24;