Level/Byte OR: Difference between revisions

From Turing Complete
mNo edit summary
(Added infobox)
 
Line 1: Line 1:
{{Infobox level
| section            = Arithemtic
| type                = Component
| prerequisite1      = Double the Number
| unlocks-level1      = Negative Numbers
| unlocks-component1  = 8 Bit Or
| scored              = Yes
| highscore          = 10
| api-enum-id        = byte_OR
| api-enum-number    = 20
}}
In the Byte OR level, your objective is to construct a circuit that can OR together two byte values.
In the Byte OR level, your objective is to construct a circuit that can OR together two byte values.


To complete this level, you will need eight [[OR|1-bit Or]] components, as well as ''two'' [[Byte Splitter|Byte Splitters]] and ''one'' [[Byte Maker]]. Bitwise logical operations involve separating each byte into its constituent 8 bits, performing the logical 1-bit operation for all eight pairs of bits, and recombining the final result into 1 byte.
To complete this level, you will need eight {{Component|OR|1-bit Or}} gates, as well as ''two'' {{Component|Byte Splitter|Byte Splitters}} and ''one'' {{Component|8 Bit Maker}}. Bitwise logical operations involve separating each byte into its constituent 8 bits, performing the logical 1-bit operation for all eight pairs of bits, and recombining the final result into 1 byte.


First, you will want to connect each byte input up to their own byte splitters, so you can start working with each byte as eight discrete bits. To perform the bitwise OR operation, hook each pair up to one ''OR'' component. Specifically, the first ''OR'' component should OR together the first bit of each byte, the second should OR together the second bit of each byte, the third for the third bit of each byte, and so on for all eight bit pairs. Finally, link the output of each connected ''OR'' gate up to the corresponding bit in the Byte Maker component and link the Byte Maker's output to the level's output.
First, you will want to connect each byte input up to their own byte splitters, so you can start working with each byte as eight discrete bits. To perform the bitwise OR operation, hook each pair up to one ''OR'' component. Specifically, the first ''OR'' component should OR together the first bit of each byte, the second should OR together the second bit of each byte, the third for the third bit of each byte, and so on for all eight bit pairs. Finally, link the output of each connected ''OR'' gate up to the corresponding bit in the 8 Bit Maker component and wire the Maker's output to the level's output.

Latest revision as of 11:45, 23 August 2024

Section Arithemtic
Type Component
Prerequisite Double the Number
Unlocks Negative Numbers
8 Bit Or
Scored Yes
High score 10
API byte_OR (20)


In the Byte OR level, your objective is to construct a circuit that can OR together two byte values.

To complete this level, you will need eight 1-bit Or gates, as well as two Byte Splitters and one 8 Bit Maker. Bitwise logical operations involve separating each byte into its constituent 8 bits, performing the logical 1-bit operation for all eight pairs of bits, and recombining the final result into 1 byte.

First, you will want to connect each byte input up to their own byte splitters, so you can start working with each byte as eight discrete bits. To perform the bitwise OR operation, hook each pair up to one OR component. Specifically, the first OR component should OR together the first bit of each byte, the second should OR together the second bit of each byte, the third for the third bit of each byte, and so on for all eight bit pairs. Finally, link the output of each connected OR gate up to the corresponding bit in the 8 Bit Maker component and wire the Maker's output to the level's output.