Make comparators only output one bit-wide signals

This commit is contained in:
prescientmoon 2024-11-27 08:56:36 +01:00
parent 27c6ce13c9
commit 7d9d2a2d78
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4

View file

@ -15,9 +15,9 @@ const comparatorTemplate: PartialTemplate = {
const a = context.getBinary(0) const a = context.getBinary(0)
const b = context.getBinary(1) const b = context.getBinary(1)
context.setBinary(0, Number(a > b)) context.setBinary(0, Number(a > b), 1)
context.setBinary(1, Number(a === b)) context.setBinary(1, Number(a === b), 1)
context.setBinary(2, Number(a < b)) context.setBinary(2, Number(a < b), 1)
` `
}, },
pins: { pins: {