Level/Adding Bytes: Difference between revisions

From Turing Complete
(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...")
 
No edit summary
Line 1: Line 1:
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.
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 (call Full Adder) 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.
To complete the level, you will need ''two'' '''[[Byte Splitter]]''' components, one '''[[Byte Maker]]''' component, and ''eight'' '''[[Full 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 Full 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.
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 Full Adder component. Then connect each 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.

Revision as of 20:55, 15 August 2024

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 (call Full Adder) you created earlier on to perform bitwise addition on the two numbers.

To complete the level, you will need two Byte Splitter components, one Byte Maker component, and eight Full 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 Full 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 Full Adder component. Then connect each 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.