<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.logic.world/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=DjSapsan</id>
	<title>Logic World Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.logic.world/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=DjSapsan"/>
	<link rel="alternate" type="text/html" href="https://wiki.logic.world/wiki/Special:Contributions/DjSapsan"/>
	<updated>2026-05-15T13:39:02Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Talk:Edge_Detection&amp;diff=766</id>
		<title>Talk:Edge Detection</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Talk:Edge_Detection&amp;diff=766"/>
		<updated>2025-10-08T15:54:57Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: /* Edge detection circuit diagram output is not delayed */ Reply&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Edge detection circuit diagram output is not delayed ==&lt;br /&gt;
&lt;br /&gt;
@[[User:N00basaurus|N00basaurus]], in the circuit diagram you show (not lw), the output immediately becomes 1 as soon as the input becomes 1, whereas in logicworld the behaviour would be a bit different, in that the output would be delayed by one tick. I&#039;d propose delaying the output by 1 tick in the diagram to not &#039;bait&#039; people into thinking they could build such a circuit even though they cannot. [[User:GHXX|GHXX]] ([[User talk:GHXX|talk]]) 18:54, 7 October 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:@[[User:GHXX|GHXX]] btw i made that diagram. I thought about it, but the article is about rising edge. The LW behavior is shown on the last screenshot.&lt;br /&gt;
:Maybe we can leave the screenshot alone for demonstration. And instead of the diagram make a drawing that just highlights the rising edge without considering ticks [[User:DjSapsan|DjSapsan]] ([[User talk:DjSapsan|talk]]) 15:54, 8 October 2025 (UTC)&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Control_Unit&amp;diff=763</id>
		<title>Control Unit</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Control_Unit&amp;diff=763"/>
		<updated>2025-10-07T18:40:08Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: improved formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; &#039;&#039;&#039;Control Unit&#039;&#039;&#039;&lt;br /&gt;
: In &#039;&#039;Logic World&#039;&#039;, a &#039;&#039;&#039;Control Unit&#039;&#039;&#039; (&#039;&#039;&#039;CU&#039;&#039;&#039;) is a composite component designed to generate and coordinate control signals for other circuits.  &lt;br /&gt;
: Its primary functions are:&lt;br /&gt;
# To produce ordered sequences of control signals over time&lt;br /&gt;
# To provide a convenient interface that prevents mistaken combinations of control signals&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
All computers, however complex, are built on a fundamental idea: changing from one state to another state.&lt;br /&gt;
By sequencing control signals in various combinations, any computation can be achieved.&lt;br /&gt;
&lt;br /&gt;
Each transfer of information inside the computer requires one &#039;&#039;read&#039;&#039; signal and one &#039;&#039;write&#039;&#039; signal.  &lt;br /&gt;
For example, transferring information from one [[Register]] to another involves first activating the read signal on the source register, then the write signal on the destination register.  &lt;br /&gt;
The control unit is responsible for generating these signals in the correct order.&lt;br /&gt;
&lt;br /&gt;
More elaborate control sequences, such as performing operations on data or displaying results on a [[Display]], are similarly coordinated by the control unit.&lt;br /&gt;
&lt;br /&gt;
A control unit can adjusts its sequence of control signals based on different input conditions.  &lt;br /&gt;
These inputs typically originate from other components such as the [[Instruction Register]], [[Status Register]], or various system flags.  &lt;br /&gt;
By interpreting these inputs, the control unit can &amp;quot;execute an instruction&amp;quot; - dynamically altering its control signal sequence according to the contents of the instruction register.&lt;br /&gt;
&lt;br /&gt;
The control unit may also update the instruction register by fetching new data from memory.  &lt;br /&gt;
This operation, known as an &#039;&#039;instruction fetch&#039;&#039;, is part of the core fetch → decode → execute cycle present in virtually all computer architectures.  &lt;br /&gt;
The overall timing of these operations is usually governed by a [[Clock]].&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Pipeline Computers ===&lt;br /&gt;
In [[Pipeline Computer]] architectures, control signals are often generated using a series of shift registers.  &lt;br /&gt;
Each register passes its state to the next on the [[Edge Detection|rising edge]] of the clock.  &lt;br /&gt;
Each stage of the pipeline corresponds to one register and produces its control signals through devices such as [[Decoder]]s, [[Lookup Table]]s, [[Programmable Logic Array|PLAs]], or [[ROM]]s.  &lt;br /&gt;
As new states are shifted through the pipeline, each stage updates its control signals accordingly.&lt;br /&gt;
&lt;br /&gt;
=== Sequential Computers ===&lt;br /&gt;
For non-pipelined (sequential) computers, control logic is generally more complex.  &lt;br /&gt;
While a simple design can use a [[Counter]] and a [[ROM]] to step through predefined control sequences, systems that require conditional branching or loops typically implement their control unit as a [[Finite State Machine]] (FSM).  &lt;br /&gt;
This approach allows for flexible control flow and dynamic sequencing based on internal and external conditions.&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Clock&amp;diff=762</id>
		<title>Clock</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Clock&amp;diff=762"/>
		<updated>2025-10-07T18:21:23Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: fixed some wording and added diagrams&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;Clock&#039;&#039;&#039; is a [[circuit]] that changes its output state periodically over time.&lt;br /&gt;
&lt;br /&gt;
The simplest clock is made of a single [[Inverter]] connected to itself, either directly or with a delay.  &lt;br /&gt;
A single inverter clock alternates {{on}} and {{off}} every [[tick]].  &lt;br /&gt;
With [[Delayer|delayer]] components, it will have a longer period.&lt;br /&gt;
&lt;br /&gt;
== Terminology ==&lt;br /&gt;
:&#039;&#039;&#039;Period&#039;&#039;&#039; is the duration of the entire cycle of the clock, measured in ticks. It includes the duration of the {{on}} output and the {{off}} output.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Duration&#039;&#039;&#039; of a signal is the number of ticks the signal remains unchanged.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Frequency&#039;&#039;&#039; is the rate at which the clock repeats its cycle. It shows how many full cycles (periods) occur per unit of time.  &lt;br /&gt;
&lt;br /&gt;
==== Measuring frequency ====&lt;br /&gt;
In &#039;&#039;Logic World&#039;&#039;, the simulation runs at a adjustable &#039;&#039;[[Tick|Tick Rate]]&#039;&#039; (number of ticks per second).  &lt;br /&gt;
Since period is measured in ticks, the real-time frequency can be calculated as:&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;math&amp;gt;f_{Hz} = \frac{\text{Tick Rate}}{\text{Period}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, with a tick rate of 60 and a clock period of 12 ticks:&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;math&amp;gt;f_{Hz} = \frac{60}{12} = 5\ \text{Hz}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Increasing the tick rate or reducing the clock period increases frequency.&lt;br /&gt;
&lt;br /&gt;
==== Measuring delays ====&lt;br /&gt;
With delay components, the duration of a signal is calculated as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;duration = delay + 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The full period will be:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;2 \times (delay + 1)&amp;lt;/math&amp;gt;&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[File:Not-clock.png|thumb|left|alt=Not-clock|A single inverter]]&lt;br /&gt;
|&lt;br /&gt;
[[File:Delayer-clock.png|thumb|right|alt=Not-Clock|An inverter with a delayer, this example has a period of 22 ticks]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In advanced circuits or during construction you may require clocks with different periods, signal shapes, and functionality. Good clocks are essential in complex designs.&lt;br /&gt;
&lt;br /&gt;
== Clock signal diagrams ==&lt;br /&gt;
Below are examples of different clock signals patterns for better understanding:&lt;br /&gt;
&lt;br /&gt;
{{Binary signal&lt;br /&gt;
| signals=Alternating, Square, Pulsating, Complex&lt;br /&gt;
| signal1=101010101010101010&lt;br /&gt;
| signal2=111100001111000011&lt;br /&gt;
| signal3=100010001000100010&lt;br /&gt;
| signal4=110000110000110000&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Construction ==&lt;br /&gt;
This article is mostly agnostic towards the period of the clock. This means you may add different features that will work regardless of the period.&lt;br /&gt;
&lt;br /&gt;
To make a good clock you need to know what functionality you require. Here is a list of possible features you may want:&lt;br /&gt;
#Turning on/off&lt;br /&gt;
#Manually adjustable period&lt;br /&gt;
#Digitally adjustable period&lt;br /&gt;
#Specific signal shape&lt;br /&gt;
&lt;br /&gt;
This article will show how to add features to a clock, starting from the simplest to the most advanced.&lt;br /&gt;
&lt;br /&gt;
=== Turning on/off ===&lt;br /&gt;
[[File:Clock-off.png|thumb|right|alt=Clock turned off by a switch|Clock turned off by a switch]]&lt;br /&gt;
Any clock has an inverter, therefore it can always be turned off by applying an {{on}} signal to it.  &lt;br /&gt;
It is good practice to add a switch to every clock.  &lt;br /&gt;
If you want to use [[Button|buttons]] to turn the clock on/off, you can add a [[T Flip-Flop]], a [[Set-Reset Flip-Flop]], or similar components.&lt;br /&gt;
&lt;br /&gt;
=== Adjustable period ===&lt;br /&gt;
[[File:Adjust-delayer.png|thumb|right|alt=Delayer can be adjusted, up to 30 ticks.|Delayer can be adjusted, up to 30 ticks.]]&lt;br /&gt;
&lt;br /&gt;
You can adjust the period either manually or digitally.  &lt;br /&gt;
If you are using a [[delayer]], you can [[editing|edit]] its delay up to 30 [[tick|ticks]]. Remember that with the inverter, the total duration will be 1 tick longer.  &lt;br /&gt;
For periods longer than 30 ticks, connect several delayers in series.&lt;br /&gt;
&lt;br /&gt;
Another approach is to build multiple clocks with different periods and enable one of them.  &lt;br /&gt;
This method also allows digital or programmatic period control by selecting the clock with the required period, usually with a [[multiplexer]].&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Signal shape ===&lt;br /&gt;
Simple clock will have a &amp;quot;square wave&amp;quot; signal, where output is alternating between {{on}} and {{off}} with an equal duration. Quite often you will need a clock with a long period but producing a 1 tick pulse each cycle.  &lt;br /&gt;
It is possible to achieve this by building a loop with multiple buffers and passing a 1-tick signal through it, but it will quickly become impractical.&amp;lt;br&amp;gt;&lt;br /&gt;
A more efficient way is to attach a separate [[pulse generator]] to a normal clock. It will work with any clock configuration.&amp;lt;br&amp;gt;&lt;br /&gt;
For long periods and long pulses, you can use the following design: clock → pulse generator → signal extender.&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;Multitool&amp;quot; clock example ==&lt;br /&gt;
[[File:Mutliclock.png|frameless|right|alt=Multiclock with all the features|Multiclock with all the features]]&lt;br /&gt;
It is a good idea to construct a small but efficient clock for general use. The example on the right screenshot combines all key features: a power switch, adjustable period, and pulse output. It&#039;s a good idea to have it saved as a [[subassembly]].&lt;br /&gt;
The total period here is 8 ticks, and you can see the signal shape on the next screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:Oscilloscope.png|none|center|alt=Oscilloscope showing the shape of the signal|Oscilloscope showing the shape of the signal]]&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Edge_Detection&amp;diff=761</id>
		<title>Edge Detection</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Edge_Detection&amp;diff=761"/>
		<updated>2025-10-07T18:03:09Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: /* Circuit Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Edge detection&#039;&#039;&#039; is the process of sending a signal at the moment a signal transitions.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;rising edge&#039;&#039;&#039; refers to the instant when a signal changes from &#039;&#039;off&#039;&#039; to &#039;&#039;on&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;falling edge&#039;&#039;&#039; refers to the instant when a signal changes from &#039;&#039;on&#039;&#039; to &#039;&#039;off&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Construction ==&lt;br /&gt;
[[File:Raising-edge-detector.png|thumb|right|alt=Raising edge detector|Raising edge detector]]&lt;br /&gt;
You can detect a rising edge by checking whether the input signal was &#039;&#039;off&#039;&#039; some number of [[Tick|ticks]] ago but is now &#039;&#039;on&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This can be done using an [[AND Gate]] and an [[Inverter]].  &lt;br /&gt;
Connect one input of the AND gate directly to your signal, and connect the other input through the inverter.&lt;br /&gt;
&lt;br /&gt;
When the input signal turns on, the direct input to the AND gate is immediately on. The inverter output, however, is delayed by 1 tick, so it remains &#039;&#039;on&#039;&#039; for one more tick.  &lt;br /&gt;
Since both inputs of the AND gate are &#039;&#039;on&#039;&#039;, it becomes marked for activation in the next tick.&lt;br /&gt;
&lt;br /&gt;
On the next tick, the AND gate turns &#039;&#039;on&#039;&#039; while the inverter output turns &#039;&#039;off&#039;&#039;. At this point, not all AND gate inputs are &#039;&#039;on&#039;&#039;, so it will be marked to turn &#039;&#039;off&#039;&#039; on the following tick.&lt;br /&gt;
&lt;br /&gt;
The pulse length is determined by the delay between the direct and inverted inputs of the AND gate.  &lt;br /&gt;
You can extend the pulse to 2 ticks using a [[Buffer]], or make it 2 ticks or longer with a [[Delayer]].&lt;br /&gt;
&lt;br /&gt;
== Example Signal Diagram ==&lt;br /&gt;
Below is an example timing diagram showing how a rising edge detector behaves:&lt;br /&gt;
* &#039;&#039;&#039;Input&#039;&#039;&#039; shows the original signal toggling between off and on.&lt;br /&gt;
* &#039;&#039;&#039;Output&#039;&#039;&#039; is the short pulse generated on each rising edge of the input signal.&lt;br /&gt;
&lt;br /&gt;
{{Binary signal&lt;br /&gt;
| signals=Input, Output&lt;br /&gt;
| signal1=000011110000111&lt;br /&gt;
| signal2=000010000000100&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
How it looks in the Logic World:&lt;br /&gt;
[[File:edge-oscillator.png|frame|center|alt=oscilloscope|Raising Edge on oscilloscope ]]&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Edge_Detection&amp;diff=760</id>
		<title>Edge Detection</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Edge_Detection&amp;diff=760"/>
		<updated>2025-10-07T18:02:13Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: improved formatting and did todo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Edge detection&#039;&#039;&#039; is the process of sending a signal at the moment a signal transitions.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;rising edge&#039;&#039;&#039; refers to the instant when a signal changes from &#039;&#039;off&#039;&#039; to &#039;&#039;on&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;falling edge&#039;&#039;&#039; refers to the instant when a signal changes from &#039;&#039;on&#039;&#039; to &#039;&#039;off&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Circuit Implementation ==&lt;br /&gt;
[[File:Raising-edge-detector.png|thumb|right|alt=Raising edge detector|Raising edge detector]]&lt;br /&gt;
You can detect a rising edge by checking whether the input signal was &#039;&#039;off&#039;&#039; some number of [[Tick|ticks]] ago but is now &#039;&#039;on&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This can be done using an [[AND Gate]] and an [[Inverter]].  &lt;br /&gt;
Connect one input of the AND gate directly to your signal, and connect the other input through the inverter.&lt;br /&gt;
&lt;br /&gt;
When the input signal turns on, the direct input to the AND gate is immediately on. The inverter output, however, is delayed by 1 tick, so it remains &#039;&#039;on&#039;&#039; for one more tick.  &lt;br /&gt;
Since both inputs of the AND gate are &#039;&#039;on&#039;&#039;, it becomes marked for activation in the next tick.&lt;br /&gt;
&lt;br /&gt;
On the next tick, the AND gate turns &#039;&#039;on&#039;&#039; while the inverter output turns &#039;&#039;off&#039;&#039;. At this point, not all AND gate inputs are &#039;&#039;on&#039;&#039;, so it will be marked to turn &#039;&#039;off&#039;&#039; on the following tick.&lt;br /&gt;
&lt;br /&gt;
The pulse length is determined by the delay between the direct and inverted inputs of the AND gate.  &lt;br /&gt;
You can extend the pulse to 2 ticks using a [[Buffer]], or make it 2 ticks or longer with a [[Delayer]].&lt;br /&gt;
&lt;br /&gt;
== Example Signal Diagram ==&lt;br /&gt;
Below is an example timing diagram showing how a rising edge detector behaves:&lt;br /&gt;
* &#039;&#039;&#039;Input&#039;&#039;&#039; shows the original signal toggling between off and on.&lt;br /&gt;
* &#039;&#039;&#039;Output&#039;&#039;&#039; is the short pulse generated on each rising edge of the input signal.&lt;br /&gt;
&lt;br /&gt;
{{Binary signal&lt;br /&gt;
| signals=Input, Output&lt;br /&gt;
| signal1=000011110000111&lt;br /&gt;
| signal2=000010000000100&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
How it looks in the Logic World:&lt;br /&gt;
[[File:edge-oscillator.png|frame|center|alt=oscilloscope|Raising Edge on oscilloscope ]]&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=File:Edge-oscillator.png&amp;diff=759</id>
		<title>File:Edge-oscillator.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=File:Edge-oscillator.png&amp;diff=759"/>
		<updated>2025-10-07T18:00:57Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Edge-oscillator&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=File:Raising-edge-detector.png&amp;diff=758</id>
		<title>File:Raising-edge-detector.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=File:Raising-edge-detector.png&amp;diff=758"/>
		<updated>2025-10-07T17:58:24Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Raising edge detector&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Finite_State_Machine&amp;diff=757</id>
		<title>Finite State Machine</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Finite_State_Machine&amp;diff=757"/>
		<updated>2025-10-07T17:48:31Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: improved formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; &#039;&#039;&#039;Finite State Machine&#039;&#039;&#039;&lt;br /&gt;
: In &#039;&#039;Logic World&#039;&#039;, a &#039;&#039;&#039;Finite State Machine&#039;&#039;&#039; (&#039;&#039;&#039;FSM&#039;&#039;&#039;) is a circuit that produces a sequence of states and output signals depending on input conditions and a defined state graph.&lt;br /&gt;
&lt;br /&gt;
== Construction ==&lt;br /&gt;
An FSM is constructed using either a [[ROM]] or a [[Programmable Logic Array]] (PLA), with some or all of the component’s outputs connected back to its inputs through a [[Register]].  &lt;br /&gt;
The register stores the current state, while the ROM or PLA defines the transition logic that determines the next state.&lt;br /&gt;
&lt;br /&gt;
This structure allows the circuit to map one list of states to another.  &lt;br /&gt;
For example, if you define transitions &amp;lt;code&amp;gt;1 → 2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;2 → 3&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;3 → 5&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;5 → 8&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;8 → 13&amp;lt;/code&amp;gt;, then each register pulse will produce the sequence &amp;lt;code&amp;gt;1, 2, 3, 5, 8, 13&amp;lt;/code&amp;gt;.  &lt;br /&gt;
When you add a transition &amp;lt;code&amp;gt;13 → 1&amp;lt;/code&amp;gt;, the graph becomes cyclic and the sequence repeats indefinitely.&lt;br /&gt;
&lt;br /&gt;
== Conditional Transitions ==&lt;br /&gt;
FSMs can use extra inputs as flags to control conditional branching.  &lt;br /&gt;
For example, you could map &amp;lt;code&amp;gt;3 → 5&amp;lt;/code&amp;gt; if input &amp;lt;code&amp;gt;fib&amp;lt;/code&amp;gt; is {{on}}, and &amp;lt;code&amp;gt;3 → 4&amp;lt;/code&amp;gt; if &amp;lt;code&amp;gt;fib&amp;lt;/code&amp;gt; is {{off}}.&lt;br /&gt;
&lt;br /&gt;
{{Todo|Add details for how this condition check is actually implemented}}  &lt;br /&gt;
{{Todo|Describe how multiple condition checks in the same state are handled}}&lt;br /&gt;
&lt;br /&gt;
If an input should be ignored in a ROM-based FSM, you must duplicate the same state mapping twice—once for the input being {{on}} and once for {{off}}—so that the transition occurs regardless of input state.  &lt;br /&gt;
In contrast, if you use a PLA, you can simply leave the unused input unconnected.&lt;br /&gt;
&lt;br /&gt;
== Output Generation ==&lt;br /&gt;
A state machine can also produce output signals in each state.&lt;br /&gt;
&lt;br /&gt;
This can be done by connecting a [[Lookup Table]] to the register’s output and assigning each valid state a corresponding output pattern.  &lt;br /&gt;
Such a configuration is known as a &#039;&#039;&#039;[[wikipedia:Moore_machine|Moore machine]]&#039;&#039;&#039;, where outputs depend solely on the current state.&lt;br /&gt;
&lt;br /&gt;
Alternatively, outputs can depend on both the current state and the inputs by synchronizing them with another register.  &lt;br /&gt;
This allows the FSM to select a new output combination during state transitions.  &lt;br /&gt;
Such a setup is known as a &#039;&#039;&#039;[[wikipedia:Mealy_machine|Mealy machine]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{{Todo|Describe the advantages each machine has}}&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Programmable_Logic_Array&amp;diff=756</id>
		<title>Programmable Logic Array</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Programmable_Logic_Array&amp;diff=756"/>
		<updated>2025-10-07T17:41:49Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: better formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; &#039;&#039;&#039;Programmable Logic Array&#039;&#039;&#039;&lt;br /&gt;
: A &#039;&#039;&#039;Programmable Logic Array&#039;&#039;&#039; (&#039;&#039;&#039;PLA&#039;&#039;&#039;) is a combinational logic component that allows encoding of any Boolean expression into a simple, repeating circuit, provided that the expression is rearranged into a [[wikipedia:Disjunctive_normal_form|sum-of-products]] form.&lt;br /&gt;
&lt;br /&gt;
{{Todo|Add a basic PLA example and explain its function.}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Lookup_Table|Lookup table]]&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Programmable_Logic_Array&amp;diff=755</id>
		<title>Programmable Logic Array</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Programmable_Logic_Array&amp;diff=755"/>
		<updated>2025-10-06T15:00:08Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A Programmable Logic Array, or PLA, is a combination logic component that allows you to encode any boolean expression into a simple, repeating circuit, provided the boolean expression is rearranged as a [[wikipedia:Disjunctive_normal_form|sum-of-products]] form. &lt;br /&gt;
&lt;br /&gt;
{{Todo|Add a basic PLA example, explain what it&#039;s doing}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
[[Lookup_Table|Lookup table]]&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Register&amp;diff=747</id>
		<title>Register</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Register&amp;diff=747"/>
		<updated>2025-10-04T21:26:19Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: Created article about registers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Register}}&lt;br /&gt;
  &lt;br /&gt;
It is one of the most basic memory circuits in &#039;&#039;Logic World&#039;&#039; and serves as a building block for [[Random-access_memory|RAM]], [[CPU]]s, and many other digital systems.  &lt;br /&gt;
Sometimes registers are called cells.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
A register can store data and output it later on demand.  &lt;br /&gt;
Each register has the following connections:&lt;br /&gt;
# Data input&lt;br /&gt;
# Write signal&lt;br /&gt;
# Read signal  &lt;br /&gt;
And the output:&lt;br /&gt;
# Data output&lt;br /&gt;
&lt;br /&gt;
[[File:Register-basic.png|thumb|right|alt=Basic 8-bit register|Basic 8-bit register using D Latches]]&lt;br /&gt;
Registers are often used to hold intermediate results, counters, addresses, or any temporary data in larger circuits.  &lt;br /&gt;
In some cases, the data inside the register is treated as multiple values.  &lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variants ==&lt;br /&gt;
Simple registers read or write all bits simultaneously.  &lt;br /&gt;
However, there are different variations that differ by design or purpose. Common variants include:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Shift register&#039;&#039;&#039; — supports shifting bits inside on command. Variations include shifting to the left, right, or both. Shifting can be rotational or non-rotational.&lt;br /&gt;
* &#039;&#039;&#039;Parallel-in serial-out (PISO)&#039;&#039;&#039; — bits are stored all at once, but read serially, bit by bit.&lt;br /&gt;
* &#039;&#039;&#039;Serial-in parallel-out (SIPO)&#039;&#039;&#039; — bits are stored one by one, but read all at once.&lt;br /&gt;
* &#039;&#039;&#039;Serial-in serial-out (SISO)&#039;&#039;&#039; — bits are stored one by one and read serially, bit by bit.&lt;br /&gt;
&lt;br /&gt;
== Construction ==&lt;br /&gt;
Registers are built using trigger or latch components. There are many variants, and any of them can be used to construct a register.  &lt;br /&gt;
The simplest option is the [[D_Latch|D Latch]]. A register that stores multiple bits using D Latches is constructed by placing a row of D Latches and connecting all storage and read circuits together. The example is shown in the first screenshot above.  &lt;br /&gt;
Serial variations are constructed by connecting D Latches to each other in series instead of in parallel.&lt;br /&gt;
&lt;br /&gt;
=== Write operation ===&lt;br /&gt;
When the write input is active, the register copies its data input into its internal storage. The value remains stored even if the write signal is turned {{off}}.&lt;br /&gt;
&lt;br /&gt;
=== Read operation ===&lt;br /&gt;
[[File:register-RW.png|thumb|right|alt=8-bit register|An 8-bit register with read/write controls]]&lt;br /&gt;
All memory elements have the stored bit always active, so for better control over reading, especially when many registers share the same data bus, you may need to add an additional part to actually send the stored data. This is done by attaching outputs to [[AND_Gate|AND gates]] or [[relay|relays]].  &lt;br /&gt;
In serial-out variations, only the last one element is the output.  &lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example usage ==&lt;br /&gt;
&lt;br /&gt;
Registers are essential in circuits that need to remember or reuse values:&lt;br /&gt;
* Holding the current instruction in a [[CPU]]&lt;br /&gt;
* Holding bit flags&lt;br /&gt;
* Sending or receiving data over distance&lt;br /&gt;
* Storing a loop counter  &lt;br /&gt;
* Acting as temporary memory, like a [[cache]] for [[RAM]]    &lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Random-access_memory|RAM]]&lt;br /&gt;
* [[Trigger]]&lt;br /&gt;
* [[Flip Flop]]&lt;br /&gt;
* [[Latch]]&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=File:Register-RW.png&amp;diff=746</id>
		<title>File:Register-RW.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=File:Register-RW.png&amp;diff=746"/>
		<updated>2025-10-04T21:16:19Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;register-RW&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=File:Register-basic.png&amp;diff=745</id>
		<title>File:Register-basic.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=File:Register-basic.png&amp;diff=745"/>
		<updated>2025-10-04T20:54:19Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Register-basic&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Template:Register&amp;diff=744</id>
		<title>Template:Register</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Template:Register&amp;diff=744"/>
		<updated>2025-10-04T20:47:08Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; &#039;&#039;&#039;Register&#039;&#039;&#039;&lt;br /&gt;
:In &#039;&#039;Logic World&#039;&#039;, a &#039;&#039;&#039;register&#039;&#039;&#039; is a small [[circuit]] used to store certain number of bits as a single value.&lt;br /&gt;
:Unlike [[Random-access_memory|RAM]], it doesn&#039;t have multiple independent cells.&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Template:Register&amp;diff=743</id>
		<title>Template:Register</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Template:Register&amp;diff=743"/>
		<updated>2025-10-04T20:29:35Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: Created template for a register&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; &#039;&#039;&#039;Register&#039;&#039;&#039;&lt;br /&gt;
:In &#039;&#039;Logic World&#039;&#039;, a &#039;&#039;&#039;register&#039;&#039;&#039; is a small [[circuit]] used to store one value.&lt;br /&gt;
:Unlike [[Random-access_memory|RAM]], it doesn&#039;t have multiple independent cells.&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Clock&amp;diff=742</id>
		<title>Clock</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Clock&amp;diff=742"/>
		<updated>2025-10-04T20:16:54Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: added more details&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;Clock&#039;&#039;&#039; is a [[circuit]] that changes its output state periodically over time.&lt;br /&gt;
&lt;br /&gt;
The simplest clock is made of a single [[Inverter]] connected to itself, either directly or with a delay.  &lt;br /&gt;
A single inverter clock alternates {{on}} and {{off}} every [[tick]].  &lt;br /&gt;
With [[Delayer|delayer]] components, it will have a longer period.&lt;br /&gt;
&lt;br /&gt;
== Terminology ==&lt;br /&gt;
:&#039;&#039;&#039;Period&#039;&#039;&#039; is the duration of the entire cycle of the clock, measured in ticks. It includes the duration of the {{on}} output and the {{off}} output.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Duration&#039;&#039;&#039; of a signal is the number of ticks the signal remains unchanged.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Frequency&#039;&#039;&#039; is the rate at which the clock repeats its cycle. It shows how many full cycles (periods) occur per unit of time.  &lt;br /&gt;
&lt;br /&gt;
==== Measuring frequency ====&lt;br /&gt;
In &#039;&#039;Logic World&#039;&#039;, the simulation runs at a adjustable &#039;&#039;Tick Rate&#039;&#039; (number of ticks per second).  &lt;br /&gt;
Since period is measured in ticks, the real-time frequency can be calculated as:&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;math&amp;gt;f_{Hz} = \frac{\text{Tick Rate}}{\text{Period}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, with a tick rate of 60 and a clock period of 12 ticks:&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;math&amp;gt;f_{Hz} = \frac{60}{12} = 5\ \text{Hz}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Increasing the tick rate or reducing the clock period increases frequency.&lt;br /&gt;
&lt;br /&gt;
==== Measuring delays ====&lt;br /&gt;
With delay components, the duration of a signal is calculated as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;duration = delay + 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The full period will be:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;2 \times (delay + 1)&amp;lt;/math&amp;gt;&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[File:Not-clock.png|thumb|left|alt=Not-clock|A single inverter]]&lt;br /&gt;
|&lt;br /&gt;
[[File:Delayer-clock.png|thumb|right|alt=Not-Clock|An inverter with a delayer, this example has a period of 22 ticks]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In advanced circuits or during construction you may require clocks with different periods, signal shapes, and functionality. Good clocks are essential in complex designs.&lt;br /&gt;
&lt;br /&gt;
== Construction ==&lt;br /&gt;
&lt;br /&gt;
This article is mostly agnostic towards the period of the clock. This means you may add different features that will work regardless of the period.&lt;br /&gt;
&lt;br /&gt;
To make a good clock you need to know what functionality you require. Here is a list of possible features you may want:&lt;br /&gt;
#Turning on/off&lt;br /&gt;
#Manually adjustable period&lt;br /&gt;
#Digitally adjustable period&lt;br /&gt;
#Specific signal shape&lt;br /&gt;
&lt;br /&gt;
This article will show how to add features to a clock, starting from the simplest to the most advanced.&lt;br /&gt;
&lt;br /&gt;
=== Turning on/off ===&lt;br /&gt;
[[File:Clock-off.png|thumb|right|alt=Clock is turned off by the switch|Clock is turned off by the switch]]&lt;br /&gt;
Any clock has an inverter, therefore it can always be turned off with an {{on}} signal applied to it.  &lt;br /&gt;
It&#039;s good practice to add a switch to all clocks.  &lt;br /&gt;
You can also use buttons to turn on/off the clock. With 1 button you will need a [[T Flip Flop]]. With 2 buttons you can use a [[Set Reset Trigger]].&lt;br /&gt;
&lt;br /&gt;
=== Adjustable period ===&lt;br /&gt;
You can adjust the period either manually or digitally.&lt;br /&gt;
&lt;br /&gt;
[[File:Adjust-delayer.png|thumb|right|alt=Delayer can be adjusted, up to 30 ticks.|Delayer can be adjusted, up to 30 ticks.]]&lt;br /&gt;
If you are using a [[delayer]] you can [[editing|edit]] its delay up to 30 [[tick|ticks]]. Remember that with the inverter, the total duration will be 1 tick longer.  &lt;br /&gt;
For more than 30 ticks, you will need to connect several delayers one after another.&lt;br /&gt;
&lt;br /&gt;
Another approach is to build several clocks with different periods and enable one of them.  &lt;br /&gt;
With this approach you can also control the period digitally or programmatically, by selecting the clock with the required period, usually by a [[multiplexer]].&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Signal shape ===&lt;br /&gt;
Simple clock will have a &amp;quot;square wave&amp;quot; signal, where output is alternating between {{on}} and {{off}} with an equal duration. Quite often you will need a clock with a long period but producing a 1 tick pulse each cycle.  &lt;br /&gt;
It is possible to achieve this by building a loop with multiple buffers and passing a 1-tick signal through it, but it will quickly become impractical.&amp;lt;br&amp;gt;&lt;br /&gt;
A more efficient way is to attach a separate [[pulse generator]] to a normal clock. It will work with any clock configuration.&amp;lt;br&amp;gt;&lt;br /&gt;
For long periods and long pulses, you can use the following design: clock → pulse generator → signal extender.&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;Multitool&amp;quot; clock example ==&lt;br /&gt;
[[File:Mutliclock.png|frameless|right|alt=Multiclock with all the features|Multiclock with all the features]]&lt;br /&gt;
It is a good idea to construct a small but efficient clock for general use. The example on the right screenshot combines all key features: a power switch, adjustable period, and pulse output. It&#039;s a good idea to have it saved as a [[subassembly]].&lt;br /&gt;
The total period here is 8 ticks, and you can see the signal shape on the next screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:Oscilloscope.png|none|center|alt=Oscilloscope showing the shape of the signal|Oscilloscope showing the shape of the signal]]&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Clock&amp;diff=741</id>
		<title>Clock</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Clock&amp;diff=741"/>
		<updated>2025-10-02T22:32:20Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: Completed the article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;Clock&#039;&#039;&#039; is a [[circuit]] that changes its output state periodically over time.&lt;br /&gt;
&lt;br /&gt;
The simplest clock is made of a single [[Inverter]] connected to itself, either directly or with a delay.  &lt;br /&gt;
A single inverter clock alternates {{on}} and {{off}} every [[tick]].  &lt;br /&gt;
With [[Delayer|delayer]] components, it will have a longer period.&lt;br /&gt;
&lt;br /&gt;
== Terminology ==&lt;br /&gt;
:&#039;&#039;&#039;Period&#039;&#039;&#039; is the duration of the entire cycle of the clock, measured in ticks. It includes the duration of the {{on}} output and the {{off}} output.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Duration&#039;&#039;&#039; of a signal is the number of ticks the signal remains unchanged.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With delay components the duration of a signal is calculated as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;duration = delay + 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The full period will be:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;2 \times (delay + 1)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[File:Not-clock.png|thumb|left|alt=Not-clock|A single inverter]]&lt;br /&gt;
|&lt;br /&gt;
[[File:Delayer-clock.png|thumb|right|alt=Not-Clock|An inverter with a delayer, this example has a period of 22 ticks]]&lt;br /&gt;
|}&lt;br /&gt;
In advanced circuits or during construction you may require clocks with different periods, signal shapes, and functionality. Good clocks are essential in complex designs.&lt;br /&gt;
&lt;br /&gt;
== Construction ==&lt;br /&gt;
&lt;br /&gt;
This article is mostly agnostic towards the period of the clock. This means you may add different features that will work regardless of the period.&lt;br /&gt;
&lt;br /&gt;
To make a good clock you need to know what functionality you require. Here is a list of possible features you may want:&lt;br /&gt;
#Turning on/off&lt;br /&gt;
#Manually adjustable period&lt;br /&gt;
#Digitally adjustable period&lt;br /&gt;
#Specific signal shape&lt;br /&gt;
&lt;br /&gt;
This article will show how to add features to a clock, starting from the simplest to the most advanced.&lt;br /&gt;
&lt;br /&gt;
=== Turning on/off ===&lt;br /&gt;
[[File:Clock-off.png|thumb|right|alt=Clock is turned off by the switch|Clock is turned off by the switch]]&lt;br /&gt;
Any clock has an inverter, therefore it can always be turned off with an {{on}} signal applied to it.  &lt;br /&gt;
It&#039;s good practice to add a switch to all clocks.  &lt;br /&gt;
You can also use buttons to turn on/off the clock. With 1 button you will need a [[T Flip Flop]]. With 2 buttons you can use a [[Set Reset Trigger]].&lt;br /&gt;
&lt;br /&gt;
=== Adjustable period ===&lt;br /&gt;
You can adjust the period either manually or digitally.&lt;br /&gt;
&lt;br /&gt;
[[File:Adjust-delayer.png|thumb|right|alt=Delayer can be adjusted, up to 30 ticks.|Delayer can be adjusted, up to 30 ticks.]]&lt;br /&gt;
If you are using a [[delayer]] you can [[editing|edit]] its delay up to 30 [[tick|ticks]]. Remember that with the inverter, the total duration will be 1 tick longer.  &lt;br /&gt;
For more than 30 ticks, you will need to connect several delayers one after another.&lt;br /&gt;
&lt;br /&gt;
Another approach is to build several clocks with different periods and enable one of them.  &lt;br /&gt;
With this approach you can also control the period digitally or programmatically, by selecting the clock with the required period, usually with a [[multiplexer]].&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Signal shape ===&lt;br /&gt;
&lt;br /&gt;
Quite often you will need a clock with a long period, but produces 1 tick pulse each cycle.&lt;br /&gt;
It is possible to achieve this by building a loop with multiple buffers and passing a 1-tick signal through it, but it will quickly become impractical.&amp;lt;br&amp;gt;&lt;br /&gt;
A more efficient way is to attach a separate [[pulse generator]] to a normal clock. It will work with any clock configuration.&amp;lt;br&amp;gt;&lt;br /&gt;
For long periods and long pulses, you can use the following design: clock → pulse generator → signal extender.&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;Multitool&amp;quot; clock example ==&lt;br /&gt;
[[File:Mutliclock.png|frameless|right|alt=Multiclock with all the features|Multiclock with all the features]]&lt;br /&gt;
The total period here is 8 ticks, and you can see the signal shape on the next screenshot.  &lt;br /&gt;
It is a good idea to construct a small but efficient clock for general use.  &lt;br /&gt;
It should have everything described above. The screenshot below demonstrates an example. It has a turn-off switch, adjustable period, and a pulse output.&lt;br /&gt;
&lt;br /&gt;
[[File:Oscilloscope.png|none|center|alt=Oscilloscope showing the shape of the signal|Oscilloscope showing the shape of the signal]]&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=File:Oscilloscope.png&amp;diff=740</id>
		<title>File:Oscilloscope.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=File:Oscilloscope.png&amp;diff=740"/>
		<updated>2025-10-02T22:23:23Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Oscilloscope showing a shape of the signal&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=File:Mutliclock.png&amp;diff=739</id>
		<title>File:Mutliclock.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=File:Mutliclock.png&amp;diff=739"/>
		<updated>2025-10-02T22:21:24Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mutliclock with all the features&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Talk:Multiplexer&amp;diff=738</id>
		<title>Talk:Multiplexer</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Talk:Multiplexer&amp;diff=738"/>
		<updated>2025-10-02T22:04:05Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: /* A better example or diagram */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== A better example or diagram ==&lt;br /&gt;
&lt;br /&gt;
In the article the first diagram is not matching the circuit below. It will be confusing for inexperienced readers. Maybe they need to match or maybe it can demonstrate both cases - 1 bit and 4 bits [[User:DjSapsan|DjSapsan]] ([[User talk:DjSapsan|talk]]) 22:04, 2 October 2025 (UTC)&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Editing&amp;diff=737</id>
		<title>Editing</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Editing&amp;diff=737"/>
		<updated>2025-10-02T21:57:49Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: added the hotkey&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Editing&#039;&#039;&#039; is a [[building mechanic]] that lets you open a menu to change the properties of a [[component]].&lt;br /&gt;
It can be done by looking at the component and pressing {{keys|x}}, by default.&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Delayer&amp;diff=736</id>
		<title>Delayer</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Delayer&amp;diff=736"/>
		<updated>2025-10-02T21:54:58Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: Tweaks to the article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox component&lt;br /&gt;
| title       = Delayer&lt;br /&gt;
| id          = MHG.Delayer&lt;br /&gt;
| caption     = Delayer set to 10 ticks of delay&lt;br /&gt;
| configurable = 1&lt;br /&gt;
| io.minInputs        = 1&lt;br /&gt;
| io.maxInputs        = 1&lt;br /&gt;
| io.outputs          = 1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Delayer&#039;&#039;&#039; is a [[component]] used in [[digital logic]]. It propagates signals from its input to its output, similar to a [[Buffer]], but the signal takes more time to propagate, meaning it is delayed.&lt;br /&gt;
&lt;br /&gt;
Delayers are useful for building [[Clock|clock]] circuits.&lt;br /&gt;
&lt;br /&gt;
== Behavior ==&lt;br /&gt;
&lt;br /&gt;
The output of a Delayer reflects the state of the input with a delay.&amp;lt;br&amp;gt;&lt;br /&gt;
It will not change state if the new input state is shorter than the configured delay.&amp;lt;br&amp;gt;&lt;br /&gt;
The output duration is always at least as long as the delay setting.&lt;br /&gt;
&lt;br /&gt;
{{Truth table&lt;br /&gt;
| inputs=Input&lt;br /&gt;
| outputs=Output (after delay)&lt;br /&gt;
| caption=Delayer truth table&lt;br /&gt;
| 0 0&lt;br /&gt;
| 1 1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If a Delayer is outputting {{on}}, the input can be briefly turned {{off}} and the output will still remain {{on}}, unless the input is off for longer than the configured delay. This behavior can be useful for maintaining a state in certain circumstances.&lt;br /&gt;
&lt;br /&gt;
== Configurability ==&lt;br /&gt;
&lt;br /&gt;
The length of the delay can be configured by [[editing]] the component.  &lt;br /&gt;
* Default: 10 ticks  &lt;br /&gt;
* Minimum: 2 ticks  &lt;br /&gt;
* Maximum: 30 ticks  &lt;br /&gt;
&lt;br /&gt;
== Placement ==&lt;br /&gt;
&lt;br /&gt;
The Delayer can be placed in the center of a [[Circuit Board]] square or on top of a [[Mount]], and can be fine-rotated.&lt;br /&gt;
&lt;br /&gt;
== Tips ==&lt;br /&gt;
&lt;br /&gt;
* To delay for longer than 30 ticks, chain multiple Delayers together.  &lt;br /&gt;
* To delay for only 1 tick, use a [[Buffer]] instead.  &lt;br /&gt;
&lt;br /&gt;
{{Navbox components}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Vanilla components]]&lt;br /&gt;
[[Category:Circuitry components]]&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=File:Adjust-delayer.png&amp;diff=735</id>
		<title>File:Adjust-delayer.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=File:Adjust-delayer.png&amp;diff=735"/>
		<updated>2025-10-02T21:35:03Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Delayer can be adjusted&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=File:Clock-off.png&amp;diff=734</id>
		<title>File:Clock-off.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=File:Clock-off.png&amp;diff=734"/>
		<updated>2025-10-02T21:24:58Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Clock is turned off by the switch&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Clock&amp;diff=732</id>
		<title>Clock</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Clock&amp;diff=732"/>
		<updated>2025-09-27T15:41:36Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: Started working on the clock article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;Clock&#039;&#039;&#039; is a [[circuit]] that changes its output state periodically over time.&lt;br /&gt;
&lt;br /&gt;
The simplest clock is made of a single [[Inverter]] connected to itself, either directly or with a delay.  &lt;br /&gt;
A single inverter clock alternates {{on}} and {{off}} every [[tick]].  &lt;br /&gt;
With [[Delayer|delayer]] components it will have a longer period.&lt;br /&gt;
&lt;br /&gt;
== Terminology ==&lt;br /&gt;
:&#039;&#039;&#039;Period&#039;&#039;&#039; is the duration of the entire cycle of the clock, measured in ticks. It includes the duration of the {{on}} output and the {{off}} output.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Duration&#039;&#039;&#039; of a signal is the number of ticks the signal remains unchanged.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With delay components the duration of a signal is calculated as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;duration = delay + 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The full period will be&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;2 \times (delay + 1)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[File:Not-clock.png|thumb|left|alt=Not-clock|A single inverter]]&lt;br /&gt;
|&lt;br /&gt;
[[File:Delayer-clock.png|thumb|right|alt=Not-Clock|An inverter with a delayer]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In advanced circuits or during construction you may require clocks with different periods, signal shapes, and functionality. You should never underestimate the importance of good clocks.&lt;br /&gt;
&lt;br /&gt;
== Construction ==&lt;br /&gt;
&lt;br /&gt;
This article will be mostly agnostic towards the period of the clock. This means you may add different features that will work irrespective of the period.&lt;br /&gt;
&lt;br /&gt;
To make a good clock you need to know what functionality you require. Here is a list of possible features you may want:&lt;br /&gt;
#switching on/off&lt;br /&gt;
#manually adjustable period&lt;br /&gt;
#digitally adjustable period&lt;br /&gt;
#specific signal shape&lt;br /&gt;
&lt;br /&gt;
This article will show how to add features to a clock, starting from the simplest to the most advanced.&lt;br /&gt;
&lt;br /&gt;
=== Switching on/off ===&lt;br /&gt;
=== Adjustable period ===&lt;br /&gt;
=== Signal shape ===&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=File:Delayer-clock.png&amp;diff=731</id>
		<title>File:Delayer-clock.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=File:Delayer-clock.png&amp;diff=731"/>
		<updated>2025-09-27T15:16:18Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Delayer-clock&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Random-access_memory&amp;diff=730</id>
		<title>Random-access memory</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Random-access_memory&amp;diff=730"/>
		<updated>2025-09-27T14:57:32Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: removed stub&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RAM}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;RAM&#039;&#039;&#039; is composed of multiple cells that store data, accessed by an address.&amp;lt;br&amp;gt;&lt;br /&gt;
It has 4 inputs:&lt;br /&gt;
# Data input&lt;br /&gt;
# Address input&lt;br /&gt;
# Write signal&lt;br /&gt;
# Read signal  &lt;br /&gt;
And 1 output:&lt;br /&gt;
# Data output&lt;br /&gt;
&lt;br /&gt;
Each cell in RAM is essentially a [[register]].&lt;br /&gt;
&lt;br /&gt;
Building a RAM from scratch is one of the best ways to start learning logic and computers, as well as to get familiar with circuit construction in &#039;&#039;Logic World&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
RAMs can have very different designs, specifications, and can be [[Optimization|optimized]] for speed, size, or even aesthetics. RAM designs are usually specified by the following parameters:&lt;br /&gt;
# Address size&lt;br /&gt;
# Data size&lt;br /&gt;
# Delay during retrieving/storing data&lt;br /&gt;
# Speed between sequential operations&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Address and data size&#039;&#039;&#039; is determined by the number of bits. The total number of combinations using &#039;&#039;&#039;n&#039;&#039;&#039; bits is &amp;lt;math&amp;gt;2^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Delay&#039;&#039;&#039; during retrieving/storing data is the time between when the read/write signal is turned {{on}} and when the data is retrieved or stored for a single operation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Speed between sequential operations&#039;&#039;&#039; is how fast the RAM can run multiple sequential operations. The delay between multiple operations is always &amp;lt;math&amp;gt;\ge&amp;lt;/math&amp;gt; the delay for a single operation.&lt;br /&gt;
&lt;br /&gt;
This article will demonstrate a simple RAM with 4 bits for address and 8 bits for data.&lt;br /&gt;
&lt;br /&gt;
== Construction ==&lt;br /&gt;
&lt;br /&gt;
Before constructing a RAM circuit, you need to decide how many memory cells are required and how wide each cell should be.  &lt;br /&gt;
In the following example, there are 16 memory cells, each 8 bits wide.  &lt;br /&gt;
&lt;br /&gt;
Using the formula &amp;lt;math&amp;gt;b = \log_2(x)&amp;lt;/math&amp;gt;, you can see that to address 16 different memory cells, 4 bits are needed.  &lt;br /&gt;
It is possible to use a single [[decoder]] to select the address, but in this example two decoders are used to specify the row and the column of the memory matrix. This makes the structure easier to understand, and also results in decoders that are half the size.  &lt;br /&gt;
&lt;br /&gt;
[[File:2-decoders-ram.png|thumb|right|alt=Two 2-bit decoders placed orthogonal|Two 2-bit decoders placed orthogonal]]&lt;br /&gt;
On the screenshot, you can see the two decoders placed orthogonally. Above them is the 4-bit address input.  &lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ram-register.png|thumb|right|alt=A register for a cell|A register for a cell]]&lt;br /&gt;
For each cell, we use a simple 8-bit [[register]], shown in the next screenshot.  &lt;br /&gt;
It has one [[AND_Gate|AND]] gate to combine the row and column signals. This enables the register if it is at the selected intersection.  &lt;br /&gt;
It also has a separate signal for writing data and another for reading.  &lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ram-stage-2.png|thumb|right|alt=16 cells placed in a grid|16 cells placed in a grid]]&lt;br /&gt;
This register is copied 16 times and arranged into a 4×4 grid. The result is shown on the next screenshot.  &lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ram-stage-3.png|thumb|right|alt=Address and signal wires connected|Address and signal wires connected]]&lt;br /&gt;
The next step is connecting wires from the decoders to the cells, row by row and column by column.  &lt;br /&gt;
Wires are routed in 3D on top of the cells.  &lt;br /&gt;
Write and Read signals are also added. The new wiring is highlighted in yellow. The top-left cell (address 0) is selected, but it will not perform any operation unless a Write or Read signal is activated.  &lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last step is connecting the data inputs and outputs.  &lt;br /&gt;
The input is placed on the top, and all bits are connected to the corresponding inputs of every cell.  &lt;br /&gt;
The same is done for the output, which is placed on the bottom.  &lt;br /&gt;
&lt;br /&gt;
Note that the input and output bits are shared. This is not a problem as long as reading and writing are not performed at the same time.  &lt;br /&gt;
&lt;br /&gt;
The final screenshot shows the completed RAM circuit. It has 2 cells with stored data, and it is currently reading from the cell at address 6.  &lt;br /&gt;
&lt;br /&gt;
[[File:Ram-final.png|frame|center|alt=Completed RAM circuit, reading data|Completed RAM circuit, reading data]]&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Mods:CheeseUtilMod|CheeseUtilMod]] - a mod with RAM components&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=File:Not-clock.png&amp;diff=729</id>
		<title>File:Not-clock.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=File:Not-clock.png&amp;diff=729"/>
		<updated>2025-09-27T14:55:42Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Not-clock&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=CPU&amp;diff=722</id>
		<title>CPU</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=CPU&amp;diff=722"/>
		<updated>2025-09-14T15:43:21Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: CPU stub&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Random-access_memory&amp;diff=720</id>
		<title>Random-access memory</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Random-access_memory&amp;diff=720"/>
		<updated>2025-09-14T15:41:07Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: RAM construction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
{{RAM}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;RAM&#039;&#039;&#039; is composed of multiple cells that store data, accessed by an address.&amp;lt;br&amp;gt;&lt;br /&gt;
It has 4 inputs:&lt;br /&gt;
# Data input&lt;br /&gt;
# Address input&lt;br /&gt;
# Write signal&lt;br /&gt;
# Read signal  &lt;br /&gt;
And 1 output:&lt;br /&gt;
# Data output&lt;br /&gt;
&lt;br /&gt;
Each cell in RAM is essentially a [[register]].&lt;br /&gt;
&lt;br /&gt;
Building a RAM from scratch is one of the best ways to start learning logic and computers, as well as to get familiar with circuit construction in &#039;&#039;Logic World&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
RAMs can have very different designs, specifications, and can be [[Optimization|optimized]] for speed, size, or even aesthetics. RAM designs are usually specified by the following parameters:&lt;br /&gt;
# Address size&lt;br /&gt;
# Data size&lt;br /&gt;
# Delay during retrieving/storing data&lt;br /&gt;
# Speed between sequential operations&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Address and data size&#039;&#039;&#039; is determined by the number of bits. The total number of combinations using &#039;&#039;&#039;n&#039;&#039;&#039; bits is &amp;lt;math&amp;gt;2^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Delay&#039;&#039;&#039; during retrieving/storing data is the time between when the read/write signal is turned {{on}} and when the data is retrieved or stored for a single operation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Speed between sequential operations&#039;&#039;&#039; is how fast the RAM can run multiple sequential operations. The delay between multiple operations is always &amp;lt;math&amp;gt;\ge&amp;lt;/math&amp;gt; the delay for a single operation.&lt;br /&gt;
&lt;br /&gt;
This article will demonstrate a simple RAM with 4 bits for address and 8 bits for data.&lt;br /&gt;
&lt;br /&gt;
== Construction ==&lt;br /&gt;
&lt;br /&gt;
Before constructing a RAM circuit, you need to decide how many memory cells are required and how wide each cell should be.  &lt;br /&gt;
In the following example, there are 16 memory cells, each 8 bits wide.  &lt;br /&gt;
&lt;br /&gt;
Using the formula &amp;lt;math&amp;gt;b = \log_2(x)&amp;lt;/math&amp;gt;, you can see that to address 16 different memory cells, 4 bits are needed.  &lt;br /&gt;
It is possible to use a single [[decoder]] to select the address, but in this example two decoders are used to specify the row and the column of the memory matrix. This makes the structure easier to understand, and also results in decoders that are half the size.  &lt;br /&gt;
&lt;br /&gt;
[[File:2-decoders-ram.png|thumb|right|alt=Two 2-bit decoders placed orthogonal|Two 2-bit decoders placed orthogonal]]&lt;br /&gt;
On the screenshot, you can see the two decoders placed orthogonally. Above them is the 4-bit address input.  &lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ram-register.png|thumb|right|alt=A register for a cell|A register for a cell]]&lt;br /&gt;
For each cell, we use a simple 8-bit [[register]], shown in the next screenshot.  &lt;br /&gt;
It has one [[AND_Gate|AND]] gate to combine the row and column signals. This enables the register if it is at the selected intersection.  &lt;br /&gt;
It also has a separate signal for writing data and another for reading.  &lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ram-stage-2.png|thumb|right|alt=16 cells placed in a grid|16 cells placed in a grid]]&lt;br /&gt;
This register is copied 16 times and arranged into a 4×4 grid. The result is shown on the next screenshot.  &lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Ram-stage-3.png|thumb|right|alt=Address and signal wires connected|Address and signal wires connected]]&lt;br /&gt;
The next step is connecting wires from the decoders to the cells, row by row and column by column.  &lt;br /&gt;
Wires are routed in 3D on top of the cells.  &lt;br /&gt;
Write and Read signals are also added. The new wiring is highlighted in yellow. The top-left cell (address 0) is selected, but it will not perform any operation unless a Write or Read signal is activated.  &lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last step is connecting the data inputs and outputs.  &lt;br /&gt;
The input is placed on the top, and all bits are connected to the corresponding inputs of every cell.  &lt;br /&gt;
The same is done for the output, which is placed on the bottom.  &lt;br /&gt;
&lt;br /&gt;
Note that the input and output bits are shared. This is not a problem as long as reading and writing are not performed at the same time.  &lt;br /&gt;
&lt;br /&gt;
The final screenshot shows the completed RAM circuit. It has 2 cells with stored data, and it is currently reading from the cell at address 6.  &lt;br /&gt;
&lt;br /&gt;
[[File:Ram-final.png|frame|center|alt=Completed RAM circuit, reading data|Completed RAM circuit, reading data]]&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Mods:CheeseUtilMod|CheeseUtilMod]] - a mod with RAM components&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=File:Ram-final.png&amp;diff=719</id>
		<title>File:Ram-final.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=File:Ram-final.png&amp;diff=719"/>
		<updated>2025-09-14T15:29:54Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ram-final&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Random-access_memory&amp;diff=716</id>
		<title>Random-access memory</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Random-access_memory&amp;diff=716"/>
		<updated>2025-09-14T15:15:28Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: /* Construction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
{{RAM}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;RAM&#039;&#039;&#039; is composed of multiple cells that store data, accessed by an address.&amp;lt;br&amp;gt;&lt;br /&gt;
It has 4 inputs:&lt;br /&gt;
# Data input&lt;br /&gt;
# Address input&lt;br /&gt;
# Write signal&lt;br /&gt;
# Read signal  &lt;br /&gt;
And 1 output:&lt;br /&gt;
# Data output&lt;br /&gt;
&lt;br /&gt;
Each cell in RAM is essentially a [[register]].&lt;br /&gt;
&lt;br /&gt;
Building a RAM from scratch is one of the best ways to start learning logic and computers, as well as to get familiar with circuit construction in &#039;&#039;Logic World&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
RAMs can have very different designs, specifications, and can be [[Optimization|optimized]] for speed, size, or even aesthetics. RAM designs are usually specified by the following parameters:&lt;br /&gt;
# Address size&lt;br /&gt;
# Data size&lt;br /&gt;
# Delay during retrieving/storing data&lt;br /&gt;
# Speed between sequential operations&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Address and data size&#039;&#039;&#039; is determined by the number of bits. The total number of combinations using &#039;&#039;&#039;n&#039;&#039;&#039; bits is &amp;lt;math&amp;gt;2^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Delay&#039;&#039;&#039; during retrieving/storing data is the time between when the read/write signal is turned {{on}} and when the data is retrieved or stored for a single operation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Speed between sequential operations&#039;&#039;&#039; is how fast the RAM can run multiple sequential operations. The delay between multiple operations is always &amp;lt;math&amp;gt;\ge&amp;lt;/math&amp;gt; the delay for a single operation.&lt;br /&gt;
&lt;br /&gt;
This article will demonstrate a simple RAM with 4 bits for address and 8 bits for data.&lt;br /&gt;
&lt;br /&gt;
== Construction ==&lt;br /&gt;
&lt;br /&gt;
Before constructing a RAM circuit, you need to decide how many memory cells are required and how wide each cell should be.  &lt;br /&gt;
In the following example, there are 16 memory cells, each 8 bits wide.  &lt;br /&gt;
&lt;br /&gt;
Using the formula &amp;lt;math&amp;gt;b = \log_2(x)&amp;lt;/math&amp;gt;, you can see that to address 16 different memory cells, 4 bits are needed.  &lt;br /&gt;
It is possible to use a single [[decoder]] to select the address, but in this example two decoders are used to specify the row and the column of the memory matrix. This makes the structure easier to understand, and also results in decoders that are half the size.  &lt;br /&gt;
&lt;br /&gt;
On the screenshot, you can see the two decoders placed orthogonally. Above them is the 4-bit address input.  &lt;br /&gt;
[[File:2-decoders-ram.png|thumb|right|alt=Two 2-bit decoders placed orthogonal|Two 2-bit decoders placed orthogonal]]&lt;br /&gt;
&lt;br /&gt;
For each cell, we use a simple 8-bit [[register]], shown in the next screenshot.  &lt;br /&gt;
It has one [[AND]] gate to combine the row and column signals. This enables the register if it is at the selected intersection.  &lt;br /&gt;
It also has a separate signal for writing data and another for reading.  &lt;br /&gt;
[[File:Ram-register.png|thumb|right|alt=A register for a cell|A register for a cell]]&lt;br /&gt;
&lt;br /&gt;
This register is copied 16 times and arranged into a 4×4 grid. The result is shown on the next screenshot.  &lt;br /&gt;
[[File:Ram-stage-2.png|thumb|right|alt=16 cells placed in a grid|16 cells placed in a grid]]&lt;br /&gt;
&lt;br /&gt;
The next step is connecting wires from the decoders to the cells, row by row and column by column.  &lt;br /&gt;
Wires are routed in 3D on top of the cells.  &lt;br /&gt;
Write and Read signals are also added. The new wiring is highlighted in yellow. The top-left cell (address 0) is selected, but it will not perform any operation unless a Write or Read signal is activated.  &lt;br /&gt;
[[File:Ram-stage-3.png|thumb|right|alt=Address and signal wires connected|Address and signal wires connected]]&lt;br /&gt;
&lt;br /&gt;
The last step is connecting the data input and output.  &lt;br /&gt;
The input will be placed on the top, and all input bits must be connected to the corresponding inputs of every cell.  &lt;br /&gt;
The same is done for the output, except it will be placed on the bottom.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Mods:CheeseUtilMod|CheeseUtilMod]] - a mod with RAM components&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=File:Ram-stage-3.png&amp;diff=715</id>
		<title>File:Ram-stage-3.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=File:Ram-stage-3.png&amp;diff=715"/>
		<updated>2025-09-14T15:12:35Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ram-stage-3&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=File:Ram-stage-2.png&amp;diff=713</id>
		<title>File:Ram-stage-2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=File:Ram-stage-2.png&amp;diff=713"/>
		<updated>2025-09-14T14:52:03Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ram-stage-2&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=File:Ram-register.png&amp;diff=712</id>
		<title>File:Ram-register.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=File:Ram-register.png&amp;diff=712"/>
		<updated>2025-09-14T14:48:08Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ram-register&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=File:2-decoders-ram.png&amp;diff=711</id>
		<title>File:2-decoders-ram.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=File:2-decoders-ram.png&amp;diff=711"/>
		<updated>2025-09-14T14:41:55Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;2-decoders-ram&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Arithmetic_logic_unit&amp;diff=710</id>
		<title>Arithmetic logic unit</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Arithmetic_logic_unit&amp;diff=710"/>
		<updated>2025-09-14T14:23:01Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: Tweaks to the article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:ALU.gif|thumb|A symbolic representation of an ALU. The arrows represent inputs and outputs.]]&lt;br /&gt;
[[File:Alu-8-bit.png|thumb|An 8-bit ALU with inputs A, B, !A, !B, Carry, XOR, AND, OR.]]&lt;br /&gt;
&lt;br /&gt;
{{ALU}}&lt;br /&gt;
:It may be called the &amp;quot;brains&amp;quot; of the [[CPU|central processor]].  &lt;br /&gt;
An ALU also has &amp;quot;flags&amp;quot; to keep track of different situations during computation.  &lt;br /&gt;
Operations that an ALU can perform include arithmetic operations such as addition and subtraction, as well as &#039;&#039;bitwise&#039;&#039; operations like XOR, NOR, AND, and OR.  &lt;br /&gt;
&lt;br /&gt;
The status flags it keeps track of are, for example:&lt;br /&gt;
* &#039;&#039;A = B&#039;&#039;&lt;br /&gt;
* &#039;&#039;A &amp;gt; B&#039;&#039;&lt;br /&gt;
* &#039;&#039;A &amp;lt; B&#039;&#039;&lt;br /&gt;
* Carry&lt;br /&gt;
* Others&lt;br /&gt;
&lt;br /&gt;
ALUs can have very different designs with varying specifications, such as bit size, possible operations, and speed. In principle, you don&#039;t need to implement every possible operation - a few operations are sufficient to make the system Turing complete - although additional operations make it more convenient and often faster. &lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
Below is an example of possible operations in an ALU:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Opcode&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| Add&lt;br /&gt;
| 000&lt;br /&gt;
| Adds A and B&lt;br /&gt;
|-&lt;br /&gt;
| Sub&lt;br /&gt;
| 001&lt;br /&gt;
| Subtracts B from A&lt;br /&gt;
|-&lt;br /&gt;
| AND&lt;br /&gt;
| 010&lt;br /&gt;
| Outputs true if both A and B are true, otherwise false&lt;br /&gt;
|-&lt;br /&gt;
| NAND&lt;br /&gt;
| 011&lt;br /&gt;
| Inverse of AND. If A and B are true, output is false&lt;br /&gt;
|-&lt;br /&gt;
| OR&lt;br /&gt;
| 100&lt;br /&gt;
| Outputs true if either A or B is true&lt;br /&gt;
|-&lt;br /&gt;
| NOR&lt;br /&gt;
| 101&lt;br /&gt;
| Inverse of OR. If either A or B is true, output is false&lt;br /&gt;
|-&lt;br /&gt;
| XOR&lt;br /&gt;
| 110&lt;br /&gt;
| Outputs true if exactly one of A or B is true&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Template:ALU&amp;diff=709</id>
		<title>Template:ALU</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Template:ALU&amp;diff=709"/>
		<updated>2025-09-14T14:12:31Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: ALU template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; &#039;&#039;&#039;Arithmetic logic unit&#039;&#039;&#039;&lt;br /&gt;
: In &#039;&#039;Logic World&#039;&#039;, an &#039;&#039;&#039;arithmetic logic unit&#039;&#039;&#039; (&#039;&#039;&#039;ALU&#039;&#039;&#039;) is a component of a [[CPU|central processor]] that performs basic arithmetic and logic operations.&lt;br /&gt;
: By combining multiple operations, it is possible to perform any computation.&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Building_mechanic&amp;diff=695</id>
		<title>Building mechanic</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Building_mechanic&amp;diff=695"/>
		<updated>2025-09-13T14:11:28Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: added wiring&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Building mechanics&#039;&#039;&#039; are tools the player can use to build, i.e. to manipulate [[component]]s and [[wire]]s.&lt;br /&gt;
&lt;br /&gt;
== List of building mechanics ==&lt;br /&gt;
&lt;br /&gt;
* [[Editing]]&lt;br /&gt;
* [[Resizing]]&lt;br /&gt;
* [[Wiring]]&lt;br /&gt;
&lt;br /&gt;
{{todo|complete this list}}&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Random-access_memory&amp;diff=694</id>
		<title>Random-access memory</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Random-access_memory&amp;diff=694"/>
		<updated>2025-09-12T23:25:21Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
{{RAM}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;RAM&#039;&#039;&#039; is composed of multiple cells that store data, accessed by an address.&amp;lt;br&amp;gt;&lt;br /&gt;
It has 4 inputs:&lt;br /&gt;
# Data input&lt;br /&gt;
# Address input&lt;br /&gt;
# Write signal&lt;br /&gt;
# Read signal  &lt;br /&gt;
And 1 output:&lt;br /&gt;
# Data output&lt;br /&gt;
&lt;br /&gt;
Each cell in RAM is essentially a [[register]].&lt;br /&gt;
&lt;br /&gt;
Building a RAM from scratch is one of the best ways to start learning logic and computers, as well as to get familiar with circuit construction in &#039;&#039;Logic World&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
RAMs can have very different designs, specifications, and can be [[Optimization|optimized]] for speed, size, or even aesthetics. RAM designs are usually specified by the following parameters:&lt;br /&gt;
# Address size&lt;br /&gt;
# Data size&lt;br /&gt;
# Delay during retrieving/storing data&lt;br /&gt;
# Speed between sequential operations&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Address and data size&#039;&#039;&#039; is determined by the number of bits. The total number of combinations using &#039;&#039;&#039;n&#039;&#039;&#039; bits is &amp;lt;math&amp;gt;2^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Delay&#039;&#039;&#039; during retrieving/storing data is the time between when the read/write signal is turned {{on}} and when the data is retrieved or stored for a single operation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Speed between sequential operations&#039;&#039;&#039; is how fast the RAM can run multiple sequential operations. The delay between multiple operations is always &amp;lt;math&amp;gt;\ge&amp;lt;/math&amp;gt; the delay for a single operation.&lt;br /&gt;
&lt;br /&gt;
This article will demonstrate a simple RAM with 4 bits for address and 8 bits for data.&lt;br /&gt;
&lt;br /&gt;
== Construction ==&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Mods:CheeseUtilMod|CheeseUtilMod]] - a mod with RAM components&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Random-access_memory&amp;diff=693</id>
		<title>Random-access memory</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Random-access_memory&amp;diff=693"/>
		<updated>2025-09-12T23:14:17Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: RAM stub&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
{{RAM}}&lt;br /&gt;
&lt;br /&gt;
RAM is composed of multiple cells that store data and accessed by address.&amp;lt;br&amp;gt;&lt;br /&gt;
It has 4 inputs:&lt;br /&gt;
#Data input&lt;br /&gt;
#Address input&lt;br /&gt;
#Write signal&lt;br /&gt;
#Read signal&lt;br /&gt;
And 1 output:&lt;br /&gt;
#Data output&lt;br /&gt;
&lt;br /&gt;
Building a RAM from scratch is the best way to start learning logic and computers, as well as get familiar with building circuits in &#039;&#039;Logic World&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
RAMs can have drastically different designs, have different specifications and [[Optimization|optimized]] for speed/size or even beauty. RAM designs are specified by the following parameters:&lt;br /&gt;
#Address size&lt;br /&gt;
#Data size&lt;br /&gt;
#Delay during retrieving/storing data&lt;br /&gt;
#Speed between sequential operations&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Address and data&#039;&#039;&#039; size is determined by number of bits. The total number of combinations, or, in other words, the largest number it can handle with &#039;&#039;&#039;n&#039;&#039;&#039; bits is &amp;lt;math&amp;gt;2^n&amp;lt;/math&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Delay&#039;&#039;&#039; during retrieving/storing data is a delay between the read/write signal is turned {{on}} and when the data is retrieved/stored for a singular operation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Speed&#039;&#039;&#039; between sequential operations is how fast it can run multiple sequential operations. The speed is &amp;lt;math&amp;gt;\ge&amp;lt;/math&amp;gt; delay.&lt;br /&gt;
&lt;br /&gt;
This article will show a simplest RAM with 4 bits for address and 8 bits for data.&lt;br /&gt;
&lt;br /&gt;
== Construction ==&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Mods:CheeseUtilMod|CheeseUtilMod]] - a mod with RAM components&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Decoder&amp;diff=692</id>
		<title>Decoder</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Decoder&amp;diff=692"/>
		<updated>2025-09-12T22:55:30Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: /* Construction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; &#039;&#039;&#039;Decoder&#039;&#039;&#039;&lt;br /&gt;
: In &#039;&#039;Logic World&#039;&#039;, a &#039;&#039;&#039;Decoder&#039;&#039;&#039; is a circuit that takes a binary input and activates one specific output bit corresponding to that input.&lt;br /&gt;
: It is commonly used to select one element out of many, for example a cell in memory.&lt;br /&gt;
: The Decoder always outputs a single bit.&lt;br /&gt;
: Effectively it&#039;s translating a binary value into a [[wikipedia:Unary_numeral_system|unary]] value.&lt;br /&gt;
: [[File:4bit-decoder.png|alt=4-bit decoder. Input on the left is 1110. The 14th output bit on the right is activated.|thumb|4-bit decoder. Input on the left is 1110. The 14th output bit on the right is activated.]]&lt;br /&gt;
&lt;br /&gt;
== Construction ==&lt;br /&gt;
&lt;br /&gt;
A Decoder is one of the simplest circuits to build.  &lt;br /&gt;
First, determine how many bits you need.  &lt;br /&gt;
The number of output bits from input bits is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;o = 2^i&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And vice versa:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;i = \log_2(o)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, if you want 256 outputs, you will need a decoder with 8 input bits.  &lt;br /&gt;
Each output has a specific pattern of {{on}} and {{off}} bits coming from the input. The circuit is basically a number of [[AND Gate|AND]] gates for each possible combination.&lt;br /&gt;
&lt;br /&gt;
Here are the steps to build it:&lt;br /&gt;
&lt;br /&gt;
* Place a row of input items.  &lt;br /&gt;
* Connect each input bit to both a [[Inverter|NOT]] gate and a [[Buffer]].The NOT gate is required to have the inverted value and the Buffer is required to match the delay with the NOT gate.  &lt;br /&gt;
* Place a row of NOT gates to serve as the outputs.  &lt;br /&gt;
* Go through each output NOT gate and connect them to the corresponding inputs (normal or inverted) to match its binary value. For example, the output corresponding to number 12 (binary 1100) should receive the following binary values:&lt;br /&gt;
** 1st bit – normal  &lt;br /&gt;
** 2nd bit – normal  &lt;br /&gt;
** 3rd bit – inverted  &lt;br /&gt;
** 4th bit – inverted  &lt;br /&gt;
:and so on for each value.&lt;br /&gt;
&lt;br /&gt;
You can design a decoder in different ways. If you are building one for the first time, you may want to explicitly place each wire and gate to match the real electronic analog or to be visually understandable.&lt;br /&gt;
&lt;br /&gt;
When you become more experienced, you can skip unnecessary details and make it as simple as the screenshot above demonstrates. This design, optimized for speed and size, uses the trick of connecting wires from &#039;&#039;&#039;output&#039;&#039;&#039; pins directly to the required items, avoiding additional buffers and wire routing. On the screenshot below you can see the side view and how it allows it to make it compact.  &lt;br /&gt;
&lt;br /&gt;
[[File:Decoder-side.png|thumb|center|alt=Side view of the decoder|Side view of the decoder]]&lt;br /&gt;
&lt;br /&gt;
== Speed ==&lt;br /&gt;
&lt;br /&gt;
The compact design above computes the output in 2 ticks.&lt;br /&gt;
&lt;br /&gt;
== Part of ==&lt;br /&gt;
&lt;br /&gt;
Decoders are used primarily as part of the following circuits:&lt;br /&gt;
&lt;br /&gt;
[[RAM]], [[ROM]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[CU|Control Unit]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Multiplexer]], [[Demultiplexer]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Lookup_Table]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Encoder]]&lt;br /&gt;
* [[Lookup Table]]&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Decoder&amp;diff=691</id>
		<title>Decoder</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Decoder&amp;diff=691"/>
		<updated>2025-09-12T22:49:21Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: /* Construction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; &#039;&#039;&#039;Decoder&#039;&#039;&#039;&lt;br /&gt;
: In &#039;&#039;Logic World&#039;&#039;, a &#039;&#039;&#039;Decoder&#039;&#039;&#039; is a circuit that takes a binary input and activates one specific output bit corresponding to that input.&lt;br /&gt;
: It is commonly used to select one element out of many, for example a cell in memory.&lt;br /&gt;
: The Decoder always outputs a single bit.&lt;br /&gt;
: Effectively it&#039;s translating a binary value into a [[wikipedia:Unary_numeral_system|unary]] value.&lt;br /&gt;
: [[File:4bit-decoder.png|alt=4-bit decoder. Input on the left is 1110. The 14th output bit on the right is activated.|thumb|4-bit decoder. Input on the left is 1110. The 14th output bit on the right is activated.]]&lt;br /&gt;
&lt;br /&gt;
== Construction ==&lt;br /&gt;
&lt;br /&gt;
A Decoder is one of the simplest circuits to build.  &lt;br /&gt;
First, determine how many bits you need.  &lt;br /&gt;
The number of output bits from input bits is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;o = 2^i&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And vice versa:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;i = \log_2(o)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, if you want 256 outputs, you will need a decoder with 8 input bits.  &lt;br /&gt;
Each output has a specific pattern of {{on}} and {{off}} bits coming from the input. Here are the steps to build it:&lt;br /&gt;
&lt;br /&gt;
* Place a row of input items.  &lt;br /&gt;
* Connect each input bit to both a [[Inverter|NOT]] gate and a [[Buffer]].The NOT gate is required to have the inverted value and the Buffer is required to match the delay with the NOT gate.  &lt;br /&gt;
* Place a row of NOT gates to serve as the outputs.  &lt;br /&gt;
* Go through each output NOT gate and connect them to the corresponding inputs (normal or inverted) to match its binary value. For example, the output corresponding to number 12 (binary 1100) should receive the following binary values:&lt;br /&gt;
** 1st bit – normal  &lt;br /&gt;
** 2nd bit – normal  &lt;br /&gt;
** 3rd bit – inverted  &lt;br /&gt;
** 4th bit – inverted  &lt;br /&gt;
:and so on for each value.&lt;br /&gt;
&lt;br /&gt;
You can design a decoder in different ways. If you are building one for the first time, you may want to explicitly place each wire and gate to match the real electronic analog or to be visually understandable.&lt;br /&gt;
&lt;br /&gt;
When you become more experienced, you can skip unnecessary details and make it as simple as the screenshot above demonstrates. This design, optimized for speed and size, uses the trick of connecting wires from &#039;&#039;&#039;output&#039;&#039;&#039; pins directly to the required items, avoiding additional buffers and wire routing. On the screenshot below you can see the side view and how it allows it to make it compact.  &lt;br /&gt;
&lt;br /&gt;
[[File:Decoder-side.png|thumb|center|alt=Side view of the decoder|Side view of the decoder]]&lt;br /&gt;
&lt;br /&gt;
== Speed ==&lt;br /&gt;
&lt;br /&gt;
The compact design above computes the output in 2 ticks.&lt;br /&gt;
&lt;br /&gt;
== Part of ==&lt;br /&gt;
&lt;br /&gt;
Decoders are used primarily as part of the following circuits:&lt;br /&gt;
&lt;br /&gt;
[[RAM]], [[ROM]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[CU|Control Unit]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Multiplexer]], [[Demultiplexer]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Lookup_Table]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Encoder]]&lt;br /&gt;
* [[Lookup Table]]&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Template:RAM&amp;diff=690</id>
		<title>Template:RAM</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Template:RAM&amp;diff=690"/>
		<updated>2025-09-12T22:36:41Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: RAM definition&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; &#039;&#039;&#039;Random-access memory&#039;&#039;&#039;&lt;br /&gt;
: In &#039;&#039;Logic World&#039;&#039;, &#039;&#039;&#039;Random-access memory&#039;&#039;&#039; (&#039;&#039;&#039;RAM&#039;&#039;&#039;) is a circuit that can store and load data on demand.&lt;br /&gt;
: Unlike [[ROM]], the contents of RAM can be changed at any time by writing new data to it.&lt;br /&gt;
: Unlike non-random-access memory, access can be performed in &#039;&#039;any&#039;&#039; order with a constant delay for each cell.&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Wiring&amp;diff=689</id>
		<title>Wiring</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Wiring&amp;diff=689"/>
		<updated>2025-09-12T22:28:13Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: added trivia&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Wiring&#039;&#039;&#039; is a [[building mechanic]] that lets you connect wires between different [[component|components]].  &lt;br /&gt;
Two components can be connected by clicking on the first input/output and then on the second one.&lt;br /&gt;
&lt;br /&gt;
A very useful feature for wiring is Multi-Wire placing.  &lt;br /&gt;
It allows you to select an entire row of components and connect them to another row of components all at once.&lt;br /&gt;
&lt;br /&gt;
The default way to place the Multi-Wire is the following:&lt;br /&gt;
# While holding {{keys|control}}, select the first item and drag the selection to the last item.&lt;br /&gt;
# Release all keys. The selected items will become inputs and be highlighted in blue.&lt;br /&gt;
# Drag the mouse on the second row to make it the output.&lt;br /&gt;
&lt;br /&gt;
Multi-Wire connection works in all combinations of items: one-to-one, one-to-many, many-to-one, and unequal.  &lt;br /&gt;
You can also use offsets to select only specific items in the row, for example to skip every second item. The default keys to increase/decrease the offset are {{keys|e}}/{{keys|q}} or mouse wheel up/down. Offset can be done after selecting the inputs or during the selection of outputs.&lt;br /&gt;
&lt;br /&gt;
[[File:Mutli-wire.png|frame|center|alt=Multi-wiring in progress|Multi-wiring in progress]]&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
* Wires have collisions. Using bugs or mods to place wires without collisions is not only a violation of the laws of physics, but is also considered a crime against humanity and must be stopped. You should always see and understand what each wire is doing.&lt;br /&gt;
* The maximum length of a wire is 134.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Mods:CustomWirePlacer|CustomWirePlacer]]&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Wiring&amp;diff=688</id>
		<title>Wiring</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Wiring&amp;diff=688"/>
		<updated>2025-09-12T22:15:12Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: Multi-Wire article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Wiring&#039;&#039;&#039; is a [[building mechanic]] that lets you connect wires between different [[component|components]].  &lt;br /&gt;
Two components can be connected by clicking on the first input/output and then on the second one.&lt;br /&gt;
&lt;br /&gt;
A very useful feature for wiring is Multi-Wire placing.  &lt;br /&gt;
It allows you to select an entire row of components and connect them to another row of components all at once.&lt;br /&gt;
&lt;br /&gt;
The default way to place the Multi-Wire is the following:&lt;br /&gt;
# While holding {{keys|control}}, select the first item and drag the selection to the last item.&lt;br /&gt;
# Release all keys. The selected items will become inputs and be highlighted in blue.&lt;br /&gt;
# Drag the mouse on the second row to make it the output.&lt;br /&gt;
&lt;br /&gt;
Multi-Wire connection works in all combinations of items: one-to-one, one-to-many, many-to-one, and unequal.  &lt;br /&gt;
You can also use offsets to select only specific items in the row, for example to skip every second item. The default keys to increase/decrease the offset are {{keys|e}}/{{keys|q}} or mouse wheel up/down. Offset can be done after selecting the inputs or during the selection of outputs.&lt;br /&gt;
&lt;br /&gt;
[[File:Mutli-wire.png|frame|center|alt=Multi-wiring in progress|Multi-wiring in progress]]&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
[[Mods:CustomWirePlacer|CustomWirePlacer]]&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=File:Mutli-wire.png&amp;diff=687</id>
		<title>File:Mutli-wire.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=File:Mutli-wire.png&amp;diff=687"/>
		<updated>2025-09-12T22:08:53Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mutli-wire&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Talk:Your_First_Computer&amp;diff=667</id>
		<title>Talk:Your First Computer</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Talk:Your_First_Computer&amp;diff=667"/>
		<updated>2025-09-11T14:46:14Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: /* Discussing the article */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Discussing the article ==&lt;br /&gt;
&lt;br /&gt;
Hi.&lt;br /&gt;
The article must clearly explain that CPU designs can be very different.&lt;br /&gt;
It&#039;s better to start with showing different possibilities and then building one of the easiest variant.&lt;br /&gt;
Here and now I&#039;m talking about the current explanation with ROM and the specific IS. It&#039;s not clear that this is only one option and it&#039;s not even the most flexible due to ROM. [[User:DjSapsan|DjSapsan]] ([[User talk:DjSapsan|talk]]) 14:46, 11 September 2025 (UTC)&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=User:DjSapsan/sandbox&amp;diff=655</id>
		<title>User:DjSapsan/sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=User:DjSapsan/sandbox&amp;diff=655"/>
		<updated>2025-09-10T18:18:34Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: A table for standard&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Connectors are described from the &#039;female&#039; perspective (looking from outside towards it). &#039;Male&#039; connectors must be complementary.  &lt;br /&gt;
Groups are ordered from left to right. If they have many layers, then from top to bottom.  &lt;br /&gt;
Sockets within the group must be stacked together.  &lt;br /&gt;
Groups of connection items should be divided by a gap between groups. Note if you did otherwise.  &lt;br /&gt;
Big sockets can be placed in any way.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Connector name [.int version] || colspan=&amp;quot;8&amp;quot; | name&lt;br /&gt;
|-&lt;br /&gt;
| Expected speed || colspan=&amp;quot;8&amp;quot; | speed&lt;br /&gt;
|-&lt;br /&gt;
| Expected latency || colspan=&amp;quot;8&amp;quot; | latency&lt;br /&gt;
|-&lt;br /&gt;
! Layer !! Order !! Group name !! Used Bits !! Reserve for other versions !! Socket type !! Direction !! Pulse length in ticks !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;7&amp;quot; | 1 || 1 || Address || 8 || 16 || small || in || || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || Data || 8 || 16 || small || both || || &lt;br /&gt;
|-&lt;br /&gt;
| 3 || || || || || || || &lt;br /&gt;
|-&lt;br /&gt;
| 4 || || || || || || || &lt;br /&gt;
|-&lt;br /&gt;
| 5 || || || || || || || &lt;br /&gt;
|-&lt;br /&gt;
| 6 || || || || || || || &lt;br /&gt;
|-&lt;br /&gt;
| 7 || || || || || || || &lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;4&amp;quot; | 2 || 1 || || || || || || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || || || || || || || &lt;br /&gt;
|-&lt;br /&gt;
| 3 || || || || || || || &lt;br /&gt;
|-&lt;br /&gt;
| 4 || || || || || || || &lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;9&amp;quot;|short description and how to work ||&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;9&amp;quot;| img ||&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Standardization&amp;diff=654</id>
		<title>Standardization</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Standardization&amp;diff=654"/>
		<updated>2025-09-10T18:03:05Z</updated>

		<summary type="html">&lt;p&gt;DjSapsan: created stub for the new article about Standardization&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;Standardization&#039;&#039;&#039;&lt;br /&gt;
: In &#039;&#039;Logic World&#039;&#039;, &#039;&#039;&#039;Standardization&#039;&#039;&#039; is the process of creating and agreeing on a set of consistent technical specifications, protocols and practices to ensure compatibility between different devices made by different people.&lt;/div&gt;</summary>
		<author><name>DjSapsan</name></author>
	</entry>
</feed>