Template:Mcrs diagrams
WARNING: Since now I am part of AngryCookieGames team, I am rolling a YouTube series that explain everything about redstone. Further in the series, I will get to the calculator how-to.
This is my first big Minecraft project, and also it is the first time I will be explaining this to others. If I will not explain clearly, you should check the tutorials I am based on.
Resume
这是我目前已经建立的计算器计划:
计算器计划
计算器计划
當然,所有的编译都是用二进制的形式。這就是為什麼我們有很多不同的解碼器。
目前的零件
I will try to go in a somewhat logic order to describe the parts.
我会努力的去用点逻辑顺序来描述零件。
控制面板(室)
控制面板是你设置输入和决定操作的房间。
数字输入面板
数字输入面板
在这里,用户将决定他要用什么号码。现在,我使用基于拉杆的二进制输入系统,所以用户必须分解他想用的数为二进制。
计算面板
在这个面板,用户要从各个运算符号之间选取他要用的一个:加(+),减(-),乘(*),除(/)。现在,我再次使用拉杆系统。
计算面板
Input Wires (白色和橙色)
这些电线连接输入面板和计算面板到不同的逻辑单元。试着去改变他们的方式让相同的值集合在一起。所以,你的电线看起来应该像这样,从左到右:A1; B1; A2; B2; A4; B4; ...
逻辑单元
这是执行的操作的机器。
加法器/减法器(黄色和红色)
注:在这个计划中,减法器和加法器是分开的。我会尽快修复它。
我已经建立了自己版本的一个加法器/减法器。它的结构很简单,因为它是被调整过的(由许多相同的部件组成)。这意味着,如果你使用更多的位元,你可以只添加更多的部分在側边,但你有时要改变一些链接。
二合一加法器/减法器
在这台机器上,您的输入(二进制)进入底部的全加器(黄色)。每一个加法器需要两个具有相同的值的输入(A和B)。而且,the least significant bit(最重要的一点?)要在左边,所以他们都应该由他们的进位进行连接。基本上,你的输入会像在#Input Wires (白色和橙色)部分中的线。Use basic bridges to pass wires over the others without connecting them.(用基本的桥梁,通过导线连接在别人。?)你的A输入(左边)是被减数(X-Y = Z中的X),会直接传到加法器。你的B输入,减数(X-Y = Z中的Y),它必须通过一个多路复用器,由一个异或门给加法器的反转信号在一个减法的案例。多路复用器是由一个开关控制(图上,开关在左边)。和进入另一个多路复用器,其中,再次,给出了一个反相输入在减法案例。这是一个意味着门(右上方)给出了一个真实的输出,如果开关在“减法”,如果最后一把是真的。这是因为在一个减法,最后进行实际上意味着“-”(减号)标志。
白色的机器是[ [教程/ advanced_redstone_circuits # half_adder |半加法器] ],使用,作为输入,最后的加法器的进位和各自的全加法器的总和。我们需要这个因为,如果答案是否定的,它使用的方程”a!一个(倒一)+ 1”,正如[ [维基百科:加法器–减法器|这里] ]。最后的输出是所有的最上方的电线可以观察,加钢丝在右侧(从最后的全加法器进位)和携带,在第一(左)半加法器,为否定符号。
Basically, your inputs look like the wires in the #Input Wires (white and orange) section. Use basic bridges to pass wires over the others without connecting them. Your A inputs (left) are the minuend (X in X-Y=Z), and go straight in the adders. The B inputs, your subtrahend (Y in X-Y=Z), have to pass through a multiplexer, made out of a modified version of a XOR gate which gives to the adder an inverted signal in case of a subtraction. The multiplexer is controlled by a switch (on the picture, that switch is on the left). The sums go into another multiplexer, which, again, gives an inverted input in case of a subtraction. This is controlled by an IMPLIES gate (in the top right) which gives a true output if the switch is on "Subtraction" AND if the last carry is true. This is required because on a subtraction, that last carry actually means the "-" (minus) sign.
The white machines are half-adders, that use, as inputs, the carry of the last adder and the sum of their respective full adder. We need this because, if the answer is negative, it uses the equation " -A = !A (inverted A)+ 1 ", as explained here.
The final outputs are all of the top-most wires you can observe, plus the wire on the right (the carry from the last full adder) and the carry that goes in the first (left) half-adder, as the negation sign.
乘法器 (浅蓝色)
Let's start with the basics here, because this is the most complicated part. As you should know, if you went to school, multiplication is a repeated addition. That means that, once again, we will use adders here.
Before them, you actually have to set up an AND gate (not including the control one). Its use is simple : in binary multiplication, because we only use 0's and 1's, the only way that we can have an output is by multiplying 1 by 1.
I will go in order from the least to the most significant bits.
Least significant bits :
1*1 = 1. That means that the output of the second AND gate (the control one) goes straight to the output collective wires.
Second to last:
1*2 = 2 and 2*1 = 2.
Those two outputs meet in a full adder. The sum goes to the output, and the carry goes to the next bit.
Next:
1*4 = 4; 2*2 = 4; and 4*1 = 4
The carry from the last bit goes in the first adder as the carry input. The two normal inputs are 2 of the 3 AND gates. The sum of this goes in a second adder, where the second input is the third AND gate. Both carry outs go to the next stage, and the sum goes to the output.
You continue like this until you run out of AND gates, or equations.
除法器(粉红色)
This one is an easy one compared to the multiplication. Again, we will be using the full adders. Basically, for each A input, set up n adders where n=number of B inputs. Also, this time, you have to "reverse them". Now the most significant bit should pass its carry downwards.
Output wires
These have to get every output from every machine and redirect them to the next part.
二进制-十进制解码器
This transforms your binary code into a decimal output. The size of it will be (Binary inputs*2)*(Decimal outputs*2).