Hey there fellow red Stoners Charlie from one of the games here and today we’re going over arithmetic logic units alus and what an arithmetic logic unit is it’s basically a unit that does arithmetic and logic out of arithmetic it does addition and subtraction out of logic it does and Axor or and the Universe of those now as the starter for this tutorial I’ll be explaining all of the functions and how they can work together in a simpler much less work through design and if you want to see the better one just skip to the time on screen now So this is the base of our first Adder as you see down here this is the half adder and that is the second half adder how it works is that this is a basic xor gate and then it instantly Powers into a comparator no matter the input but if The xor is active it makes that not activate which creates a and b over here we have a xorbee now to do that and since that is a half adder we just connect that well we order the ands right which is carry out and we put the other exponent to another Xor which has carrion right here which is going to be output and for A and B I can just pull it out like that for those of you that are confused let’s see this in action Now since we do need the carry to pass over the output you will be using a system like this it uses this type of stacking as you see those do not interfere with each other I’ll order these here and that looks something like this I redid this a bit so the competitors Looping through itself and causing cause a clock but this goes over here under there and it passes through it goes two blocks up here as that is required for the carries as they don’t get the same level so after connecting everything up this is our ALU well it’s almost an ALU it’s Not completely finished yet as you see here we have a and b a plus b and a X or B adding a simple cancellation system on the three outputs we are now ready to connect them together how this will work is that and plus xor together will produce or we still need To of course invert this value so for that we are going to add an exord right here so after adding a few blocks to make it stackable input inversion and the output inversion we are now ready to stack this thing and as we will see that is a mostly functional ALU Now why don’t we give this thing a try as you see I’ve inputed the entire logic table one one zero one one zero and zero zero why don’t we go try and and as we should see only the top bit turns on if you wanted to do for example nand You would just invert that output now let’s do five plus three we input five we input three and as you see there is no output because we have a third edition yet but then there is five which wanted to do five minus three we simply inverted like the second input so three And do the carry and now well that is a very nice and simple way to do an ALU there is many improvements that can be done and will be going over that shortly for example this one use current uses carry cancel addition and it also will it’s overall It’s way faster and it reuses a lot of logic now as the base of our ALU we will be using a circuit like this as you see this is just a basic xor gate with two small additions the first one is an and gate it uses very basic logic basically It modifies the xor value output so that when it is or the xor can cancel it it’s very simple and as a second thing we have this this basically allows it to be an or the oxor turns into an ore uh and this would be or this would be xor Now if we check this xor that is ADD and if I simply turn on or you see that no matter what I do the and do a lot go off that whole function as an or now how is this useful to us well it’s very useful as you may or may not know And carry cancel one one would be starting the carries but when we’re doing logic we don’t want carries so canceling this is perfect for us now as you see here I have connected the and into a tower and over here we have the knot the knot is also going to be in The tower this way so here we have the calculated carry and ax or B now we could just exhort these but actually that is wrong because the carry is for the next bit so we have to take this input all this output and we Have to shift it two blocks up how we do this is just using glass foreign so connecting the carries like that I rippled it into the side so it’s more compact you can simply add another xor and boom that’s our finished Lu and how does it work it uses carry cancel if you Don’t understand that you can just check it on a different people a different person’s video so I suggest mad bad wings now there’s a few things that are missing mainly control lines so I’m going to stack this and then we can check up on that now the track could be Wired the condition properly let’s do three the last five which is eight now there is two more things we have to add firstly a flood carry for the logic and secondly xores on inputs A and B now this is a fully functional elu how do we Prove that well let’s do a test how would we do and on this thing first of all we have to enable logic operations which is by making this or which disables the carries now if we invert all both of the inputs they’re gonna constantly be up inputting one Until you input something into both of them and if we invert the output by simply doing the FC the blood carry this is and so if we check let’s do all I did with the levers here but yeah we should see only the third bit as we see that is true light up Now how these operations work is with something like this with just three xores and an or this right here you can simulate any logic gate for example this is a and b this would be or invite them to invert both of these but not the output this would be land And this would just be and now a little bit of confusion may arise as of how we do X or on this thing as you see I turned on addition now I’m gonna flood the carriers and I’m gonna invert B this is our xor and as you do see just one sit on And both of them shut it off now of course there are ways to improve upon this ALU but I personally hope you find this video useful and that you will grow up on upon the knowledge yourself uh that’s everything I have to say about this uh for this video hopefully I’ll be Having more videos coming out I’ve took a pretty big break which is bad since I practically just started out but uh we’ll make it through it we’ll make it through uh thanks for watching and have a good day bye foreign Video Information
This video, titled ‘Arithmetic Logic Units with Redstone’, was uploaded by iPlayGames on 2022-10-07 18:59:26. It has garnered views and [vid_likes] likes. The duration of the video is or seconds.
Today I made and explained a so called ALU, which performs logical and arithmetic operations! MATTBATWINGS’ LOGICAL …