<?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=Lawrziepan</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=Lawrziepan"/>
	<link rel="alternate" type="text/html" href="https://wiki.logic.world/wiki/Special:Contributions/Lawrziepan"/>
	<updated>2026-05-15T13:41:03Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Multiplexer&amp;diff=786</id>
		<title>Multiplexer</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Multiplexer&amp;diff=786"/>
		<updated>2025-10-18T09:18:24Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Multiplexer Diagram.png|300x300px|A diagram of a multiplexer|alt=A diagram of a multiplexer|thumb]]&lt;br /&gt;
[[File:Simpler Multiplexer Circuit.png|alt=A diagram of a simple multiplexer|thumb|376x376px|Example of a simple multiplexer.]]&lt;br /&gt;
A multiplexer, sometimes referred to as a MUX, is used to select from input data. A multiplexer is an essential piece of any circuit in Logic World. There are many different ways to build a multiplexer. &lt;br /&gt;
&lt;br /&gt;
== Behavior ==&lt;br /&gt;
A multiplexer has at least 2 inputs of any bit size, and a select input that is either:&lt;br /&gt;
&lt;br /&gt;
* A bit array with a length of the number of inputs, and whichever bits are &#039;&#039;&#039;ON&#039;&#039;&#039;, their corresponding inputs get bitwise-ORed to the output.&lt;br /&gt;
* A value which corresponds to an input to send directly to the output.&lt;br /&gt;
&lt;br /&gt;
== Uses ==&lt;br /&gt;
Multiplexers are very versatile, and can be used for many circuits. Multiplexers are commonly used for:&lt;br /&gt;
&lt;br /&gt;
* Selecting between registers to use in operations in a CPU.&lt;br /&gt;
* Indexing memory.&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Your_First_Computer&amp;diff=785</id>
		<title>Your First Computer</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Your_First_Computer&amp;diff=785"/>
		<updated>2025-10-18T09:05:57Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: Added a paragraph in the example program section describing the assembly notation used in the example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
This guide is for anyone who is interested in learning how computers work, and wants to learn by building a computer for themselves, but doesn&#039;t know where to start.&lt;br /&gt;
&lt;br /&gt;
This guide assumes the reader has a basic understanding of Logic Worlds [[Building mechanic|building mechanics]], and has some experience building some of the more intermediate components, such as [[Full Adder|adders]], [[Random-access memory|memory]], and [[decoder|decoders]]. As well as at least some understanding of the [[wikipedia:Binary_number|binary numbers system]].&lt;br /&gt;
&lt;br /&gt;
The first part of this guide will go over the hardware of a very basic computer system. This guide will not be covering things like text and image processing, internet browsing, operating systems, file systems, windows and graphical user interfaces and other systems generally associated with personal computers. These systems are all built using software, and covering them, as well as software in general, is an entire subject unto itself. This guide will only be focusing on creating hardware that can execute software. Furthermore, this guide will only be focusing on &#039;&#039;core&#039;&#039; hardware, the bare minimum required to run software. This guide will not be covering peripheral hardware such as screens, graphics processor units, storage devices, co-processors, or multi-core setups. Nor will this guide be covering the topic of source code compilation. These are all topics that require their own study and as such are outside the scope of this guide.&lt;br /&gt;
&lt;br /&gt;
The second part of this guide will be covering the process of designing your computer. It will bring up key details you should consider when planning your computer build, as well as providing a basic layout that you can use if you don&#039;t want to design everything from scratch yourself.&lt;br /&gt;
&lt;br /&gt;
The third part will of this guide will cover building your computer.&lt;br /&gt;
&lt;br /&gt;
== Hardware Theory ==&lt;br /&gt;
All computers, regardless of complexity, need at least these 4 components. Program memory typically made using [[ROM|read-only memory]], an [[Arithmetic logic unit|ALU]], working memory typically made using individual [[Register|registers]] and [[random-access memory]], and a [[Control Unit|control unit]].&lt;br /&gt;
[[File:Computer_Structure_diagram.png|right|thumb|300x300px|The structure of the computer in this article]]&lt;br /&gt;
Program memory is where the program to be executed is stored. It takes the form of a list of binary numbers called machine code, and each number is called an instruction or opcode. The computer will step through this list one instruction at a time, grabbing each instruction, interpreting it, and performing an action corresponding to that instruction. This process is referred to as the fetch-decode-execute cycle.&lt;br /&gt;
&lt;br /&gt;
Actions that a computer can perform can vary greatly, but two of the most common actions are moving data around, and performing operations using data.&lt;br /&gt;
&lt;br /&gt;
The ALU is what allows a computer to perform these operations, and working memory is where the data being operated on is stored.&lt;br /&gt;
&lt;br /&gt;
Moving data around may seem pointless at first, but often ALU&#039;s don&#039;t have direct access to working memory, but instead must use whatever is stored in more local registers. Data must therefore be juggled between working memory and registers in order to give the ALU access to the entire dataset. It&#039;s also useful for organizing data into larger data structures. &lt;br /&gt;
&lt;br /&gt;
While it might be hard to wrap your head around this at first, everything that computers do can mostly be reduced to these two operations: moving data around, and operating on data. How these two operations can be structured to do things like browse the internet or play games requires a study of software, and is thus outside the scope of this article. But under the hood, millions of these operations are happening at a rate of billions a second, and it&#039;s this size and speed that allows computers to perform much more complicated tasks.&lt;br /&gt;
[[File:A schematic view of a very basic control unit.png|thumb|A lookup table takes in as its inputs the content of a step counter and an instruction register, and produces as its outputs various read, write, and function signals. On the clocks rising edge, the step counter is incremented. The lookup table immediately updates its outputs, reading from various components and sending function signals. The write signals do not get sent out though until the falling edge of the clock. As this diagram suggests, the lookup table is in control of its own instruction register, and has the ability to reset the step counter. The instruction register is updated at the beginning of every instruction sequence, and the step counter is reset at the end of every instruction sequence.]]&lt;br /&gt;
Coordinating these instruction fetches, data moves, and ALU operations is the control unit. It&#039;s job is to decode the instruction fetched from program memory and decide what control signals to send out and when. &lt;br /&gt;
&lt;br /&gt;
While this module can get very complicated, the simplest control unit consists of a [[Lookup Table|lookup table]] that takes the current instruction and the value of a [[counter]] as a combined input, and produces all the read, write, and function signals the computer needs as an output. A clock is used to increment the counter, and to a pulse for the write signals through the use of a [[Edge Detection|falling edge detector]], while the table is configured to read from program memory and write to an instruction register when the counter is 0, then increment an instruction pointer register when the counter is 1. From there, the table can be configured to do different things depending on the value of the instruction register. The counter register is reset when the instruction is complete, and the fetch-decode-execute cycle repeats.&lt;br /&gt;
&lt;br /&gt;
On top of being able to move data around and perform operations, there is a third common type of action a computer can perform called a control flow instruction. These consist of instructions like jumping, conditional branching, calling and returning, and software interrupts. Though we&#039;ll only be focusing on jumping and conditional branching here. These all have one thing in common, and that is to break the linear sequence of the program. &lt;br /&gt;
&lt;br /&gt;
Normally, as part of the fetch-decode-execute cycle, the instruction pointer used to index the program memory is incremented after each instruction fetch. Setting up the next instruction in the list to be executed when the current instruction is complete. By writing a new value to the instruction pointer, we queue up a different section of the program memory, and the first instruction in that section is primed to be executed next.&lt;br /&gt;
&lt;br /&gt;
This is often used to create infinite loops in your program, or finite loops if you use a conditional branch that resumes a normal execution sequence if a condition is met, like two numbers being equal or one being greater than the other. &lt;br /&gt;
&lt;br /&gt;
These three action types are the minimum required to create a [[wikipedia:Turing completeness|turing complete]] computer - a computer that can calculate anything.&lt;br /&gt;
&lt;br /&gt;
== Planning A Computer ==&lt;br /&gt;
While you might be inclined to jump head-first into building, computers are complicated things, as the previous section shows. A little bit of forethought is required before you start building in order to help guide your building decisions. Otherwise you will end up with a computer that&#039;s too messy to modify, and if it ends up malfunctioning, it&#039;ll be too messy to troubleshoot as well. &#039;&#039;&#039;Documentation is key&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Before you begin, think about what you want this computer to do. What ALU functions do you want it to have? What special instructions or special hardware? You&#039;ll also want to consider key details such as the width of your ALU, the width of your working memory and program memory, as well as the size of these memory modules, as this will determine the width of your address bus and indexing registers. &lt;br /&gt;
&lt;br /&gt;
=== Example Computer ===&lt;br /&gt;
Since you&#039;ll likely not know what to add, this section will provide for you a very basic plan for you to follow.&lt;br /&gt;
&lt;br /&gt;
==== Component Sizing ====&lt;br /&gt;
Our computer will be very basic. We&#039;ll be using an 8 bit ALU and 8 bit working memory. We can do a lot with 8 bits without needing to make the hardware too big.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll also have 256 addresses in our program memory, so an 8 bit address bus and 8 bit indexing register is in order, since 2^8 is 256. The width of the program memory is determined by our computers instruction set.&lt;br /&gt;
&lt;br /&gt;
==== Instruction Set ====&lt;br /&gt;
This is the most influential part of planning. This will not only dictate what your computer does, but also how programs will be stored in program memory.&lt;br /&gt;
&lt;br /&gt;
You can design your own instruction set from scratch if you want something more complex. But for our instruction set, we will be adding 4 types of instructions: load immediate, operate, move, and jumping/branching. These will be organized with the prefixes &amp;lt;code&amp;gt;00&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;01&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;10&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;11&amp;lt;/code&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
We will be squeezing our instructions into 8 bits, making our program memory 8 bits wide. With 2 of those bits being used as a prefix, that leaves 6 bits to be used as instruction arguments.&lt;br /&gt;
&lt;br /&gt;
Below is the instruction set we will be using:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Name&lt;br /&gt;
!Opcode (8 bits)&lt;br /&gt;
!Operands&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|Immediate&lt;br /&gt;
|00 xxx xxx&lt;br /&gt;
|x: The immediate value.&lt;br /&gt;
|Puts a value given by x into register 0.&lt;br /&gt;
|-&lt;br /&gt;
|Add&lt;br /&gt;
|01 000___&lt;br /&gt;
|&lt;br /&gt;
|Adds the values in register 1 and 2, and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Subtract&lt;br /&gt;
|01 001___&lt;br /&gt;
|&lt;br /&gt;
|Subtracts the value in register 1 from register 2 and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|And&lt;br /&gt;
|01 010___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise ANDs the values in register 1 and 2, and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Or&lt;br /&gt;
|01 011___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise ORs the values in register 1 and 2, and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|XOR&lt;br /&gt;
|01 100___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise XORs the values in register 1 and 2 and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Not&lt;br /&gt;
|01 101___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise NOTs the values in register 1 and 2 and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Move&lt;br /&gt;
|10 xxx yyy&lt;br /&gt;
|x: The register to move data from. y: The register to move data to.&lt;br /&gt;
|Moves the data from register x into register y.&lt;br /&gt;
|-&lt;br /&gt;
|Test&lt;br /&gt;
|11 000___&lt;br /&gt;
|&lt;br /&gt;
|Tests the values in register 4 and 5 against each other, putting the result into the flags register.&lt;br /&gt;
|-&lt;br /&gt;
|Jump zero&lt;br /&gt;
|11 001___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the zero flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump carry &lt;br /&gt;
|11 010___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the carry flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump negative&lt;br /&gt;
|11 011___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the negative flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump equal&lt;br /&gt;
|11 100___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the equal flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump&lt;br /&gt;
|11 101___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, regardless of an flags.&lt;br /&gt;
|}&lt;br /&gt;
Notice that most instructions only use 3 of the 6 argument bits. Move immediate uses all 6, allowing the user to load an immediate value of 0-63, and move also uses all 6 to index 2 registers.&lt;br /&gt;
&lt;br /&gt;
==== Registers ====&lt;br /&gt;
Since we have 3 bits available to index registers with, our computer will include 8 all-purpose registers. &lt;br /&gt;
&lt;br /&gt;
If you design your own computer, you will need to consider what registers to include, and what will they be used for.&lt;br /&gt;
&lt;br /&gt;
In our case, while all of our registers will be general purpose, meaning you can use them for whatever purpose you like, most of them will be used in a specific way for specific instructions. The registers and their purposes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Register 0 - destination for immediate values&lt;br /&gt;
* Register 1 - source of one argument of an operation&lt;br /&gt;
* Register 2 - source of the other argument of an operation&lt;br /&gt;
* Register 3 - destination of the result of an operation&lt;br /&gt;
* Register 4 - source of one argument for a comparison&lt;br /&gt;
* Register 5 - source of the other argument for a comparison&lt;br /&gt;
* Register 6 - target address for a jump&lt;br /&gt;
* Register 7 - general purpose&lt;br /&gt;
&lt;br /&gt;
Note that the instruction pointer and instruction register are separate to these all-purpose registers, so our program will not be able to &#039;&#039;directly&#039;&#039; edit the values in these registers.&lt;br /&gt;
&lt;br /&gt;
Editing of these registers is done by the control unit either during the fetch-decode-execute cycle, or through the use of a jump instruction.&lt;br /&gt;
&lt;br /&gt;
==== Flags ====&lt;br /&gt;
If you decide to include conditional branching in your instruction set, you will need to decide what conditions (called flags) you want to check for and how you&#039;re going to check them.&lt;br /&gt;
&lt;br /&gt;
In our case, we will have the following 4 flags in our computer:&lt;br /&gt;
* Zero flag -  This flag will be {{On}} only if the first value from the last test instruction was equal to 0.&lt;br /&gt;
* Carry flag - This flag will be {{On}} only if that last add (or subtract) instruction carried/overflowed.&lt;br /&gt;
* Negative flag - This flag will be {{On}} only if the first value from the last test instruction was negative (had its most significant bit {{On}}).&lt;br /&gt;
* Equal flag - This flag will be {{On}} only if the values from the last test instruction were equal to each other.&lt;br /&gt;
We will also be storing the states of these flags in another register called a flag register. Allowing us to capture the state of these flags with one instruction (test) and use the state of these flags in another instruction (jump).&lt;br /&gt;
&lt;br /&gt;
You do not need to store the state of these flags in a register, or perform a test and branch in two separate instructions. You can perform your comparison and use the results immediately, if you want. Doing so will just require a more complex execution sequence, and possibly bigger instructions. &lt;br /&gt;
&lt;br /&gt;
==== Example Program ====&lt;br /&gt;
Putting everything together, we can use our instruction set to write a Fibonacci program:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;asm&amp;quot;&amp;gt;&lt;br /&gt;
; Initialise registers&lt;br /&gt;
Immediate 0 ; 00 000000&lt;br /&gt;
Move 2, 0   ; 10 000 010&lt;br /&gt;
Immediate 1 ; 00 000001&lt;br /&gt;
Move 1, 0   ; 10 000 001&lt;br /&gt;
;&lt;br /&gt;
; Main loop&lt;br /&gt;
Add         ; 01 000 ___&lt;br /&gt;
Move 2, 1   ; 10 001 010&lt;br /&gt;
Move 1, 3   ; 10 011 001&lt;br /&gt;
Immediate 4 ; 00 000100&lt;br /&gt;
Move 6, 0   ; 10 000 110&lt;br /&gt;
Jump        ; 11 101 ___&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Note that in this notation, the instruction name comes first, and subsequent numbers are the operands of the instruction. Instructions such as the &#039;&#039;Move&#039;&#039; instruction have two operands; The first is the destination register, which describes the register to save data to, the other is the source register, which describes the register to load data from. For example, the Move instruction moves the data from the source register, and &#039;&#039;&#039;copies&#039;&#039;&#039; it to the destination register directly.&lt;br /&gt;
&lt;br /&gt;
Visualizing the process, we can imagine the first instruction being copied into the instruction register, the instruction pointer being incremented, then the value being copied from the instruction register to register 0.&lt;br /&gt;
&lt;br /&gt;
Then the step counter resets, and we begin again, fetching the instruction, incrementing the instruction counter, and moving the content of register 0 to register 2. Reset the step counter and on and on it goes.&lt;br /&gt;
&lt;br /&gt;
This is what our computer &#039;&#039;should&#039;&#039; do when it&#039;s complete.&lt;br /&gt;
&lt;br /&gt;
With the planning done, it&#039;s now time to move on to building.&lt;br /&gt;
&lt;br /&gt;
==Building the Computer==&lt;br /&gt;
&lt;br /&gt;
=== Mental Preparations ===&lt;br /&gt;
Depending on the size and complexity of your computer, the building phase will take several days to several months to complete. This is a full-scale project, so be aware of what you&#039;re committing to. Our example computer is simple, and should only take 1-3 days to build depending on your skill and availability. Even still, you will need to mentally prepare yourself if you&#039;re not used to working on larger scale projects. Things won&#039;t work the first time, you will need to troubleshoot things. You will learn how to do things better as you work on this, give yourself time and space to tear things down and start again if you deem it necessary. Prototypes aren&#039;t just small-scale quick-and-dirty versions of the final product that you assemble to get something done now. &#039;&#039;They&#039;re practice runs&#039;&#039;. They give you the experience needed to determine what works and what doesn&#039;t. Be patient. Be willing to try when you don&#039;t know what to do, and be willing to throw it all away when you find out it doesn&#039;t work.&lt;br /&gt;
&lt;br /&gt;
If you want to know what it takes to carry out a big project, the book &amp;quot;How Big Things Get Done&amp;quot; by Bent Flyvbjerg and Dan Gardner is an invaluable resource. If you read it, you might get the impression that the &amp;quot;correct&amp;quot; way to handle a project like this is to plan every little detail on paper &#039;&#039;before&#039;&#039; you start building.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not do this!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The key idea you should take away from this book is there are some things you just don&#039;t think about until you start putting shovels in the ground. Rather than waiting until this moment, instead try putting a spoon in a sandbox first. Do it for real, but on a smaller and cheaper scale.&lt;br /&gt;
&lt;br /&gt;
Nothing is cheaper than a digital sandbox, so Logic World has you covered there. But you&#039;ll still have to build something, make your mistakes, learn, and try again. No amount of forethought will ever prepare you for what you&#039;ve never tried before. Though a bit for forethought is still good practice. &lt;br /&gt;
&lt;br /&gt;
=== Start With The Major Components ===&lt;br /&gt;
What components do you know your computer will need? What are their inputs and outputs? What do they do? These are the best places to start when building a computer.&lt;br /&gt;
&lt;br /&gt;
In our example computer, we know our computer needs an 8-bit ALU. We know this ALU will have 6 functions, and we know it will produce 4 flag outputs along with the normal result output. Start by building that. Use [[Socket|sockets]] to make this component modular and to make connecting to other components easier.&lt;br /&gt;
&lt;br /&gt;
We also know this computer will need registers. We&#039;ll need to be able to read from and write to these registers, but things like the ALU can also access the state of these registers directly. Building a single register with a data in/out connection, a read, write, and enable input, and a state output will allow us to duplicate the design and build our register file much faster.&lt;br /&gt;
&lt;br /&gt;
We can also reuse this design for other registers like the instruction register.&lt;br /&gt;
&lt;br /&gt;
The flag register, instruction pointer register, and step counter will all need to be custom built, as their behavior differs slightly from our register template. But these too are components who&#039;s inputs, outputs, and behaviors are known, and thus can quickly be built in isolation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Test as you go!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While it may seem like extra work, you&#039;ll want to know that each component is in working order &#039;&#039;before&#039;&#039; you use them in your final build. This isn&#039;t strictly necessary, but as a general rule of thumb when building things, it &#039;&#039;&#039;&#039;&#039;never&#039;&#039;&#039;&#039;&#039; works right the first time. When it comes time to put everything together, it&#039;s better to only have to deal with issues that arise at that level, rather than to run around trying to fix every problem with every component at every level.&lt;br /&gt;
&lt;br /&gt;
Continue to build each of the remaining components in isolation. Moving on to a small portion of [[switch]]-based program memory, and any other major components you might discover you need along the way, such as [[Multiplexer|multiplexers]], [[Decoder|decoders]], and smaller [[Lookup Table|lookup tables]] for controlling things like translating portions of the instruction register into control lines for the general purpose registers or the ALU. &#039;&#039;Save the control lookup table for last!&#039;&#039; As the inputs and outputs of this component will change as you begin to define what components you have and what their inputs/outputs are.&lt;br /&gt;
&lt;br /&gt;
For example, we may discover that it&#039;d be much easier to send a single &amp;quot;register read/write&amp;quot; line to the registers, and then use a decoder to translate bits from the instruction register into enable lines to exact fine control over the individual registers.&lt;br /&gt;
&lt;br /&gt;
Or, we may discover that our lookup table needs to take the state of our flag register into account when performing certain instructions. &lt;br /&gt;
&lt;br /&gt;
These are things we discover as we build, and as such, it&#039;s best to leave things like the control unit for last.&lt;br /&gt;
&lt;br /&gt;
=== Putting It All Together ===&lt;br /&gt;
Alright! You have all your components built, and they&#039;re all working in isolation. Pat yourself on the back.&lt;br /&gt;
&lt;br /&gt;
Now comes time to wire it all together.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t be afraid to make a mess. Remember, we haven&#039;t actually tested everything together as a whole yet. We have no idea if it will work, or if we overlooked something. Doing our fine-polishing work now if something isn&#039;t working properly will just be a waste of time and lead to frustration as we try to squeeze patches into what was once our finest masterpiece. &lt;br /&gt;
&lt;br /&gt;
This is also why we built a small portion of switch-based program memory. The smaller size means we don&#039;t invest too much time building a massive component that we just don&#039;t need right now, and making it switched based will eliminate the need to reprogram our program memory every time we want to conduct a test.&lt;br /&gt;
&lt;br /&gt;
You can even make multiple copies of your program memory and load different test programs on each one for a more thorough testing procedure.&lt;br /&gt;
&lt;br /&gt;
Lay out all your major components as best as you can. It helps to have them surround a large open area. Use buses to make the connections, and when you feel like everything is ready, load your program memory with a small test program, start the clock and see what happens.&lt;br /&gt;
&lt;br /&gt;
More than likely, things will not work as you had expected. Here&#039;s where you&#039;re going to need to slow down and troubleshoot things. Use the [[Tick|simulation controls]] to slow down, stop, and step the logic simulator. At this level, most issues you will experience are related to timing. Register inputs are not being held during the duration of a write. The ALU output is not stabilizing in time. Things like that. Though it is also possible that one of your components isn&#039;t working as it should, or its behavior needs to change in some way.&lt;br /&gt;
&lt;br /&gt;
This is why we made our components modular. If this does happen, take the defective component out, fix or rebuild it, and plug it back in.&lt;br /&gt;
&lt;br /&gt;
Be sure to run all of your test programs again after making a change. Sometimes changing one thing can fix one issue, and create another. Don&#039;t assume previous tests will pass just because they were passing before the change.&lt;br /&gt;
&lt;br /&gt;
=== Refine and Repeat ===&lt;br /&gt;
Eventually, after many cycles of testing, troubleshooting, and repairing, your rough prototype will be in working order.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You just built your first computer!&lt;br /&gt;
&lt;br /&gt;
Now comes time to polish things up, if you want to.&lt;br /&gt;
&lt;br /&gt;
You can replace your test program memory modules with a full sized program memory module, if you want. Or you can begin the process of organizing your components. &lt;br /&gt;
&lt;br /&gt;
Compress them down, rearrange them, stack them in a neat package. Just be sure to do it one step at a time, and test after each change.&lt;br /&gt;
&lt;br /&gt;
When you&#039;re happy with how things look, you can call it done.&lt;br /&gt;
&lt;br /&gt;
Again, be sure to replace your test program memory modules with a full sized module, and for easy programming/using of your computer, consider adding a programmers interface where you can punch in programs and read the state of your registers. &lt;br /&gt;
&lt;br /&gt;
Whatever you do, make it yours.&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Your_First_Computer&amp;diff=727</id>
		<title>Your First Computer</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Your_First_Computer&amp;diff=727"/>
		<updated>2025-09-20T13:14:20Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
If you&#039;re a new player, you might have already built a few circuits already: an [[Full Adder|adder]], some kind of memory, a [[decoder]]. But getting to the next level where you have a functioning and [https://en.wikipedia.org/wiki/Turing%20completeness turing complete] computer, is incredibly daunting. This article will serve as a guide to how you might build your first computer.&lt;br /&gt;
&lt;br /&gt;
== Planning The Computer ==&lt;br /&gt;
[[File:Computer Structure diagram.png|300px|right|thumb|The structure of the computer in this article]]While you might be inclined to jump head first into building, this results in at the very least messy building in Logic World, or a malfunctioning computer. In our computer we are going to first plan and &#039;&#039;&#039;document&#039;&#039;&#039; the capabilities our computer will have.&lt;br /&gt;
&lt;br /&gt;
To start with the planning section, it helps to think about what this computer we are building is for. This could range from wanting to test out an [[wikipedia:Arithmetic_logic_unit|ALU]] you built, or to perform a specific program you have in mind, e.g. matrix multiplication.&lt;br /&gt;
&lt;br /&gt;
In this guide, our computer will be built as a way to learn each of the different parts of a computer, without any bells or whistles. So, we are going to give the computer the bare minimum.&lt;br /&gt;
&lt;br /&gt;
=== Data Width ===&lt;br /&gt;
Data width refers to how many bits the binary numbers in our computer will use. This doesn’t have to be universal across an entire computer; for example, the memory might store in 32 bits, but our ALU only 16. In our computer however, we will use the same data width across our entire computer. While you can definitely go smaller, 8 bits is a good number to make it less complicated while being able to do a lot with our computer, so our data width is going to be 8 bits.&lt;br /&gt;
&lt;br /&gt;
=== The ROM ===&lt;br /&gt;
The read only memory in our computer is where we are going to store all of the instructions for our computer. We aren’t looking for anything too big, so to keep with our data width of 8 bits, we will have 2^8 or 256 addresses in our ROM (this only needs to be addressed with 8 bits). And each address will store 8 bits of data for our instructions.&lt;br /&gt;
&lt;br /&gt;
=== Instruction Set ===&lt;br /&gt;
This is the most influential part of planning. It’s tough for a beginner to get a feel for how to design an instruction set, and has the most impact on how easy it will be to build your computer. If you wanted to design a more advanced computer, you should design your own instruction set, and see how that influences your computer.&lt;br /&gt;
&lt;br /&gt;
Every instruction has an opcode that tells the computer what instruction you &#039;&#039;actually&#039;&#039; want it to perform. There are roughly 4 main types:&lt;br /&gt;
&lt;br /&gt;
* Data management. This involves moving data from one register to another, loading or saving to memory, or loading an arbitrary value into your registers, etc.&lt;br /&gt;
* Operations. These instructions use your ALU to transform data in a specific way, e.g adding two registers or using bitwise logic.&lt;br /&gt;
* Conditional logic. This is where jumps come into play. These instructions let you test registers against each other, and change the order the computer executes instructions based on tests.&lt;br /&gt;
* Interrupts. While you generally wouldn’t find interrupts in a computer in Logic World, these let you talk to computer hardware, or call specific kernel functions (don’t worry if you don’t understand what that means, it isn’t important for this guide).&lt;br /&gt;
&lt;br /&gt;
With that, this is the instruction set we are going to base our computer around:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Name&lt;br /&gt;
!Opcode (8 bits)&lt;br /&gt;
!Opperands&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|Immediate&lt;br /&gt;
|00 xxxxxxxx&lt;br /&gt;
|x: The immediate value.&lt;br /&gt;
|Puts a value given by x into register 0.&lt;br /&gt;
|-&lt;br /&gt;
|Add&lt;br /&gt;
|01 000___&lt;br /&gt;
|&lt;br /&gt;
|Adds the values in register 1 and 2, and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Subtract&lt;br /&gt;
|01 001___&lt;br /&gt;
|&lt;br /&gt;
|Subtracts the value in register 1 from register 2 and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|And&lt;br /&gt;
|01 010___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise ANDs the values in register 1 and 2, and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Or&lt;br /&gt;
|01 011___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise ORs the values in register 1 and 2, and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|XOR&lt;br /&gt;
|01 100___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise XORs the values in register 1 and 2 and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Not&lt;br /&gt;
|01 101___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise NOTs the values in register 1 and 2 and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Move&lt;br /&gt;
|10 xxx yyy&lt;br /&gt;
|x: The register to move data from. y: The register to move data to.&lt;br /&gt;
|Moves the data from register x into register y.&lt;br /&gt;
|-&lt;br /&gt;
|Test&lt;br /&gt;
|11 000___&lt;br /&gt;
|&lt;br /&gt;
|Tests the values in register 4 and 5 against each other, putting the result into the flags register.&lt;br /&gt;
|-&lt;br /&gt;
|Jump 0&lt;br /&gt;
|11 001___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the 0 flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump carry &lt;br /&gt;
|11 010___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the carry flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump negative&lt;br /&gt;
|11 011___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the negative flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump equal&lt;br /&gt;
|11 100___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the equal flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump&lt;br /&gt;
|11 101___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, regardless of an flags.&lt;br /&gt;
|}&lt;br /&gt;
===Registers===&lt;br /&gt;
We will use 8 all-purpose registers, because of the 3-bit limit imposed by the Move instruction. Note that the program counter and instruction register is seperate to these all-purpose registers, so our program will not be able to &#039;&#039;directly&#039;&#039; edit the values in these registers.&lt;br /&gt;
&lt;br /&gt;
=== Flags ===&lt;br /&gt;
We will only have 3 flags in our computer, as can be seen in the instruction set:&lt;br /&gt;
&lt;br /&gt;
* 0 flag. This flag will be {{On}} only if the first value from the last test instruction was equal to 0.&lt;br /&gt;
* Carry flag. This flag will be {{On}} only if that last add (or subtract) instruction carried/overflowed.&lt;br /&gt;
* Negative flag. This flag will be {{On}} only if the first value from the last test instruction was negative (had its most significant bit {{On}}).&lt;br /&gt;
* Equal flag. This flag will be {{On}} only if the values from the last test instruction were equal to each other.&lt;br /&gt;
&lt;br /&gt;
=== Example Program ===&lt;br /&gt;
This will show our instruction set using a fibonacci program.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;asm&amp;quot;&amp;gt;&lt;br /&gt;
; Initialise registers&lt;br /&gt;
Immediate 0 ; 00 000000&lt;br /&gt;
Move 2, 0   ; 10 000 010&lt;br /&gt;
Immediate 1 ; 00 000001&lt;br /&gt;
Move 1, 0   ; 10 000 001&lt;br /&gt;
;&lt;br /&gt;
; Main loop&lt;br /&gt;
Add         ; 01 000 ___&lt;br /&gt;
Move 2, 1   ; 10 001 010&lt;br /&gt;
Move 1, 3   ; 10 011 001&lt;br /&gt;
Immediate 5 ; 00 000101&lt;br /&gt;
Move 6, 0   ; 10 000 110&lt;br /&gt;
Jump        ; 11 101 ___&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==Building the Computer==&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Your_First_Computer&amp;diff=726</id>
		<title>Your First Computer</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Your_First_Computer&amp;diff=726"/>
		<updated>2025-09-20T13:13:49Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
If you&#039;re a new player, you might have already built a few circuits already: an [[Full Adder|adder]], some kind of memory, a [[decoder]]. But getting to the next level where you have a functioning and [https://en.wikipedia.org/wiki/Turing%20completeness turing complete] computer, is incredibly daunting. This article will serve as a guide to how you might build your first computer.&lt;br /&gt;
&lt;br /&gt;
== Planning The Computer ==&lt;br /&gt;
[[File:Computer Structure diagram.png|300px|right|thumb|The structure of the computer in this article]]While you might be inclined to jump head first into building, this results in at the very least messy building in Logic World, or a malfunctioning computer. In our computer we are going to first plan and &#039;&#039;&#039;document&#039;&#039;&#039; the capabilities our computer will have.&lt;br /&gt;
&lt;br /&gt;
To start with the planning section, it helps to think about what this computer we are building is for. This could range from wanting to test out an [[wikipedia:Arithmetic_logic_unit|ALU]] you built, or to perform a specific program you have in mind, e.g. matrix multiplication.&lt;br /&gt;
&lt;br /&gt;
In this guide, our computer will be built as a way to learn each of the different parts of a computer, without any bells or whistles. So, we are going to give the computer the bare minimum.&lt;br /&gt;
&lt;br /&gt;
=== Data Width ===&lt;br /&gt;
Data width refers to how many bits the binary numbers in our computer will use. This doesn’t have to be universal across an entire computer; for example, the memory might store in 32 bits, but our ALU only 16. In our computer however, we will use the same data width across our entire computer. While you can definitely go smaller, 8 bits is a good number to make it less complicated while being able to do a lot with our computer, so our data width is going to be 8 bits.&lt;br /&gt;
&lt;br /&gt;
=== The ROM ===&lt;br /&gt;
The read only memory in our computer is where we are going to store all of the instructions for our computer. We aren’t looking for anything too big, so to keep with our data width of 8 bits, we will have 2^8 or 256 addresses in our ROM (this only needs to be addressed with 8 bits). And each address will store 8 bits of data for our instructions.&lt;br /&gt;
&lt;br /&gt;
=== Instruction Set ===&lt;br /&gt;
This is the most influential part of planning. It’s tough for a beginner to get a feel for how to design an instruction set, and has the most impact on how easy it will be to build your computer. If you wanted to design a more advanced computer, you should design your own instruction set, and see how that influences your computer.&lt;br /&gt;
&lt;br /&gt;
Every instruction has an opcode that tells the computer what instruction you &#039;&#039;actually&#039;&#039; want it to perform. There are roughly 4 main types:&lt;br /&gt;
&lt;br /&gt;
* Data management. This involves moving data from one register to another, loading or saving to memory, or loading an arbitrary value into your registers, etc.&lt;br /&gt;
* Operations. These instructions use your ALU to transform data in a specific way, e.g adding two registers or using bitwise logic.&lt;br /&gt;
* Conditional logic. This is where jumps come into play. These instructions let you test registers against each other, and change the order the computer executes instructions based on tests.&lt;br /&gt;
* Interrupts. While you generally wouldn’t find interrupts in a computer in Logic World, these let you talk to computer hardware, or call specific kernel functions (don’t worry if you don’t understand what that means, it isn’t important for this guide).&lt;br /&gt;
&lt;br /&gt;
With that, this is the instruction set we are going to base our computer around:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Name&lt;br /&gt;
!Opcode (8 bits)&lt;br /&gt;
!Opperands&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|Immediate&lt;br /&gt;
|00 xxxxxxxx&lt;br /&gt;
|x: The immediate value.&lt;br /&gt;
|Puts a value given by x into register 0.&lt;br /&gt;
|-&lt;br /&gt;
|Add&lt;br /&gt;
|01 000___&lt;br /&gt;
|&lt;br /&gt;
|Adds the values in register 1 and 2, and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Subtract&lt;br /&gt;
|01 001___&lt;br /&gt;
|&lt;br /&gt;
|Subtracts the value in register 1 from register 2 and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|And&lt;br /&gt;
|01 010___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise ANDs the values in register 1 and 2, and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Or&lt;br /&gt;
|01 011___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise ORs the values in register 1 and 2, and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|XOR&lt;br /&gt;
|01 100___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise XORs the values in register 1 and 2 and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Not&lt;br /&gt;
|01 101___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise NOTs the values in register 1 and 2 and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Move&lt;br /&gt;
|10 xxx yyy&lt;br /&gt;
|x: The register to move data from. y: The register to move data to.&lt;br /&gt;
|Moves the data from register x into register y.&lt;br /&gt;
|-&lt;br /&gt;
|Test&lt;br /&gt;
|11 000___&lt;br /&gt;
|&lt;br /&gt;
|Tests the values in register 4 and 5 against each other, putting the result into the flags register.&lt;br /&gt;
|-&lt;br /&gt;
|Jump 0&lt;br /&gt;
|11 001___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the 0 flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump carry &lt;br /&gt;
|11 010___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the carry flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump negative&lt;br /&gt;
|11 011___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the negative flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump equal&lt;br /&gt;
|11 100___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the equal flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump&lt;br /&gt;
|11 101___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, regardless of an flags.&lt;br /&gt;
|}&lt;br /&gt;
===Registers===&lt;br /&gt;
We will use 8 all-purpose registers, because of the 3-bit limit imposed by the Move instruction. Note that the program counter and instruction register is seperate to these all-purpose registers, so our program will not be able to &#039;&#039;directly&#039;&#039; edit the values in these registers.&lt;br /&gt;
&lt;br /&gt;
=== Flags ===&lt;br /&gt;
We will only have 3 flags in our computer, as can be seen in the instruction set:&lt;br /&gt;
&lt;br /&gt;
* 0 flag. This flag will be {{On}} only if the first value from the last test instruction was equal to 0.&lt;br /&gt;
* Carry flag. This flag will be {{On}} only if that last add (or subtract) instruction carried/overflowed.&lt;br /&gt;
* Negative flag. This flag will be {{On}} only if the first value from the last test instruction was negative (had its most significant bit {{On}}).&lt;br /&gt;
* Equal flag. This flag will be {{On}} only if the values from the last test instruction were equal to each other.&lt;br /&gt;
&lt;br /&gt;
=== Example Program ===&lt;br /&gt;
This will show our instruction set using a fibonacci program.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;asm&amp;quot;&amp;gt;&lt;br /&gt;
; Initialise registers&lt;br /&gt;
Immediate 0 ; 00 000000&lt;br /&gt;
Move 2, 0   ; 10 000 010&lt;br /&gt;
Immediate 1 ; 00 000001&lt;br /&gt;
Move 1, 0   ; 10 000 001&lt;br /&gt;
;&lt;br /&gt;
; Main loop&lt;br /&gt;
Add         ; 01 000 ___&lt;br /&gt;
Move 2, 1   ; 10 001 010&lt;br /&gt;
Move 1, 3   ; 10 011 001&lt;br /&gt;
Immediate 5 ; 00 000101&lt;br /&gt;
Move 6, 0   ; 10 000 110&lt;br /&gt;
Jump        ; 11 101 ___&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==Building the Computer&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Your_First_Computer&amp;diff=703</id>
		<title>Your First Computer</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Your_First_Computer&amp;diff=703"/>
		<updated>2025-09-14T13:40:32Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: /* Example Program */ made comments all aligned&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
If you&#039;re a new player, you might have already built a few circuits already: an [[Full Adder|adder]], some kind of memory, a [[decoder]]. But getting to the next level where you have a functioning and [https://en.wikipedia.org/wiki/Turing%20completeness turing complete] computer, is incredibly daunting. This article will serve as a guide to how you might build your first computer.&lt;br /&gt;
&lt;br /&gt;
== Planning The Computer ==&lt;br /&gt;
[[File:Computer Structure diagram.png|300px|right|thumb|The structure of the computer in this article]]While you might be inclined to jump head first into building, this results in at the very least messy building in Logic World, or a malfunctioning computer. In our computer we are going to first plan and &#039;&#039;&#039;document&#039;&#039;&#039; the capabilities our computer will have.&lt;br /&gt;
&lt;br /&gt;
To start with the planning section, it helps to think about what this computer we are building is for. This could range from wanting to test out an [[wikipedia:Arithmetic_logic_unit|ALU]] you built, or to perform a specific program you have in mind, e.g. matrix multiplication.&lt;br /&gt;
&lt;br /&gt;
In this guide, our computer will be built as a way to learn each of the different parts of a computer, without any bells or whistles. So, we are going to give the computer the bare minimum.&lt;br /&gt;
&lt;br /&gt;
=== Data Width ===&lt;br /&gt;
Data width refers to how many bits the binary numbers in our computer will use. This doesn’t have to be universal across an entire computer; for example, the memory might store in 32 bits, but our ALU only 16. In our computer however, we will use the same data width across our entire computer. While you can definitely go smaller, 8 bits is a good number to make it less complicated while being able to do a lot with our computer, so our data width is going to be 8 bits.&lt;br /&gt;
&lt;br /&gt;
=== The ROM ===&lt;br /&gt;
The read only memory in our computer is where we are going to store all of the instructions for our computer. We aren’t looking for anything too big, so to keep with our data width of 8 bits, we will have 2^8 or 256 addresses in our ROM (this only needs to be addressed with 8 bits). And each address will store 8 bits of data for our instructions.&lt;br /&gt;
&lt;br /&gt;
=== Instruction Set ===&lt;br /&gt;
This is the most influential part of planning. It’s tough for a beginner to get a feel for how to design an instruction set, and has the most impact on how easy it will be to build your computer. If you wanted to design a more advanced computer, you should design your own instruction set, and see how that influences your computer.&lt;br /&gt;
&lt;br /&gt;
Every instruction has an opcode that tells the computer what instruction you &#039;&#039;actually&#039;&#039; want it to perform. There are roughly 4 main types:&lt;br /&gt;
&lt;br /&gt;
* Data management. This involves moving data from one register to another, loading or saving to memory, or loading an arbitrary value into your registers, etc.&lt;br /&gt;
* Operations. These instructions use your ALU to transform data in a specific way, e.g adding two registers or using bitwise logic.&lt;br /&gt;
* Conditional logic. This is where jumps come into play. These instructions let you test registers against each other, and change the order the computer executes instructions based on tests.&lt;br /&gt;
* Interrupts. While you generally wouldn’t find interrupts in a computer in Logic World, these let you talk to computer hardware, or call specific kernel functions (don’t worry if you don’t understand what that means, it isn’t important for this guide).&lt;br /&gt;
&lt;br /&gt;
With that, this is the instruction set we are going to base our computer around:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Name&lt;br /&gt;
!Opcode (8 bits)&lt;br /&gt;
!Opperands&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|Immediate&lt;br /&gt;
|00 xxxxxxxx&lt;br /&gt;
|x: The immediate value.&lt;br /&gt;
|Puts a value given by x into register 0.&lt;br /&gt;
|-&lt;br /&gt;
|Add&lt;br /&gt;
|01 000___&lt;br /&gt;
|&lt;br /&gt;
|Adds the values in register 1 and 2, and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Subtract&lt;br /&gt;
|01 001___&lt;br /&gt;
|&lt;br /&gt;
|Subtracts the value in register 1 from register 2 and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|And&lt;br /&gt;
|01 010___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise ANDs the values in register 1 and 2, and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Or&lt;br /&gt;
|01 011___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise ORs the values in register 1 and 2, and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|XOR&lt;br /&gt;
|01 100___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise XORs the values in register 1 and 2 and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Not&lt;br /&gt;
|01 101___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise NOTs the values in register 1 and 2 and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Move&lt;br /&gt;
|10 xxx yyy&lt;br /&gt;
|x: The register to move data from. y: The register to move data to.&lt;br /&gt;
|Moves the data from register x into register y.&lt;br /&gt;
|-&lt;br /&gt;
|Test&lt;br /&gt;
|11 000___&lt;br /&gt;
|&lt;br /&gt;
|Tests the values in register 4 and 5 against each other, putting the result into the flags register.&lt;br /&gt;
|-&lt;br /&gt;
|Jump 0&lt;br /&gt;
|11 001___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the 0 flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump carry &lt;br /&gt;
|11 010___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the carry flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump negative&lt;br /&gt;
|11 011___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the negative flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump equal&lt;br /&gt;
|11 100___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the equal flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump&lt;br /&gt;
|11 101___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, regardless of an flags.&lt;br /&gt;
|}&lt;br /&gt;
===Registers===&lt;br /&gt;
We will use 8 all-purpose registers, because of the 3-bit limit imposed by the Move instruction. Note that the program counter and instruction register is seperate to these all-purpose registers, so our program will not be able to &#039;&#039;directly&#039;&#039; edit the values in these registers.&lt;br /&gt;
&lt;br /&gt;
=== Flags ===&lt;br /&gt;
We will only have 3 flags in our computer, as can be seen in the instruction set:&lt;br /&gt;
&lt;br /&gt;
* 0 flag. This flag will be {{On}} only if the first value from the last test instruction was equal to 0.&lt;br /&gt;
* Carry flag. This flag will be {{On}} only if that last add (or subtract) instruction carried/overflowed.&lt;br /&gt;
* Negative flag. This flag will be {{On}} only if the first value from the last test instruction was negative (had its most significant bit {{On}}).&lt;br /&gt;
* Equal flag. This flag will be {{On}} only if the values from the last test instruction were equal to each other.&lt;br /&gt;
&lt;br /&gt;
=== Example Program ===&lt;br /&gt;
This will show our instruction set using a fibonacci program.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;asm&amp;quot;&amp;gt;&lt;br /&gt;
; Initialise registers&lt;br /&gt;
Immediate 0 ; 00 000000&lt;br /&gt;
Move 2, 0   ; 10 000 010&lt;br /&gt;
Immediate 1 ; 00 000001&lt;br /&gt;
Move 1, 0   ; 10 000 001&lt;br /&gt;
;&lt;br /&gt;
; Main loop&lt;br /&gt;
Add         ; 01 000 ___&lt;br /&gt;
Move 2, 1   ; 10 001 010&lt;br /&gt;
Move 1, 3   ; 10 011 001&lt;br /&gt;
Immediate 5 ; 00 000101&lt;br /&gt;
Move 6, 0   ; 10 000 110&lt;br /&gt;
Jump        ; 11 101 ___&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Todo|I will expand this article later}}&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Your_First_Computer&amp;diff=701</id>
		<title>Your First Computer</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Your_First_Computer&amp;diff=701"/>
		<updated>2025-09-14T13:34:41Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: Added Registers, Flags and Example Program sections into the Planning heading.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
If you&#039;re a new player, you might have already built a few circuits already: an [[Full Adder|adder]], some kind of memory, a [[decoder]]. But getting to the next level where you have a functioning and [https://en.wikipedia.org/wiki/Turing%20completeness turing complete] computer, is incredibly daunting. This article will serve as a guide to how you might build your first computer.&lt;br /&gt;
&lt;br /&gt;
== Planning The Computer ==&lt;br /&gt;
[[File:Computer Structure diagram.png|300px|right|thumb|The structure of the computer in this article]]While you might be inclined to jump head first into building, this results in at the very least messy building in Logic World, or a malfunctioning computer. In our computer we are going to first plan and &#039;&#039;&#039;document&#039;&#039;&#039; the capabilities our computer will have.&lt;br /&gt;
&lt;br /&gt;
To start with the planning section, it helps to think about what this computer we are building is for. This could range from wanting to test out an [[wikipedia:Arithmetic_logic_unit|ALU]] you built, or to perform a specific program you have in mind, e.g. matrix multiplication.&lt;br /&gt;
&lt;br /&gt;
In this guide, our computer will be built as a way to learn each of the different parts of a computer, without any bells or whistles. So, we are going to give the computer the bare minimum.&lt;br /&gt;
&lt;br /&gt;
=== Data Width ===&lt;br /&gt;
Data width refers to how many bits the binary numbers in our computer will use. This doesn’t have to be universal across an entire computer; for example, the memory might store in 32 bits, but our ALU only 16. In our computer however, we will use the same data width across our entire computer. While you can definitely go smaller, 8 bits is a good number to make it less complicated while being able to do a lot with our computer, so our data width is going to be 8 bits.&lt;br /&gt;
&lt;br /&gt;
=== The ROM ===&lt;br /&gt;
The read only memory in our computer is where we are going to store all of the instructions for our computer. We aren’t looking for anything too big, so to keep with our data width of 8 bits, we will have 2^8 or 256 addresses in our ROM (this only needs to be addressed with 8 bits). And each address will store 8 bits of data for our instructions.&lt;br /&gt;
&lt;br /&gt;
=== Instruction Set ===&lt;br /&gt;
This is the most influential part of planning. It’s tough for a beginner to get a feel for how to design an instruction set, and has the most impact on how easy it will be to build your computer. If you wanted to design a more advanced computer, you should design your own instruction set, and see how that influences your computer.&lt;br /&gt;
&lt;br /&gt;
Every instruction has an opcode that tells the computer what instruction you &#039;&#039;actually&#039;&#039; want it to perform. There are roughly 4 main types:&lt;br /&gt;
&lt;br /&gt;
* Data management. This involves moving data from one register to another, loading or saving to memory, or loading an arbitrary value into your registers, etc.&lt;br /&gt;
* Operations. These instructions use your ALU to transform data in a specific way, e.g adding two registers or using bitwise logic.&lt;br /&gt;
* Conditional logic. This is where jumps come into play. These instructions let you test registers against each other, and change the order the computer executes instructions based on tests.&lt;br /&gt;
* Interrupts. While you generally wouldn’t find interrupts in a computer in Logic World, these let you talk to computer hardware, or call specific kernel functions (don’t worry if you don’t understand what that means, it isn’t important for this guide).&lt;br /&gt;
&lt;br /&gt;
With that, this is the instruction set we are going to base our computer around:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Name&lt;br /&gt;
!Opcode (8 bits)&lt;br /&gt;
!Opperands&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|Immediate&lt;br /&gt;
|00 xxxxxxxx&lt;br /&gt;
|x: The immediate value.&lt;br /&gt;
|Puts a value given by x into register 0.&lt;br /&gt;
|-&lt;br /&gt;
|Add&lt;br /&gt;
|01 000___&lt;br /&gt;
|&lt;br /&gt;
|Adds the values in register 1 and 2, and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Subtract&lt;br /&gt;
|01 001___&lt;br /&gt;
|&lt;br /&gt;
|Subtracts the value in register 1 from register 2 and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|And&lt;br /&gt;
|01 010___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise ANDs the values in register 1 and 2, and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Or&lt;br /&gt;
|01 011___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise ORs the values in register 1 and 2, and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|XOR&lt;br /&gt;
|01 100___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise XORs the values in register 1 and 2 and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Not&lt;br /&gt;
|01 101___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise NOTs the values in register 1 and 2 and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Move&lt;br /&gt;
|10 xxx yyy&lt;br /&gt;
|x: The register to move data from. y: The register to move data to.&lt;br /&gt;
|Moves the data from register x into register y.&lt;br /&gt;
|-&lt;br /&gt;
|Test&lt;br /&gt;
|11 000___&lt;br /&gt;
|&lt;br /&gt;
|Tests the values in register 4 and 5 against each other, putting the result into the flags register.&lt;br /&gt;
|-&lt;br /&gt;
|Jump 0&lt;br /&gt;
|11 001___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the 0 flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump carry &lt;br /&gt;
|11 010___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the carry flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump negative&lt;br /&gt;
|11 011___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the negative flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump equal&lt;br /&gt;
|11 100___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the equal flag is {{On}}.&lt;br /&gt;
|-&lt;br /&gt;
|Jump&lt;br /&gt;
|11 101___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, regardless of an flags.&lt;br /&gt;
|}&lt;br /&gt;
===Registers===&lt;br /&gt;
We will use 8 all-purpose registers, because of the 3-bit limit imposed by the Move instruction. Note that the program counter and instruction register is seperate to these all-purpose registers, so our program will not be able to &#039;&#039;directly&#039;&#039; edit the values in these registers.&lt;br /&gt;
&lt;br /&gt;
=== Flags ===&lt;br /&gt;
We will only have 3 flags in our computer, as can be seen in the instruction set:&lt;br /&gt;
&lt;br /&gt;
* 0 flag. This flag will be {{On}} only if the first value from the last test instruction was equal to 0.&lt;br /&gt;
* Carry flag. This flag will be {{On}} only if that last add (or subtract) instruction carried/overflowed.&lt;br /&gt;
* Negative flag. This flag will be {{On}} only if the first value from the last test instruction was negative (had its most significant bit {{On}}).&lt;br /&gt;
* Equal flag. This flag will be {{On}} only if the values from the last test instruction were equal to each other.&lt;br /&gt;
&lt;br /&gt;
=== Example Program ===&lt;br /&gt;
This will show our instruction set using a fibonacci program.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;asm&amp;quot;&amp;gt;&lt;br /&gt;
; Initialise registers&lt;br /&gt;
Immediate 0 ; 00 000000&lt;br /&gt;
Move 2, 0 ; 10 000 010&lt;br /&gt;
Immediate 1 ; 00 000001&lt;br /&gt;
Move 1, 0 ; 10 000 001&lt;br /&gt;
;&lt;br /&gt;
; Main loop&lt;br /&gt;
Add ; 01 000 ___&lt;br /&gt;
Move 2, 1 ; 10 001 010&lt;br /&gt;
Move 1, 3 ; 10 011 001&lt;br /&gt;
Immediate 5 ; 00 000101&lt;br /&gt;
Move 6, 0; 10 000 110&lt;br /&gt;
Jump ; 11 101 ___&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Todo|I will expand this article later}}&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Your_First_Computer&amp;diff=664</id>
		<title>Your First Computer</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Your_First_Computer&amp;diff=664"/>
		<updated>2025-09-10T22:10:19Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: Added instruction set planning section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
If you&#039;re a new player, you might have already built a few circuits already: an [[Full Adder|adder]], some kind of memory, a [[decoder]]. But getting to the next level where you have a functioning and [https://en.wikipedia.org/wiki/Turing%20completeness turing complete] computer, is incredibly daunting. This article will serve as a guide to how you might build your first computer.&lt;br /&gt;
&lt;br /&gt;
== Planning The Computer ==&lt;br /&gt;
[[File:Computer Structure diagram.png|300px|right|thumb|The structure of the computer in this article]]While you might be inclined to jump head first into building, this results in at the very least messy building in Logic World, or a malfunctioning computer. In our computer we are going to first plan and &#039;&#039;&#039;document&#039;&#039;&#039; the capabilities our computer will have.&lt;br /&gt;
&lt;br /&gt;
To start with the planning section, it helps to think about what this computer we are building is for. This could range from wanting to test out an [[wikipedia:Arithmetic_logic_unit|ALU]] you built, or to perform a specific program you have in mind, e.g. matrix multiplication.&lt;br /&gt;
&lt;br /&gt;
In this guide, our computer will be built as a way to learn each of the different parts of a computer, without any bells or whistles. So, we are going to give the computer the bare minimum.&lt;br /&gt;
&lt;br /&gt;
=== Data Width ===&lt;br /&gt;
Data width refers to how many bits the binary numbers in our computer will use. This doesn’t have to be universal across an entire computer; for example, the memory might store in 32 bits, but our ALU only 16. In our computer however, we will use the same data width across our entire computer. While you can definitely go smaller, 8 bits is a good number to make it less complicated while being able to do a lot with our computer, so our data width is going to be 8 bits.&lt;br /&gt;
&lt;br /&gt;
=== The ROM ===&lt;br /&gt;
The read only memory in our computer is where we are going to store all of the instructions for our computer. We aren’t looking for anything too big, so to keep with our data width of 8 bits, we will have 2^8 or 256 addresses in our ROM (this only needs to be addressed with 8 bits). And each address will store 8 bits of data for our instructions.&lt;br /&gt;
&lt;br /&gt;
=== Instruction Set ===&lt;br /&gt;
This is the most influential part of planning. It’s tough for a beginner to get a feel for how to design an instruction set, and has the most impact on how easy it will be to build your computer. If you wanted to design a more advanced computer, you should design your own instruction set, and see how that influences your computer.&lt;br /&gt;
&lt;br /&gt;
Every instruction has an opcode that tells the computer what instruction you &#039;&#039;actually&#039;&#039; want it to perform. There are roughly 4 main types:&lt;br /&gt;
&lt;br /&gt;
* Data management. This involves moving data from one register to another, loading or saving to memory, or loading an arbitrary value into your registers, etc.&lt;br /&gt;
* Operations. These instructions use your ALU to transform data in a specific way, e.g adding two registers or using bitwise logic.&lt;br /&gt;
* Conditional logic. This is where jumps come into play. These instructions let you test registers against each other, and change the order the computer executes instructions based on tests.&lt;br /&gt;
* Interrupts. While you generally wouldn’t find interrupts in a computer in Logic World, these let you talk to computer hardware, or call specific kernel functions (don’t worry if you don’t understand what that means, it isn’t important for this guide).&lt;br /&gt;
&lt;br /&gt;
With that, this is the instruction set we are going to base our computer around:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Name&lt;br /&gt;
!Opcode&lt;br /&gt;
!Opperands&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|Immediate&lt;br /&gt;
|00xxxxxxxx&lt;br /&gt;
|x: The immediate value&lt;br /&gt;
|Puts a value given by x into register 0.&lt;br /&gt;
|-&lt;br /&gt;
|Add&lt;br /&gt;
|01000___&lt;br /&gt;
|&lt;br /&gt;
|Adds the values in register 1 and 2, and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Subtract&lt;br /&gt;
|01001___&lt;br /&gt;
|&lt;br /&gt;
|Subtracts the value in register 1 from register 2 and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|And&lt;br /&gt;
|01010___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise ANDs the values in register 1 and 2, and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Or&lt;br /&gt;
|01011___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise ORs the values in register 1 and 2, and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|XOR&lt;br /&gt;
|01100___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise XORs the values in register 1 and 2 and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Not&lt;br /&gt;
|01101___&lt;br /&gt;
|&lt;br /&gt;
|Bit-wise NOTs the values in register 1 and 2 and puts the result in register 3.&lt;br /&gt;
|-&lt;br /&gt;
|Move&lt;br /&gt;
|10xxxyyy&lt;br /&gt;
|x: The register to move data from&lt;br /&gt;
y: The register to move data to&lt;br /&gt;
|Moves the data from register x into register y.&lt;br /&gt;
|-&lt;br /&gt;
|Test&lt;br /&gt;
|11000___&lt;br /&gt;
|&lt;br /&gt;
|Tests the values in register 4 and 5 against each other, putting the result into the flags storage&lt;br /&gt;
|-&lt;br /&gt;
|Jump 0&lt;br /&gt;
|11001___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the 0 flag is ON.&lt;br /&gt;
|-&lt;br /&gt;
|Jump carry &lt;br /&gt;
|11010___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the carry flag is ON.&lt;br /&gt;
|-&lt;br /&gt;
|Jump negative&lt;br /&gt;
|11011___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, if the carry flag is ON.&lt;br /&gt;
|-&lt;br /&gt;
|Jump&lt;br /&gt;
|11100___&lt;br /&gt;
|&lt;br /&gt;
|Jumps to the instruction in register 6, regardless of an flags.&lt;br /&gt;
|}&lt;br /&gt;
{{Todo|I will expand this article later}}&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=XOR_Gate&amp;diff=426</id>
		<title>XOR Gate</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=XOR_Gate&amp;diff=426"/>
		<updated>2025-09-07T22:08:40Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: Changed timing scenario to correct definition of only one input is on&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox component|title=XOR Gate|id=MHG.XorGate|caption=XOR gate|configurable=0|io.minInputs=2|io.maxInputs=2|io.outputs=1|io.propagationDelay=1}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;XOR gate&#039;&#039;&#039; is a basic digital logic component whose output will be {{on}} if only &#039;&#039;&#039;one&#039;&#039;&#039; of its inputs are &#039;&#039;&#039;ON&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
An XOR gate is 2 tiles wide and 1 tile tall, and its body is 1 tile long, but its inputs and outputs extend its area to 3 tiles.&lt;br /&gt;
&lt;br /&gt;
== Logic ==&lt;br /&gt;
The XOR gate&#039;s output will only be active if &#039;&#039;&#039;one&#039;&#039;&#039; of its inputs are &#039;&#039;&#039;ON&#039;&#039;&#039;.{{Truth table|0 0 0|1 0 1|0 1 1|1 1 0|inputs=Input 1, Input 2|outputs=1|caption=XOR Gate Truth Table}}&lt;br /&gt;
Below are alternative XOR definitions.&amp;lt;br&amp;gt;&lt;br /&gt;
The XOR gate&#039;s output will only be {{on}}:&lt;br /&gt;
&lt;br /&gt;
*if inputs are &#039;&#039;&#039;not equal&#039;&#039;&#039;.&lt;br /&gt;
:Helpful to compare values.&lt;br /&gt;
*if number of {{on}} inputs is &#039;&#039;&#039;odd&#039;&#039;&#039;.&lt;br /&gt;
:Helpful for XOR&#039;s with multiple inputs.&lt;br /&gt;
&lt;br /&gt;
== Timing ==&lt;br /&gt;
[[File:XOR gate activation delay.png|thumb|A demonstration of two XOR gates being activated. The top XOR gate has one of its inputs active, but its output is not yet active because a delay of 1 tick has not yet passed. The bottom XOR gate has had one of its inputs active for at least 1 tick, and its output is therefore active.]]&lt;br /&gt;
The XOR gate has a latency of 1 tick, so in the instance when one input is {{on}}, the output will become active 1 tick later. As demonstrated in the example on the right.&lt;br /&gt;
&lt;br /&gt;
== Configurability ==&lt;br /&gt;
The XOR gate cannot have its number of inputs changed, but can have its output position flipped by pressing &#039;F&#039; on it. The bottom XOR gate in the image on the right has had its output flipped.&lt;br /&gt;
&lt;br /&gt;
[[Category:Vanilla components]]&lt;br /&gt;
[[Category:Circuitry components]]&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Your_First_Computer&amp;diff=425</id>
		<title>Your First Computer</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Your_First_Computer&amp;diff=425"/>
		<updated>2025-09-07T22:05:34Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
If you&#039;re a new player, you might have already built a few circuits already: an [[Full Adder|adder]], some kind of memory, a [[decoder]]. But getting to the next level where you have a functioning and [https://en.wikipedia.org/wiki/Turing%20completeness turing complete] computer, is incredibly daunting. This article will serve as a guide to how you might build your first computer.&lt;br /&gt;
&lt;br /&gt;
== Planning The Computer ==&lt;br /&gt;
[[File:Computer Structure diagram.png|300px|right|thumb|The structure of the computer in this article]]While you might be inclined to jump head first into building, this results in at the very least messy building in Logic World, or a malfunctioning computer. In our computer we are going to first plan and &#039;&#039;&#039;document&#039;&#039;&#039; the capabilities our computer will have.&lt;br /&gt;
&lt;br /&gt;
To start with the planning section, it helps to think about what this computer we are building is for. This could range from wanting to test out an [[wikipedia:Arithmetic_logic_unit|ALU]] you built, or to perform a specific program you have in mind, e.g. matrix multiplication.&lt;br /&gt;
&lt;br /&gt;
In this guide, our computer will be built as a way to learn each of the different parts of a computer, without any bells or whistles. So, we are going to give the computer the bare minimum.&lt;br /&gt;
&lt;br /&gt;
=== Data Width ===&lt;br /&gt;
Data width refers to how many bits the binary numbers in our computer will use. This doesn’t have to be universal across an entire computer; for example, the memory might store in 32 bits, but our ALU only 16. In our computer however, we will use the same data width across our entire computer. While you can definitely go smaller, 8 bits is a good number to make it less complicated while being able to do a lot with our computer, so our data width is going to be 8 bits.&lt;br /&gt;
&lt;br /&gt;
=== The ROM ===&lt;br /&gt;
The read only memory in our computer is where we are going to store all of the instructions for our computer. We aren’t looking for anything too big, so to keep with our data width of 8 bits, we will have 2^8 or 256 addresses in our ROM (this only needs to be addressed with 8 bits). And each address will store 8 bits of data for our instructions.&lt;br /&gt;
&lt;br /&gt;
{{Todo|I will expand this article later}}&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Your_First_Computer&amp;diff=405</id>
		<title>Your First Computer</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Your_First_Computer&amp;diff=405"/>
		<updated>2025-09-07T21:12:55Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: This article now flows nicer, started a planning section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
If you&#039;re a new player, you might have already built a few circuits already: an [[Full Adder|adder]], some kind of memory, a [[decoder]]. But getting to the next level where you have a functioning and [https://en.wikipedia.org/wiki/Turing%20completeness turing complete] computer, is incredibly daunting. This article will serve as a guide to how you might build your first computer.&lt;br /&gt;
&lt;br /&gt;
== Planning The Computer ==&lt;br /&gt;
[[File:Computer Structure diagram.png|300px|right|thumb|The structure of the computer in this article]]While you might be inclined to jump head first into building, this results in at the very least messy building in Logic World, or a malfunctioning computer. In our computer we are going to first plan and &#039;&#039;&#039;document&#039;&#039;&#039; the capabilities our computer will have.&lt;br /&gt;
&lt;br /&gt;
To start with the planning section, it helps to think about what this computer we are building is for. This could range from wanting to test out an [[wikipedia:Arithmetic_logic_unit|ALU]] you built, or to perform a specific program you have in mind, e.g. matrix multiplication.&lt;br /&gt;
&lt;br /&gt;
In this guide, our computer will be built as a way to learn each of the different parts of a computer, without any bells or whistles. So, we are going to give the computer the bare minimum.&lt;br /&gt;
&lt;br /&gt;
=== Data Width ===&lt;br /&gt;
Data width refers to how many bits the binary numbers in our computer will use. This doesn’t have to be universal across an entire computer; for example, the memory might store in 32 bits, but our ALU only 16. In our computer however, we will use the same data width across our entire computer. While you can definitely go smaller, 8 bits is a good number to make it less complicated while being able to do a lot with our computer, so our data width is going to be 8 bits.&lt;br /&gt;
&lt;br /&gt;
=== The ROM ===&lt;br /&gt;
The read only memory in our computer is where we are going to store all of the instructions for our computer. We aren’t looking for anything too big, so to keep with our data width of 8 bits, we will have 2^8 or 256 addresses in our ROM (this only needs to be addressed with 8 bits). And each address will store 8 bits of data for our instructions.&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Your_First_Computer&amp;diff=339</id>
		<title>Your First Computer</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Your_First_Computer&amp;diff=339"/>
		<updated>2025-09-07T12:15:52Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: Wrote the opening of the guide&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you&#039;re a new player, you might have already built a few circuits already: an [[Full Adder|adder]], some kind of memory, a [[decoder]]. But getting to the next level where you have a functioning and [[wikipedia:Turing_completeness|turing complete]] computer, is incredibly daunting. This article will serve as a guide to how you might build your first computer.&lt;br /&gt;
&lt;br /&gt;
[[File:Computer Structure diagram.png|300px|right|thumb|The structure of the computer in this article]]Every computer follows this simple process:&lt;br /&gt;
&lt;br /&gt;
* A place that stores instructions sends an instruction to the computer.&lt;br /&gt;
* The instruction gets decoded by the control, and tells the rest of the computer what to do.&lt;br /&gt;
* Sometimes these instructions the [[Arithmetic and Logic Unit]] (henceforth, ALU), to operate on data given by the [[Register|registers]].&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=File:Computer_Structure_diagram.png&amp;diff=330</id>
		<title>File:Computer Structure diagram.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=File:Computer_Structure_diagram.png&amp;diff=330"/>
		<updated>2025-09-07T11:29:32Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: A digram of the structure of a computer.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
A digram of the structure of a computer.&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Multiplexer&amp;diff=329</id>
		<title>Multiplexer</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Multiplexer&amp;diff=329"/>
		<updated>2025-09-07T11:28:03Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: Initial creation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Multiplexer Diagram.png|300x300px|A diagram of a multiplexer|alt=A diagram of a multiplexer|thumb]][[File:Multiplexer Circuit.png|300x300px|An in-game circuit of a multiplexer|alt=A diagram of a multiplexer|thumb]]A multiplexer&#039;s job is to select from the input data, using flags. A multiplexer is an essential piece of any circuit in Logic World. &lt;br /&gt;
&lt;br /&gt;
== Behaviour ==&lt;br /&gt;
A multiplexer has at least 2 inputs of any bit size, and a select input that is either:&lt;br /&gt;
&lt;br /&gt;
* A bit array with a length of the number of inputs, and whichever bits are &#039;&#039;&#039;ON&#039;&#039;&#039;, their corresponding inputs get bitwise-ORed to the output.&lt;br /&gt;
* A value which corresponds to an input to send directly to the output.&lt;br /&gt;
&lt;br /&gt;
== Uses ==&lt;br /&gt;
Multiplexers are very versatile, and can be used for many circuits. Multiplexers are mainly used for:&lt;br /&gt;
&lt;br /&gt;
* Selecting between registers to use in operations by the computer.&lt;br /&gt;
* Indexing memory.&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=File:Multiplexer_Circuit.png&amp;diff=328</id>
		<title>File:Multiplexer Circuit.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=File:Multiplexer_Circuit.png&amp;diff=328"/>
		<updated>2025-09-07T11:25:18Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: A screenshot of a multiplexer circuit ingame.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
A screenshot of a multiplexer circuit ingame.&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=File:Multiplexer_Diagram.png&amp;diff=310</id>
		<title>File:Multiplexer Diagram.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=File:Multiplexer_Diagram.png&amp;diff=310"/>
		<updated>2025-09-07T10:30:26Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: A simple diagram showing the inputs and outputs of a multiplexer.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
A simple diagram showing the inputs and outputs of a multiplexer.&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=307</id>
		<title>Panel Display</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=307"/>
		<updated>2025-09-07T09:53:25Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: Changed &amp;#039;in-game measurements&amp;#039; to &amp;#039;measurements&amp;#039; in order to match the linked page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox component&lt;br /&gt;
| title       = Panel Display&lt;br /&gt;
| id          = MHG.PanelDisplay&lt;br /&gt;
| caption     = A 1x1 Panel Display with 1 input&lt;br /&gt;
| io.minInputs        = 1&lt;br /&gt;
| io.maxInputs        = 9&lt;br /&gt;
| io.outputs          = 0&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Panel Display&#039;&#039;&#039; is one of five components that can only be placed through [[Circuit_Board|circuit boards]]. The Panel Display is generally used analogously to the [[Display]] component, but due to the fact its input peg is on the other side of a [[circuit board]], it is often used to hide internal wiring in displays.&lt;br /&gt;
&lt;br /&gt;
The Panel Display is about &amp;lt;math&amp;gt;2 \frac{1}{6}&amp;lt;/math&amp;gt;tiles long, 1 tile in width, and 1 tile in height (65cm by 30cm by 30cm, see [[measurements]]).&amp;lt;!-- TODO: create and link an in-game measurements article --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Behaviour ==&lt;br /&gt;
When a Panel Display is configured to have a single input, the color of its display is blank when its input is &#039;&#039;&#039;off&#039;&#039;&#039;, and colored when its input is &#039;&#039;&#039;on&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When a Panel Display is configured to have multiple inputs, the color of its display is blank when all inputs are &#039;&#039;&#039;off&#039;&#039;&#039;, and a color determined by its [[palette]] when any of its inputs are &#039;&#039;&#039;on&#039;&#039;&#039;. The inputs are read as a binary number, where the shortest input peg is the least significant bit, and the longest input peg is the most significant, this number then corresponds to the index in its specified [[Palette|color palette]].&lt;br /&gt;
&lt;br /&gt;
== Timing ==&lt;br /&gt;
The Panel Display changes color on the same frame the input (or inputs) change state.&lt;br /&gt;
&lt;br /&gt;
== Configurability ==&lt;br /&gt;
The Panel Display can be configured in two ways:&lt;br /&gt;
&lt;br /&gt;
* Its amount of input pegs can be changed via a &#039;Input Count&#039; slider, which ranges from 1 to 3 at its default size, and a maximum of 9 if resized. The default amount of input pegs is 1.&lt;br /&gt;
* Its [[Palette|color palette]] can be specified from the list of palettes in that world. Note that you can add or change palettes by clicking the &#039;Edit Configurations&#039; button.&lt;br /&gt;
&lt;br /&gt;
== Resizability ==&lt;br /&gt;
The Panel Display can be resized from a default 1 by 1 size, to 12 by 12.&lt;br /&gt;
&lt;br /&gt;
If the Panel Display is at least 2 by 2 in size, its input pegs can be increased from a maximum of 3 to a maximum of 9.&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
Unlike its counterpart, the [[Display]], the Panel Display can have up to 9 input pegs when resized from its default size, whereas the [[Display]] can only have up to 4 input pegs.&lt;br /&gt;
&lt;br /&gt;
[[Category:Vanilla components]]&lt;br /&gt;
[[Category:Output components]]&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=198</id>
		<title>Panel Display</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=198"/>
		<updated>2025-09-07T00:01:31Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Panel Display&#039;&#039;&#039; is one of five components that can only be placed through [[Circuit_Board|circuit boards]]. The Panel Display is generally used analogously to the [[Display]] component, but due to the fact its input peg is on the other side of a [[circuit board]], it is often used to hide internal wiring in displays.&lt;br /&gt;
&lt;br /&gt;
The Panel Display is about &amp;lt;math&amp;gt;2 \frac{1}{6}&amp;lt;/math&amp;gt;tiles long, 1 tile in width, and 1 tile in height (65cm by 30cm by 30cm, see [[Measurements|in-game measurements]]).&amp;lt;!-- TODO: create and link an in-game measurements article --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Behaviour ==&lt;br /&gt;
When a Panel Display is configured to have a single input, the color of its display is blank when its input is &#039;&#039;&#039;off&#039;&#039;&#039;, and colored when its input is &#039;&#039;&#039;on&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When a Panel Display is configured to have multiple inputs, the color of its display is blank when all inputs are &#039;&#039;&#039;off&#039;&#039;&#039;, and a color determined by its [[palette]] when any of its inputs are &#039;&#039;&#039;on&#039;&#039;&#039;. The inputs are read as a binary number, where the shortest input peg is the least significant bit, and the longest input peg is the most significant, this number then corresponds to the index in its specified [[Palette|color palette]].&lt;br /&gt;
&lt;br /&gt;
== Timing ==&lt;br /&gt;
The Panel Display changes its display one tick after its input is changed.&lt;br /&gt;
&lt;br /&gt;
== Configurability ==&lt;br /&gt;
The Panel Display can be configured in two ways:&lt;br /&gt;
&lt;br /&gt;
* Its amount of input pegs can be changed via a &#039;Input Count&#039; slider, which ranges from 1 to 3 at its default size, and a maximum of 9 if resized. The default amount of input pegs is 1.&lt;br /&gt;
* Its [[Palette|color palette]] can be specified from the list of palettes in that world. Note that you can add or change palettes by clicking the &#039;Edit Configurations&#039; button.&lt;br /&gt;
&lt;br /&gt;
== Resizability ==&lt;br /&gt;
The Panel Display can be resized from a default 1 by 1 size, to 12 by 12.&lt;br /&gt;
&lt;br /&gt;
If the Panel Display is at least 2 by 2 in size, its input pegs can be increased from a maximum of 3 to a maximum of 9.&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
Unlike its counterpart, the [[Display]], the Panel Display can have up to 9 input pegs when resized from its default size, whereas the [[Display]] can only have up to 4 input pegs.&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=195</id>
		<title>Panel Display</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=195"/>
		<updated>2025-09-06T23:58:14Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Panel Display&#039;&#039;&#039; is one of five components that can only be placed through [[Circuit_Board|circuit boards]]. The Panel Display is generally used analogously to the [[Display]] component, but due to the fact its input peg is on the other side of a panel, it is often used to hide internal wiring in displays.&lt;br /&gt;
&lt;br /&gt;
The Panel Display is about &amp;lt;math&amp;gt;2 \frac{1}{6}&amp;lt;/math&amp;gt;tiles long, 1 tile in width, and 1 tile in height (65cm by 30cm by 30cm, see [[Measurements|in-game measurements]]).&amp;lt;!-- TODO: create and link an in-game measurements article --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Behaviour ==&lt;br /&gt;
When a Panel Display is configured to have a single input, the color of its display is blank when its input is &#039;&#039;&#039;off&#039;&#039;&#039;, and colored when its input is &#039;&#039;&#039;on&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When a Panel Display is configured to have multiple inputs, the color of its display is blank when all inputs are &#039;&#039;&#039;off&#039;&#039;&#039;, and a color determined by its [[palette]] when any of its inputs are on. The inputs are read as a binary number, where the shortest input peg is the least significant bit, and the longest input peg is the most significant, this number then corresponds to the index in its specified [[Palette|color palette]].&lt;br /&gt;
&lt;br /&gt;
== Timing ==&lt;br /&gt;
The Panel Display changes its display one tick after its input is changed.&lt;br /&gt;
&lt;br /&gt;
== Configurability ==&lt;br /&gt;
The Panel Display can be configured in two ways:&lt;br /&gt;
&lt;br /&gt;
* Its amount of input pegs can be changed via a &#039;Input Count&#039; slider, which ranges from 1 to 3 at its default size, and a maximum of 9 if resized. The default amount of input pegs is 1.&lt;br /&gt;
* Its [[Palette|color palette]] can be specified from the list of palettes in that world. Note that you can add or change palettes by clicking the &#039;Edit Configurations&#039; button.&lt;br /&gt;
&lt;br /&gt;
== Resizability ==&lt;br /&gt;
The Panel Display can be resized from a default 1 by 1 size, to 12 by 12.&lt;br /&gt;
&lt;br /&gt;
If the Panel Display is at least 2 by 2 in size, its input pegs can be increased from a maximum of 3 to a maximum of 9.&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
Unlike its counterpart, the [[Display]], the Panel Display can have up to 9 input pegs when resized from its default size, whereas the [[Display]] can only have up to 4 input pegs.&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=190</id>
		<title>Panel Display</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=190"/>
		<updated>2025-09-06T23:51:11Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[:File:Panel Display thumbnail render.png|Panel Display thumbnail render.png]]The &#039;&#039;&#039;Panel Display&#039;&#039;&#039; is one of five components that can only be placed through [[Circuit_Board|circuit boards]]. The Panel Display is generally used analogously to the [[Display]] component, but due to the fact its input peg is on the other side of a panel, it is often used to hide internal wiring in displays.&lt;br /&gt;
&lt;br /&gt;
The Panel Display is about &amp;lt;math&amp;gt;2 \frac{1}{6}&amp;lt;/math&amp;gt;tiles long, 1 tile in width, and 1 tile in height (65cm by 30cm by 30cm, see [[Measurements|in-game measurements]]).&amp;lt;!-- TODO: create and link an in-game measurements article --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Behaviour ==&lt;br /&gt;
When a Panel Display is configured to have a single input, the color of its display is blank when its input is &#039;&#039;&#039;off&#039;&#039;&#039;, and colored when its input is &#039;&#039;&#039;on&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When a Panel Display is configured to have multiple inputs, the color of its display is blank when all inputs are &#039;&#039;&#039;off&#039;&#039;&#039;, and a color determined by its [[palette]] when any of its inputs are on. The inputs are read as a binary number, where the shortest input peg is the least significant bit, and the longest input peg is the most significant, this number then corresponds to the index in its specified [[Palette|color palette]].&lt;br /&gt;
&lt;br /&gt;
== Timing ==&lt;br /&gt;
The Panel Display changes its display one tick after its input is changed.&lt;br /&gt;
&lt;br /&gt;
== Configurability ==&lt;br /&gt;
The Panel Display can be configured in two ways:&lt;br /&gt;
&lt;br /&gt;
* Its amount of input pegs can be changed via a &#039;Input Count&#039; slider, which ranges from 1 to 3 at its default size, and a maximum of 9 if resized. The default amount of input pegs is 1.&lt;br /&gt;
* Its [[Palette|color palette]] can be specified from the list of palettes in that world. Note that you can add or change palettes by clicking the &#039;Edit Configurations&#039; button.&lt;br /&gt;
&lt;br /&gt;
== Resizability ==&lt;br /&gt;
The Panel Display can be resized from a default 1 by 1 size, to 12 by 12.&lt;br /&gt;
&lt;br /&gt;
If the Panel Display is at least 2 by 2 in size, its input pegs can be increased from a maximum of 3 to a maximum of 9.&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
Unlike its counterpart, the [[Display]], the Panel Display can have up to 9 input pegs when resized from its default size, whereas the [[Display]] can only have up to 4 input pegs.&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=189</id>
		<title>Panel Display</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=189"/>
		<updated>2025-09-06T23:50:07Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: Added thumbnail image&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:[[:File:Panel Display thumbnail render.png|Panel Display thumbnail render.png]]]]The &#039;&#039;&#039;Panel Display&#039;&#039;&#039; is one of five components that can only be placed through [[Circuit_Board|circuit boards]]. The Panel Display is generally used analogously to the [[Display]] component, but due to the fact its input peg is on the other side of a panel, it is often used to hide internal wiring in displays.&lt;br /&gt;
&lt;br /&gt;
The Panel Display is about &amp;lt;math&amp;gt;2 \frac{1}{6}&amp;lt;/math&amp;gt;tiles long, 1 tile in width, and 1 tile in height (65cm by 30cm by 30cm, see [[Measurements|in-game measurements]]).&amp;lt;!-- TODO: create and link an in-game measurements article --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Behaviour ==&lt;br /&gt;
When a Panel Display is configured to have a single input, the color of its display is blank when its input is &#039;&#039;&#039;off&#039;&#039;&#039;, and colored when its input is &#039;&#039;&#039;on&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When a Panel Display is configured to have multiple inputs, the color of its display is blank when all inputs are &#039;&#039;&#039;off&#039;&#039;&#039;, and a color determined by its [[palette]] when any of its inputs are on. The inputs are read as a binary number, where the shortest input peg is the least significant bit, and the longest input peg is the most significant, this number then corresponds to the index in its specified [[Palette|color palette]].&lt;br /&gt;
&lt;br /&gt;
== Timing ==&lt;br /&gt;
The Panel Display changes its display one tick after its input is changed.&lt;br /&gt;
&lt;br /&gt;
== Configurability ==&lt;br /&gt;
The Panel Display can be configured in two ways:&lt;br /&gt;
&lt;br /&gt;
* Its amount of input pegs can be changed via a &#039;Input Count&#039; slider, which ranges from 1 to 3 at its default size, and a maximum of 9 if resized. The default amount of input pegs is 1.&lt;br /&gt;
* Its [[Palette|color palette]] can be specified from the list of palettes in that world. Note that you can add or change palettes by clicking the &#039;Edit Configurations&#039; button.&lt;br /&gt;
&lt;br /&gt;
== Resizability ==&lt;br /&gt;
The Panel Display can be resized from a default 1 by 1 size, to 12 by 12.&lt;br /&gt;
&lt;br /&gt;
If the Panel Display is at least 2 by 2 in size, its input pegs can be increased from a maximum of 3 to a maximum of 9.&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
Unlike its counterpart, the [[Display]], the Panel Display can have up to 9 input pegs when resized from its default size, whereas the [[Display]] can only have up to 4 input pegs.&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Measurements&amp;diff=171</id>
		<title>Measurements</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Measurements&amp;diff=171"/>
		<updated>2025-09-06T23:35:36Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: Initial creation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are two main ways components and circuits can be measured in Logic World:&lt;br /&gt;
&lt;br /&gt;
* Tiles&lt;br /&gt;
* Real world measurements&lt;br /&gt;
&lt;br /&gt;
Tiles are the most widely used measurement in Logic World Due to the fact that they are the easiest measurement to use. Simply, one square in the world (on a circuit board, or on the ground, in a gridlands world), is one tile wide and one tile tall.&lt;br /&gt;
&lt;br /&gt;
Real world measurements are also used in Logic World. Every tile is exactly equal to 30 centimetres.&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=151</id>
		<title>Panel Display</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=151"/>
		<updated>2025-09-06T23:29:41Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: Added hyperlinks to other wiki pages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Panel Display&#039;&#039;&#039; is one of five components that can only be placed through [[circuit boards]]. The Panel Display is generally used analagously to the [[Display]] component, but due to the fact its input peg is on the other side of a panel, it is often used to hide internal wiring in displays.&lt;br /&gt;
&lt;br /&gt;
The Panel Display is about &amp;lt;math&amp;gt;2 \frac{1}{6}&amp;lt;/math&amp;gt;tiles long, 1 tile in width, and 1 tile in height (65cm by 30cm by 30cm, see [[Measurements|in-game measurements]]).&amp;lt;!-- TODO: create and link an in-game measurements article --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Behaviour ==&lt;br /&gt;
When a Panel Display is configured to have a single input, the color of its display is blank when its input is &#039;&#039;&#039;off&#039;&#039;&#039;, and colored when its input is &#039;&#039;&#039;on&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When a Panel Display is configured to have multiple inputs, the color of its display is blank when all inputs are &#039;&#039;&#039;off&#039;&#039;&#039;, and a color determined by its [[palette]] when any of its inputs are on. The inputs are read as a binary number, where the shortest input peg is the least significant bit, and the longest input peg is the most significant, this number then corresponds to the index in its specified [[Palette|color palette]].&lt;br /&gt;
&lt;br /&gt;
== Timing ==&lt;br /&gt;
The Panel Display changes its display one tick after its input is changed.&lt;br /&gt;
&lt;br /&gt;
== Configurability ==&lt;br /&gt;
The Panel Display can be configured in two ways:&lt;br /&gt;
&lt;br /&gt;
* Its amount of input pegs can be changed via a &#039;Input Count&#039; slider, which ranges from 1 to 3 at its default size, and a maximum of 9 if resized. The default amount of input pegs is 1.&lt;br /&gt;
* Its [[Palette|color palette]] can be specified from the list of palettes in that world. Note that you can add or change palettes by clicking the &#039;Edit Configurations&#039; button.&lt;br /&gt;
&lt;br /&gt;
== Resizability ==&lt;br /&gt;
The Panel Display can be resized from a default 1 by 1 size, to 12 by 12.&lt;br /&gt;
&lt;br /&gt;
If the Panel Display is at least 2 by 2 in size, its input pegs can be increased from a maximum of 3 to a maximum of 9.&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
Unlike its counterpart, the [[Display]], the Panel Display can have up to 9 input pegs when resized from its default size, whereas the [[Display]] can only have up to 4 input pegs.&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=113</id>
		<title>Panel Display</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=113"/>
		<updated>2025-09-06T23:26:45Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: Changed &amp;#039;panel&amp;#039; to &amp;#039;circuit board&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Panel Display&#039;&#039;&#039; is one of five components that can only be placed through circuit boards. The Panel Display is generally used analagously to the Display component, but due to the fact its input peg is on the other side of a panel, it is often used to hide internal wiring in displays.&lt;br /&gt;
&lt;br /&gt;
The Panel Display is about &amp;lt;math&amp;gt;2 \frac{1}{6}&amp;lt;/math&amp;gt;tiles long, 1 tile in width, and 1 tile in height (65cm by 30cm by 30cm, see in-game measurements).&amp;lt;!-- TODO: create and link an in-game measurements article --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Behaviour ==&lt;br /&gt;
When a Panel Display is configured to have a single input, the color of its display is blank when its input is &#039;&#039;&#039;off&#039;&#039;&#039;, and colored when its input is &#039;&#039;&#039;on&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When a Panel Display is configured to have multiple inputs, the color of its display is blank when all inputs are &#039;&#039;&#039;off&#039;&#039;&#039;, and a color determined by its palette when any of its inputs are on. The inputs are read as a binary number, where the shortest input peg is the least significant bit, and the longest input peg is the most significant, this number then corresponds to the index in its specified color palette.&lt;br /&gt;
&lt;br /&gt;
== Timing ==&lt;br /&gt;
The Panel Display changes its display one tick after its input is changed.&lt;br /&gt;
&lt;br /&gt;
== Configurability ==&lt;br /&gt;
The Panel Display can be configured in two ways:&lt;br /&gt;
&lt;br /&gt;
* Its amount of input pegs can be changed via a &#039;Input Count&#039; slider, which ranges from 1 to 3 at its default size, and a maximum of 9 if resized. The default amount of input pegs is 1.&lt;br /&gt;
* Its color palette can be specified from the list of palettes in that world. Note that you can add or change palettes by clicking the &#039;Edit Configurations&#039; button.&lt;br /&gt;
&lt;br /&gt;
== Resizability ==&lt;br /&gt;
The Panel Display can be resized from a default 1 by 1 size, to 12 by 12.&lt;br /&gt;
&lt;br /&gt;
If the Panel Display is at least 2 by 2 in size, its input pegs can be increased from a maximum of 3 to a maximum of 9.&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
Unlike its counterpart, the Display, the Panel Display can have up to 9 input pegs when resized from its default size, whereas the Display can only have up to 4 input pegs.&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=111</id>
		<title>Panel Display</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=111"/>
		<updated>2025-09-06T23:23:38Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: Changed &amp;#039;input&amp;#039; to &amp;#039;index&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Panel Display&#039;&#039;&#039; is one of five components that can only be placed on panels. The Panel Display is generally used analagously to the Display component, but due to the fact its input peg is on the other side of a panel, it is often used to hide internal wiring in displays.&lt;br /&gt;
&lt;br /&gt;
The Panel Display is about &amp;lt;math&amp;gt;2 \frac{1}{6}&amp;lt;/math&amp;gt;tiles long, 1 tile in width, and 1 tile in height (65cm by 30cm by 30cm, see in-game measurements).&amp;lt;!-- TODO: create and link an in-game measurements article --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Behaviour ==&lt;br /&gt;
When a Panel Display is configured to have a single input, the color of its display is blank when its input is &#039;&#039;&#039;off&#039;&#039;&#039;, and colored when its input is &#039;&#039;&#039;on&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When a Panel Display is configured to have multiple inputs, the color of its display is blank when all inputs are &#039;&#039;&#039;off&#039;&#039;&#039;, and a color determined by its palette when any of its inputs are on. The inputs are read as a binary number, where the shortest input peg is the least significant bit, and the longest input peg is the most significant, this number then corresponds to the index in its specified color palette.&lt;br /&gt;
&lt;br /&gt;
== Timing ==&lt;br /&gt;
The Panel Display changes its display one tick after its input is changed.&lt;br /&gt;
&lt;br /&gt;
== Configurability ==&lt;br /&gt;
The Panel Display can be configured in two ways:&lt;br /&gt;
&lt;br /&gt;
* Its amount of input pegs can be changed via a &#039;Input Count&#039; slider, which ranges from 1 to 3 at its default size, and a maximum of 9 if resized. The default amount of input pegs is 1.&lt;br /&gt;
* Its color palette can be specified from the list of palettes in that world. Note that you can add or change palettes by clicking the &#039;Edit Configurations&#039; button.&lt;br /&gt;
&lt;br /&gt;
== Resizability ==&lt;br /&gt;
The Panel Display can be resized from a default 1 by 1 size, to 12 by 12.&lt;br /&gt;
&lt;br /&gt;
If the Panel Display is at least 2 by 2 in size, its input pegs can be increased from a maximum of 3 to a maximum of 9.&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
Unlike its counterpart, the Display, the Panel Display can have up to 9 input pegs when resized from its default size, whereas the Display can only have up to 4 input pegs.&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=110</id>
		<title>Panel Display</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=110"/>
		<updated>2025-09-06T23:20:26Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: Added resizability section, and subsequent changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Panel Display&#039;&#039;&#039; is one of five components that can only be placed on panels. The Panel Display is generally used analagously to the Display component, but due to the fact its input peg is on the other side of a panel, it is often used to hide internal wiring in displays.&lt;br /&gt;
&lt;br /&gt;
The Panel Display is about &amp;lt;math&amp;gt;2 \frac{1}{6}&amp;lt;/math&amp;gt;tiles long, 1 tile in width, and 1 tile in height (65cm by 30cm by 30cm, see in-game measurements).&amp;lt;!-- TODO: create and link an in-game measurements article --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Behaviour ==&lt;br /&gt;
When a Panel Display is configured to have a single input, the color of its display is blank when its input is &#039;&#039;&#039;off&#039;&#039;&#039;, and colored when its input is &#039;&#039;&#039;on&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When a Panel Display is configured to have multiple inputs, the color of its display is blank when all inputs are &#039;&#039;&#039;off&#039;&#039;&#039;, and a color determined by its palette when any of its inputs are on. The inputs are read as a binary number, where the shortest input peg is the least significant bit, and the longest input peg is the most significant, this number then corresponds to the input in its specified color palette.&lt;br /&gt;
&lt;br /&gt;
== Timing ==&lt;br /&gt;
The Panel Display changes its display one tick after its input is changed.&lt;br /&gt;
&lt;br /&gt;
== Configurability ==&lt;br /&gt;
The Panel Display can be configured in two ways:&lt;br /&gt;
&lt;br /&gt;
* Its amount of input pegs can be changed via a &#039;Input Count&#039; slider, which ranges from 1 to 3 at its default size, and a maximum of 9 if resized. The default amount of input pegs is 1.&lt;br /&gt;
* Its color palette can be specified from the list of palettes in that world. Note that you can add or change palettes by clicking the &#039;Edit Configurations&#039; button.&lt;br /&gt;
&lt;br /&gt;
== Resizability ==&lt;br /&gt;
The Panel Display can be resized from a default 1 by 1 size, to 12 by 12.&lt;br /&gt;
&lt;br /&gt;
If the Panel Display is at least 2 by 2 in size, its input pegs can be increased from a maximum of 3 to a maximum of 9.&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
Unlike its counterpart, the Display, the Panel Display can have up to 9 input pegs when resized from its default size, whereas the Display can only have up to 4 input pegs.&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=105</id>
		<title>Panel Display</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=105"/>
		<updated>2025-09-06T23:14:44Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: Added trivia section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Panel Display&#039;&#039;&#039; is one of five components that can only be placed on panels. The Panel Display is generally used analagously to the Display component, but due to the fact its input peg is on the other side of a panel, it is often used to hide internal wiring in displays.&lt;br /&gt;
&lt;br /&gt;
The Panel Display is about &amp;lt;math&amp;gt;2 \frac{1}{6}&amp;lt;/math&amp;gt;tiles long, 1 tile in width, and 1 tile in height (65cm by 30cm by 30cm, see in-game measurements).&amp;lt;!-- TODO: create and link an in-game measurements article --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Behaviour ==&lt;br /&gt;
When a Panel Display is configured to have a single input, the color of its display is blank when its input is &#039;&#039;&#039;off&#039;&#039;&#039;, and colored when its input is &#039;&#039;&#039;on&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When a Panel Display is configured to have multiple inputs, the color of its display is blank when all inputs are &#039;&#039;&#039;off&#039;&#039;&#039;, and a color determined by its palette when any of its inputs are on. The inputs are read as a binary number, where the shortest input peg is the least significant bit, and the longest input peg is the most significant, this number then corresponds to the input in its specified color palette.&lt;br /&gt;
&lt;br /&gt;
== Timing ==&lt;br /&gt;
The Panel Display changes its display one tick after its input is changed.&lt;br /&gt;
&lt;br /&gt;
== Configurability ==&lt;br /&gt;
The Panel Display can be configured in two ways:&lt;br /&gt;
&lt;br /&gt;
* Its amount of input pegs can be changed via a &#039;Input Count&#039; slider, which ranges from 1 to 3, and is 1 by default.&lt;br /&gt;
* Its color palette can be specified from the list of palettes in that world. Note that you can add or change palettes by clicking the &#039;Edit Configurations&#039; button.&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
Unlike its counterpart, the Display, the Panel Display can have up to 9 input pegs when resized from its default size, whereas the Display can only have up to 4 input pegs.&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
	<entry>
		<id>https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=103</id>
		<title>Panel Display</title>
		<link rel="alternate" type="text/html" href="https://wiki.logic.world/index.php?title=Panel_Display&amp;diff=103"/>
		<updated>2025-09-06T23:09:53Z</updated>

		<summary type="html">&lt;p&gt;Lawrziepan: Initial creation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Panel Display&#039;&#039;&#039; is one of five components that can only be placed on panels. The Panel Display is generally used analagously to the Display component, but due to the fact its input peg is on the other side of a panel, it is often used to hide internal wiring in displays.&lt;br /&gt;
&lt;br /&gt;
The Panel Display is about &amp;lt;math&amp;gt;2 \frac{1}{6}&amp;lt;/math&amp;gt;tiles long, 1 tile in width, and 1 tile in height (65cm by 30cm by 30cm, see in-game measurements).&amp;lt;!-- TODO: create and link an in-game measurements article --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Behaviour ==&lt;br /&gt;
When a Panel Display is configured to have a single input, the color of its display is blank when its input is &#039;&#039;&#039;off&#039;&#039;&#039;, and colored when its input is &#039;&#039;&#039;on&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When a Panel Display is configured to have multiple inputs, the color of its display is blank when all inputs are &#039;&#039;&#039;off&#039;&#039;&#039;, and a color determined by its palette when any of its inputs are on. The inputs are read as a binary number, where the shortest input peg is the least significant bit, and the longest input peg is the most significant, this number then corresponds to the input in its specified color palette.&lt;br /&gt;
&lt;br /&gt;
== Timing ==&lt;br /&gt;
The Panel Display changes its display one tick after its input is changed.&lt;br /&gt;
&lt;br /&gt;
== Configurability ==&lt;br /&gt;
The Panel Display can be configured in two ways:&lt;br /&gt;
&lt;br /&gt;
* Its amount of input pegs can be changed via a &#039;Input Count&#039; slider, which ranges from 1 to 3, and is 1 by default.&lt;br /&gt;
* Its color palette can be specified from the list of palettes in that world. Note that you can add or change palettes by clicking the &#039;Edit Configurations&#039; button.&lt;/div&gt;</summary>
		<author><name>Lawrziepan</name></author>
	</entry>
</feed>