Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
encse committed Dec 24, 2024
1 parent 91bfb2c commit c7cf630
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions 2024/Day24/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## --- Day 24: Crossed Wires ---
You and The Historians arrive at the edge of a [large grove](/2022/day/23) 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 <em>true</em> (<code>1</code>) or <em>false</em> (<code>0</code>).

Expand All @@ -17,5 +17,5 @@ Which are chained one after the other like this:

I took the images from [build-electronic-circuits.com](https://www.build-electronic-circuits.com/full-adder/).

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.
5 changes: 4 additions & 1 deletion docs/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ const marked = require('marked');

function media(dir){
const files = fs.readdirSync(dir);
return files.filter(file => path.extname(file).toLowerCase() === '.gif' || path.extname(file).toLowerCase() === '.png' ).map(file => path.join(dir, file));
return files.filter(file =>
path.extname(file).toLowerCase() === '.gif' ||
path.extname(file).toLowerCase() === '.png'
).map(file => path.join(dir, file));
}

function* findReadmes(dir) {
Expand Down

0 comments on commit c7cf630

Please sign in to comment.