Build a Ripple Carry Adder in Minecraft (Ft. WildEngineering)

IGN’s Greatest Mines is here to teach you how Minecraft can help you take your first steps towards becoming a fully fledged engineer! Think you’ve got what it takes to get creative? Join @WildEngineering as he teaches us the basics of base systems, how logic gates work, and how to use the binary system with a logic gate to create an adder. This is all just the beginning of your adventure in exploring the possibilities of redstone and real world circuitry!

Presented by the United States Air Force.

#IGN #Gaming

Welcome to IGN's greatest Minds in this Four part series we'll show you how Minecraft yes Minecraft can put you on The path to becoming a fully fledged Engineer but since I have no idea what I'm doing I've invited wild engineering A redstone specialist to build us up see What I did there we'll Kickstart your Engineering journey by teaching you how To build a binary Adder it may not sound Like much but have you ever built one I Have it Brought to you by the U.S Air Force There are many ways to serve in uniform And Out full time or part-time learn More at Hi everybody I'm the wild Jarvis from Wild engineering here to show you how You can use Redstone to create basic Logic gates like these and then use Those building blocks to make something Much more complex By the end of this series you'll have The tools to build something truly Amazing and I don't want to give away Too much just yet so let's first break Down what we're covering today in this Video we'll be learning about base Systems binary logic gates which are a Building block for digital circuits Binary Edition and then building a Ripple carry Adder which is also known As an RCA these tools are essential in Understanding the concepts for our

Upcoming episodes now for the Uninitiated Redstone Dust acts as our Wiring in Minecraft it has a maximum Distance of 15 blocks and it acts as a Logical ore meaning by itself it will Output a signal as long as one of the Inputs is active there are tons of other Components you can use to change how Redstone inputs and outputs work like Redstone targets repeaters torches and More Okay now that we're familiar with Redstone items let's talk about base Systems there's two main types we'll be Working with in our builds base 10 also Known as decimal is the main system we Use every day it has 10 values zero Through nine and these values can be Multiplied by weights or powers of 1 10 100 and so on which we can visualize on These columns for example 10 to the 0 Makes 1 10 to the 1 makes 10 and 10 Squared makes a hundred so base 10 takes Those values of 0 through 9 and Multiplies them by those weights so Let's say I wanted to get 325 how would We make that happen well we need five Ones two tens and three one hundreds From left to right that would mean we're Taking 3 times 10 squared plus two times Ten to the first plus 5 times 10 to the 0 which equals 325. That was base 10. now let's talk about Base 2 which is also known as binary

Base 2 uses two values 0 and 1. these Can be multiplied by weights that use Powers of two like decimal we start with The power of zero anything to the power Of zero equals one then two to the one Makes two and then two to the two is Four so let's say I want to make the Number five and I can only take one of These columns or none of them I know I Need one four so I could put a one in The two to the two column we don't need A two so we can place a zero in the two To the one column and then we need a one So we can place a one in the two to the Zero column so that tells us that 5 in Binary is one zero one now if you see Zero one zero one or zero zero one zero One those are also five the amount of Leading zeros doesn't change our final Result let's say we're trying to get to The number three that would mean I need A two and a one meaning in binary that Would be a zero one one base two is a Little less complex in base ten since You either have a column or you don't This makes Computing using base two a Lot simpler With the bass systems all squared away We're moving on to logic gates these are The basic building blocks for creating Circuits that give direction and a set Of rules for an input and an output We'll start off with a not gate these Are built by using a torch which acts as

The gate itself when you power the gate The output is the opposite State as the Input so if the input is a 1 the output Becomes a zero and vice versa if the Input is zero the output becomes a one Next we're looking at or Gates this will Have two inputs and one output in this Case the output will be true when any One of the inputs is active or if both Are now we can create any other type of Gate by adding our not gate on either The inputs or the output of our or gate So let's try that out first let's put The not gate on the output of the or Gate this is what we call a nor gate Which has its output on by default which Is an inverted logical output compared To our or gate this means that the Output will be off whenever any one of The inputs is active or if both are Let's try it with the inputs inverted You'll notice that the output is on by Default but this time only turns off if Both inputs are true we call this kind Of logic 8 a nand gate next for an and Gate we'll use three torches as Inverters and you'll notice that the Output is only true if both inputs are True Now we're going into Gates that are a Little bit more complicated we're going To modify the or gate and make it so That when you have both inputs on the Output turns off that's called an

Exclusive or gate or xor for short and It's what allows us to do a bunch of Things like addition to make that let's Create an alpha repeater which is an Inverter that feeds an inverter which in Turn creates a repeater we'll put two of Them next to each other which makes them Work like an or gate now we want to find A way to cancel the output signal to act As if we added a third input making it So in both inputs are true the output is Disabled we can do that by adding an and Gate to cancel the output when both Inputs are on you can place torches in Several different spots but for now We'll keep them up top for Simplicity Now the output is only active when one Input or the other is true but not when Both or neither are Finally xnor gates are a tool we'll be Using later down the line we'll start With an infinity sign layout placing our Repeaters and torches and then we're Going to use a slab or transparent Blockly glass to move the signal up and Down this top part will act like our and Portion while the middle repeaters Create or which we can turn it to nor by Adding a torch at the end to invert the Signal We'll add a block and or the Outputs of nor and and to create xnor I know that was a lot at once but what's Important to note is that this creates a Two-tick synchronous machine since it

Takes one tick here and there and one Take it there and there which or there Both of which or there at the same time All that makes it so that the output is Only off when one input or the other but Not both are enabled let's add some Lamps on the input so we can see it in Action if we enable one the output turns Off the same effect if we enable the Other but if we do both the output is Back on the exact opposite of the export Date now when we have both inputs Enabled we can also use our and gate That comes from the bottom which will be Useful later on in our tutorial Foreign Now that we have our building blocks for Circuits all squared away let's put them To use but first let's talk about binary Edition and how it works here we have a Simple grade school layout where we can Have two numbers at the top and an area At the bottom for our results we're Going to have a 4-bit number plus a 4-bit number as you can see since we Have those numbers at the top here eight Four two one so let's try an example I'm Going to add three plus five showing off My ones is blue and my zeros as gray so Here we have three plus five let's add It starting from the right one plus one Equals two but we can't write a two at The bottom so we're going to put a zero And carry the one over on the next line

Zero plus one equals one one plus one Equals two which means we're going to Put another zero as a result and then Carry the one over next line is the same Deal one plus zero equals one one plus One equals two meaning we'll put another Zero and carry the one over finally We'll get to zero plus zero plus one Which equals one so we'll place a one in That result all that together shows us That three plus five equals eight and The leftmost column is equal to eight so The addition worked out as expected now It's time to see how we can build this Using Hardware We'll need to detect when both of the Input bits are true like our and gate Does plus we'll also need an and gate For our carry bit so we know if we need To carry again let's just say we had a Case where we're adding zero zero one One and zero one one instead instead we Would have a carry and then a one plus One plus one which equals a one and a Carry the next one would be a zero and Then a one so we can see that seven plus Three is equal to 10 which is also true Lastly we also need to know when to Create a sum of it we know how to carry And when we get the and gate between the Inputs or the carry and the sum of the Previous inputs but how do we get the Sum that's an xor since it gets one Input or the other but when it gets two

Inputs we want it to carry over to the Next column so let's see it in action Foreign To start building our Adder we'll Replicate our xor that we built earlier This one is pretty simple to remember Since you can think of it as an X and Modify the ends we're adding some Torches at the front as well and if we Extend the front we can chain this build Into another gate if we wanted to our Inputs will be the switches on this end But we're going to need to build Something to carry on to the next we'll Need something to chain into our output We can build that like this making that Signal able to be blocked but we put This torch up here because we want that Signal there but we don't want it to orb With the signal on the other side so we Can block that by adding another block Next to it next we can build another xor Over here remember it looks like an X With some modifications at the end and This time we can leave the Torches there Since we don't need a carry connect them With redstone dust and we'll get the sum Output of our Ripple carry either the Last thing we need for this one is the And gate that we mentioned previously Which we can add by placing a torch here We can set up a carryout and our carry In bits and we can add some lamps for Our inputs as well so we can do one plus

Zero equals one One plus one is two And one plus one plus the previous input Is three Everything is working so I'm going to Use wireless to select these portions And stack them three times since we Already have one and you'll see that the Outputs chained perfectly into the Inputs of the next with very minimal Effort pretty simple So now we can label the inputs a0 and b0 We're labeling them this way since They're two to the zero which is a value Of one next A1 and B1 which have a value Of two then A2 and B2 and finally A3 and B3 which is two to the three so we have Our eights fours twos and ones so if I Wanted to make a number five I would Switch on a0 and A2 which is four plus One If I wanted the value 3 I'd switch on b0 And B1 so now you'll see the output is 8 Which is the same answer we got when we Used our chalkboard example previously Let's clear the adder and flip all the a Inputs to one meaning a total of 15 and We flip the carry in watch what happens To the output This is why it's referred to as a ripple Carry Adder you'll notice there is a bit Of delay there that's because this and Gate takes two ticks to realize it needs To turn on which changes the next and

Gate that also needs two ticks to Realize it has to turn on so on and so Forth so the biggest issue with this Adder is that as you add more bits it Takes a long time to produce your Results So how can we make this more efficient You'll need to tune into the next Episode to find out Thank you so much to Wild engineering For teaching us the basics of base Systems how logic gates work and how to Use the binary system with a logic gate To create an Adder this is all just the Beginning of your adventure in exploring The possibilities of redstone and real World circuitry in our next episode We'll be adding onto our Adder to be More efficient as well as pose another Question like can we make this binary Device easier to read find out more next Time on IGN's greatest Minds Foreign

You May Also Like