Level/Adding Bytes

From Turing Complete
Revision as of 01:39, 14 August 2024 by AtrociousAmbition (talk | contribs) (Created page with "In this level, you are tasked with designing a component that can ADD together two byte values. To accomplish this, you will need to use the 1-bit Adder component you created earlier on to perform bitwise addition on the two numbers. To complete the level, you will need ''two'' '''Byte Splitter''' components, a '''Byte Maker''' component, and ''eight'' '''1-bit Adder''' components. First, hook up each byte input node to a Byte Splitter, so you can start working...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In this level, you are tasked with designing a component that can ADD together two byte values. To accomplish this, you will need to use the 1-bit Adder component you created earlier on to perform bitwise addition on the two numbers.

To complete the level, you will need two Byte Splitter components, a Byte Maker component, and eight 1-bit Adder components. First, hook up each byte input node to a Byte Splitter, so you can start working with each value bit-by-bit. Next, for each pair of bits between each byte value (each first bit, each second bit, etc.), you will need to use one Adder component to perform addition on the two bits. For each pair of bits between the two bytes, hook them up to a 1-bit Adder component to add the two bits together. Consolidate the outputs of each Adder using a Byte Maker component, and link its restored byte output to the level's byte output node.

Also notice that the level has an input and an output for a Carry bit. This is where the third bit in the 1-bit Adder component comes in handy, as it allows those components to be chained together in order to add together arbitrarily large numbers. To integrate the Carry functionality into this component, first connect the level's Carry bit input node up to the third input of the first 1-bit Adder component. ext, connect the Adder component's second output to the next Adder's third input. Continue chaining the components together for each of the eight Adder components, and for the final Adder, link its Carry output to the level's Carry output node itself. From here, the level will be complete.