Please create an account or Login! Have fun!

Wire: Difference between revisions

Jump to navigation Jump to search
392 bytes removed ,  19 February 2019
Rewording counter and latch to distinguish from old Wiki
mNo edit summary
(Rewording counter and latch to distinguish from old Wiki)
Line 216: Line 216:
|cc2 = Yes
|cc2 = Yes
|cc1index  =  
|cc1index  =  
|multidirectional = Yes
|multidirectional = No
|moves = No
|moves = No
}}
}}


The '''counter''' is a gate with two inputs and two outputs. When the ADD ONE input goes from a FALSE state to a TRUE state, the digit is incremented by one. This is known as a positive edge trigger. If the digit wraps from 9 to 0, the OVERFLOW output will pulse TRUE for one clock cycle. This can be used to trigger some device, or it can be fed into another counter. When the SUBTRACT ONE input goes from a FALSE to a TRUE state, the digit is decremented by one. When the digit wraps from 0 to 9, the UNDERFLOW output will become TRUE until the digit is raised to 0 or lowered to 8.
The '''counter''' is a gate with two inputs and two outputs. A pulse that enters the counter from right side will increment the it by one and from the right side will decrement it by one. If the counter is incremented while at 9, it will ''overflow'', output a pulse to the left side, and wrap to 0. If the counter is decremented while at 0, it will ''underflow'', output a steady signal to the top side, and wrap to 9.
 
Pictured is an example of a countdown timer that will close the door and start the flame jet, stopping the ball from continuing to push the button connected to it.
 
[[Image:CounterExample.png]]


=== Latch ===
=== Latch ===
Line 237: Line 233:
}}
}}


The arrow on a '''latch gate''' points from the data input to the output. As long as the latch input is TRUE, the output will be the same as the data input. When the latch input is FALSE, the output will stay the same as it was when the latch input was last TRUE. This is a combination data flow valve and one bit memory. It's like the statement "As long as I can see you, I will follow your lead. When I can't see you, I'll do the last thing I saw you do."
The '''latch gate''' has two inputs and one output. The arrow points from the data input to the output, and the input on the opposite side is the latch input. As long as the latch input has a signal, the output will be the same as the data input. When the latch input has no signal, the output will stay the same as it was when the latch input last had a signal. Latch gates can be thought of as storage for one bit of memory.


The second latch pictured to the right is a mirror image of the first latch, used to keep the game elements symmetrical.
The second latch pictured to the right is a mirror image of the first latch, used to keep the game elements symmetrical.


{{clear}}
{{clear}}

Navigation menu