Welcome to um our introduction to digital logic um for redstone right uh and this is mostly sort of an introductory thing that lets us sort of combine our can you just yeah you can totally do this on your switch by the way the server does not work for pocket edition Um oh and by the way feel free to throw questions out there whenever as we go this is supposed to be like an interactive workshop right like if you’re in person we just come over and help you but um not letting you join i would hit up the minecraft slack Um or maybe priyanka can help you out more hannah if you’re going to stick around we’ll be here sweet okay awesome um yeah dai and i would just let them know and they might be able to help you out i’m not really involved in the administration of the server itself Um but yes to answer all your questions so for everybody we’re gonna basically be combining um our knowledge or like sort of our interest in computer stuff right um with this redstone system that minecraft offers us now it’s great because we already have this this inbuilt interest In minecraft and we’re already kind of studying maybe you know or interested in computer stuff in school and it’s great because we have this sort of opportunity to converge the two skills that we have um in a really productive and neat way uh in terms of building stuff with Redstone so that’s kind of the focus of what we’re building here i’m going to take us through um some of the basics um kind of build in some of the curriculum that we’ve been looking at in college already and then kind of finish off with some some neat Build ideas and kind of just how to apply what we’ve learned so that being said let’s go ahead and get started but i did want to include this little um this little bit right here just because you know um this is the event that we’re At and i do want to say i do want to mention that i’m sure at this point in time um many or most of us have been victim to toxic treatment harassment um and of course misogyny in video game communities online you know these are notorious for perpetuating uh these sort of Environments now especially i used to play video games a lot ever since i was a kid um and services like you know xbox live playstation network even minecraft servers places like that um i’ve seen my fair share of this stuff right and it’s real it’s a real issue i think we shouldn’t forget That this is something that exists uh and we want you know to get rid of it so i just want to say before we start this workshop first of all i’m so glad that all of you are here and second of all this is important if your interest In video games was ever you know not taken seriously because of who you identified as let’s establish that it’s not going to happen here and of course that you have allies right um and building off of that one more thing generally in computer science right we can sort of generalize this If that was ever not taken seriously because of who you identify as please understand that it won’t happen here you have allies and of course this goes without saying but let’s keep this a safe space so again i’m so glad that everybody is here and i just want to establish that this Is a safe space and our goal should be to expand this to all video game communities um what have you and of course within computer science so just wanted to to throw that out there and make sure we’re all on the same page with that and i’m so glad that you know technique Has given us the opportunity to uh provide this workshop for everybody so that being said uh great thank you just wanted to go ahead and get started get ready to build some damn cool stuff right whoever you are this is you know that’s what we’re going for So what is this workshop right so we have a general idea of what it is um but here’s what we’re gonna sort of get through today first of all we’re gonna go through redstone in minecraft now i’m assuming that everybody here kind of has an idea of what minecraft is but i’ve Written up taking the liberty to write up some literature in case where um oh is is a minecraft piano uh is that coming from my computer by chance i hope it’s not okay oh okay all right i’ll get all good yes okay thanks um but yes so we’re gonna do A quick introduction to redstone and minecraft just because that’s the basis of this whole thing so no worries if you’re starting off with just the basic idea of you know minecraft in general um then we’re going to try to make a bridge right between digital logic and Discrete math which is where we sort of get our computer science stuff right and the aforementioned redstone so i’ve kind of this little graphic here i feel like it’s a good way of explaining what we’re doing here so what we’ve learned in class is on the left side here And then this business minecraft we’ll be talking about a weird blocky video game that your parents don’t understand and building efficient intricate minecraft systems right so we have the neat ability to have this sort of education kind of trickling into us already and we’re going to use minecraft to sort of make You know those to build upon those ideas and make some cool stuff and finally a neat look at what is possible when combining your knowledge as computer oriented individuals and the mechanics provided in minecraft so that’s kind of an overview um so yeah the tl dr is this your computer people But like this video game which means you have excellent taste number one and two you are uniquely positioned to allow your two interests to uh converge so let’s go ahead and do it let’s jump right in right so here’s a more specific list of what we’ll be covering right so first Introduction to redstone everything you need to know kind of like a refresher um then we’re going to build some basic logical circuits with redstone right um and i’ve got some demos that we’ll totally look at gonna build um a circuit called a half or full adder using logic gates right and then we’re Going to apply what we learned um to build these further things or to at least look at examples of uh these further circuits right and the goal here is to kind of make ourselves more efficient at building these structures in redstone and kind of understand the basics of how The system actually works within minecraft and again i just want to say that this this workshop is kind of malleable right if we get um if some part isn’t really like making sense or maybe i went over something too fast feel free to throw it out there and we will totally Go through it cool so who is the person teaching this workshop just wanted to throw this out that this is me i guess since you’re not seeing my face in person there it is that’s my face email address is there um if you have any questions about this at all like after the Workshop or anything just feel free to like mail them to me i have to check my email anyway since i’m a 216da and larry makes us check our email every day twice a day so i will be getting back to you pretty quickly so feel free um And oops wrong tab there we go um so and your host just wanted to throw a little bit of stuff in here about the the people that are teaching this which is me um and it’s just the cmsc 389e class here at maryland so i’ve just condensed some of our lectures into One small workshop so that’s basically who is providing this workshop let’s talk a little bit about minecraft so starting at the beginning minecraft is a voxel-based sandbox game that became widely popular during our childhoods and still enjoys an immense amount of popularity today i just threw this slide in here in case People are joining and have no idea what minecraft is right this link right here which i can i think so i’m gonna copy it and paste it in the slide set here um it’s from our class textbook and it just talks a little bit about you know What is minecraft i’m not gonna dwell too much on it right now um but in case you’re new just figured i’d throw that in there so moving on i’m sure we’re all sort of familiar with the idea of minecraft where you can build whatever you want in an infinitely scaling Universe right and people started off by building castles and buildings and stuff um but another great humongous aspect of this game is well here’s just a picture i figured i’d include this is of um this um rendition of berkeley that berkeley students built last last semester when they couldn’t Graduate in person so they had a hosted a graduation in uh minecraft and that is some chunk of their school that i assume is very important um but still you know that is what people use i guess minecraft for a lot of people just to build um but another great aspect of minecraft Is redstone right and it’s an excellent way to emulate digital logic and circuit design within a video game um and it basically allows us to emulate wiring in the real world except within minecraft affording us constructs like energy sources wires repeaters right and although these constructs within minecraft are not Exact counterparts of real-life circuitry they’re basically close enough for us to use our like csc mines uh to put some cool stuff together right our logic from real life still works on the redstone in this game which is excellent and another great point that i didn’t Put in here is that um we have infinite resources in minecraft if you wanted to build like an analog circular clock in real life you go out to like i don’t know if radio shack’s still a thing but radio shack or something you buy wires put them together get a Breadboard maybe an arduino right that costs money it takes time in minecraft you just put a few things together and you can see a very real representation of this so you know great game great opportunity to learn so what do you do when you combine ultimate unlimited building resources in space A neat wiring system and a few spare hours uh a whole new world i have a little disney disney reference in there and of course my personal answer is mediocre secondary school performance and the crippling video game addiction but i think it was for a good purpose at the End of the day um there’s a little humorous aside there now we’re going to talk a little bit about redstone in a few minutes now i know i’m throwing a lot of words at you i just figured i’d get the intro stuff out of the way but if you haven’t already please take This time to hop on the technica minecraft server the link is right here and hannah has been great enough to throw the ip up on the zoom chat so if even if i go past this slide you can just scroll back up and you’ll find it i see people joining that’s great all You have to do is show up on the server and claim a plot on there and i think so we’ve got organizer priyanka here i think if she’s been on the server she can totally help you out with that we’ll talk a little bit more about that When you get your like first task to actually go through so just go ahead and get on the server if you’re looking to do it on the server otherwise if you’re playing on your switch or console or pocket edition just open up a new world in creative mode and You should be good to go that way all right so here are the blocks we’ll be focusing on what i type in um i typed oh uh oh okay okay so that looks like a question insert stuff going on right continue yeah right so here are the blocks we’ll be Focusing on right um this is where you can find them in the creative mode menu you click the redstone tab right and you should see these different constructs now a lot of the stuff we see in here are super neat things that we can use in minecraft and they Can all be manipulated using redstone right the cool wiring system in this game allows us to either produce signals or receive signals using most of this stuff but the main things that i want to focus on today are the bread and butter redstone the real building blocks of it um so to Speak right oh perfect thanks priyanka that should give you instructions and i think how to get a plot and your own creative section going um so i want everybody to kind of remember these three as the main you know building blocks bread and butter uh of minecraft right And i am on purpose running in windowed mode so i can just kind of go through it i have taken the liberty here to hopefully everybody can see minecraft up i hope yes um perfect thanks so much appreciate it okay um so if you go ahead and open up your Creative mode menu right after you claim a plot so i have claimed this plot for my own i think i can like edit it okay great um and what you can do from here is so i actually so the menu has gone a little bigger than when i took the screenshot Um but you want a redstone torch that’s one uh the redstone dust we’ve got that um and of course the redstone repeater which is floating in here somewhere ah there it is okay redstone repeater so not the exact same place as what i’ve got in the screenshot there but you can Find them in the redstone menu here and this is the stuff that we’ll be focusing on right um so let’s go over a quick overview of the components how do i bring up the chat and settings menu you press e to do an inventory um e inventory Um t for chat and slash for commands so that should that should hopefully be the stuff um the settings menu is esk by the way so here’s our redstone torch right um and i just want everybody to think of this in terms of like digital logic quote unquote On and off that sort of thing um so the redstone torch as you see here is the source of an on signal and if placed in a certain way can be used to invert specific signals right i figured i’d give you a live demonstration just to make it a little easier to understand So let’s take a look at it this way here’s our redstone torch right and as it sits right here um we can note that it produces a positive redstone signal that is the any wire connected to it or any redstone stuff connected to this torch Will be on so we can see that this wire is in an on state as i’ve connected it to the torch and if i remove the torch that wire turns into an off state on the subject of wire let’s uh move on to this next slide redstone wire Right so this is how a signal can be produced there’s just one way and this is how a signal travels right and when we talk about redstone wire if it helps i’d just like you to think of copper wire in real life right what does copper wire do If you provide energy like electricity from one side the copper while copper wire will conduct it and let the electricity run through it right same deal here so think of it this way we place some copper wire down we put a torch here on this left side and that energy Is sort of generated and runs through uh just like that right and again note if i break the connection um then this cover wire here is obviously not powered if it’s doing wire is not powered so nothing’s going through it throw this down again and you’ve got power running through So this is how the signal travels right and we can kind of extend this however we’d like and let that signal um go to anywhere next i do want to mention that wire s2 states on and off right and the strength of the on signal can Vary but the signals are still very much binary here’s what i mean by this on means the same or like a weaker on means the same as a stronger on um so if you’ll notice when i’ve got the wire here minecraft has this additional little construct that they have Where if you start a power so well let’s lay down some wire first we’ve got a bunch of wire going and if we start a power source right here at the left we can see that the signal is on but if you’ll notice this the strength of that signal gets a Little lower as we proceed so you can see over here it gets a little darker a little darker until finally our wire is just off uh might take a few more than that ah there we go this one is just off um so you can see that it’s kind of Limited right so this torch produces an on signal and over here we have on on on all the way up until this limit which i believe is 15 blocks and the signal turns off so it’s a limited strength signal and you can imagine there are plenty of reasons they implemented this in Minecraft but a cool fun fact is one of the big reasons they did this is because well um wait hang on okay okay you’re good this is up there we go okay um so one of the cool reasons that minecraft has implemented this um is because If you were to have infinitely long wire and perhaps a energy store starting at this say a billion blocks right minecraft would essentially need to update a billion blocks with this on signal um all the way from here until there so they really do this for a pretty real Reason and that is to limit the um uh ridiculous amount of time it would take to update like this this on state um within minecraft so again feel free to ask any questions as we continue um but that’s sort of the gist of wire and finally we’re going to talk about The repeater right and going off of what we went on before the retro repeater basically extends the on signal right and resets the strength of that on signal to full it also adds a delay that we’ll discuss later and finally acts as a diode right so it um only Allows current to flow one way again a great live example of this is observe that we’re starting the signal here it continues all the way down and as our signal is getting a little weaker we probably want to say okay let’s extend this right let’s allow the signal to continue so we can Take this block right here and throw it on a repeater and what this does is it essentially resets the strength of the redstone signal coming through right and the reason these are so useful is best demonstrated by something like a lamp which will light up only if provided redstone power too Right so notice here now we’ve got the redstone lamp and it’s powered because we have a signal starting here it gets a little weaker as it gets to this redstone repeater the repeater renews its strength and then as it’s renewed the signal is very strong it comes out and powers the lamp Right again let’s say we got rid of this torch you’ll notice that since there’s nothing coming into the repeater it doesn’t have to strengthen any signal and the flamp is therefore off right one more thing about repeaters it doesn’t allow current backflow so that’s what i mean by it’s a diode Right so repeaters will strengthen it going in one direction so this is fine the repeater has strengthened the current coming from the left going to the right and that’s all good but suppose we try to run current the opposite direction from this way the repeater will stop it where it Stands and not extend it backwards right so that’s the basics of the wiring system here and it’s pretty neat as it is and of course i’ve got some more info basically everything that i just said is in the form of like a nice website that you can scroll through and look through and Kind of read at your own uh on your own time at your own pace i’m gonna go ahead and throw that link and by the way i’ll share the slide set with everybody after we’re done with this so hopefully should be totally fine um but that’s a little link that basically Talks about everything that i mentioned um just written down so you don’t have to kind of look back at recording or scroll through the slides and kind of figure it out for yourself hopefully that that link should take care of everything for you but yes that’s a little pocket reference About redstone um in minecraft right so that’s the basics of redstone right but i’m hoping that at least a few people kind of have an idea of what redstone does already within minecraft what i do want to talk about is now the convergence of this redstone that we’ve learned about Um with some concepts that you’ve already seen so if i can kind of see if we can leverage the zoom feature here can i see some hands of people who have taken maybe cmse250 or discrete math somewhere all right i see some hands solid Um and feel free to throw it in the chat too if you’ve um taken like a like what cs courses are we and if we are in at all i guess that that’s what i should be asking first feel free to throw it out there oh solid okay all right cool looks like We already run the gamut here oh ud excellent all right job and discreet math oh awesome people in high school great it’s great to see that okay we got a wide range of people coming in so if you’re in apcs a i feel like you might this might be um a Little bit past where you’re at right now but all backgrounds yes i agree all backgrounds need this information excellent wow algorithms in high school your high school is cooler than mine but basically what we’re trying to get at is and by the way if um This is a little confusing to you i can make an analog dave pcs and that might that might hopefully um make it a little clearer but we’re going to explore the logic gates right understanding of the logic gates and translate that into redstone how are we going to do this um by going Step by step making clear connections with the redstone concepts that we already know along the way right so let’s go ahead and get started let’s think about logic gates as they are right usually we have things like i’ll go ahead and throw them in the chat too we have things like And or um i believe you have xor as well um that’s that’s kind of sometimes you might not have a like a dedicated xor operator but really what we’re looking at are the actual gates right the um the diagram doubt two inputs one output kind of gate right So if we haven’t taken a look at that already why didn’t i throw it up on the screen because i think this might be good background for everybody digital logic and if you hear background noise that’s because we are currently ground zero for a lot of technical operations so i think they’re Like making food or something outside which is probably what the noise is okay let me throw up a cool link and by the way um you all have access to these links as well i’m going to put them in the presentation very soon but let’s look at them right So here’s what i’m talking about when i say logic gates uh we’re talking about not right which basically just takes an input inverts it and sends it back out right um and by the way is anybody here um is anybody here i’m totally unfamiliar with what i’m kind of going over right now Um the logic gates and stuff like that okay no problem yes we’ll totally take it slow so not think of not almost like the exclamation mark right um if you’re thinking of maybe computer science basically all you need to know is that whatever signal is Coming in to a not gate right which is just a construct we’re going to build that signal is going to be inverted if you have true coming in you’re gonna have false coming out perfect thank you blade um and if you have false coming in you’ll have true coming Out the other side right i think sophie this might be a lot clearer once we take a look at an example um while we’re on the topic though we can take a look at some more advanced gates right you might recognize recognize this construct idea from computer science as well But this is the and gate right and the and gate is only going to give us a true output um if this coming in is true and this coming in is true so if both outputs are both inputs are true then our output is going to be true Otherwise we will produce a false output and that’s kind of what this truth table on the right is describing so no sweat if this is totally new um strange stuff to you i highly recommend you take a look at the um the diagram that we’re gonna or like the Actual circuit that we’re gonna build and this probably will make a lot more sense right same thing with or um and xor so we’ll kind of go through them and talk about them as we move along but first i want to talk about actually building these gates within minecraft and we have to Understand the input for a logic gate is composed of one or two values both of which can either be true or false again great examples here with these truth tables that i’ve got right inputs can be true or false and the outputs are decided accordingly right and let’s represent these inputs As redstone wires a wire with a current is true and a wire without a current is false so this is what a false two false wires would look like right two false inputs and this is what two true inputs would look like right so i’m kind of trying to Draw the analog with minecraft here and we can go ahead and pull up the minecraft window let’s go ahead and kind of build a little analog to that all right so just like i’ve got in the presentation these are two false inputs right again if we wanted to provide a true Input we’d just turn the wire on right so that’s that’s good we’re kind of looking at it that way that’s fine can we think of outputs in the same way absolutely right inputs and outputs they’re all wires um that’s kind of what i what i want to emphasize here Output can be represented by a single redstone wire coming out of our logic gate if that wire carries current it has a state of true if it does not it has a state of false right so hopefully that should make sense again feel free to stop me if it’s Not making sense we can totally go through it so here’s what we’ve got so far we’ve got input and we’ve got output now i’m sure everybody is impatient to know how exactly we would actually build these gates how we would get this little question mark d marked off bit um correct in the First place right so again i hit kind of stall everybody out but so we’ve got these two inputs and somehow somehow we want to do something to these two inputs to produce the right output so in other words if we wanted to build a let’s say a not gate let’s start with a Not gate that’s the simplest and for that we only need to really pay attention to one of these input wires because a not get only has one input wire and our goal is to say well if we have on coming in here we want this to be off but if we have Nothing coming into our input right let me just do the not get over here actually might be a little better to understand so if we have on coming in are we want our output to be off inversely if we have off coming in we want our output to be On right does everybody understand um that or again i will keep asking that but feel free to take that as an invitation to say something if you don’t get it but if you do get it then no worries just don’t say anything it’s a lot different from like in person discussion i guess Um so we want to do that here are some new answers to remember when building in general so a redstone torch when placed correctly will invert current right and repeaters as we already talked about will extend current and act as diodes so you’re welcome to use comparators as well it’s totally um Viable to use them to build these logical circuits that i’m talking about i just tend to stay away from them because they were dropped into minecraft a little after i started and i feel like they’re not great at perfectly representing the analog or the the analogy between real life Circuits and minecraft circuits but uh tomato potato or oh i messed that up that’s fine tomato okay right um our goal now is to turn this into a nut kit right so let’s go ahead and do that and i just want to show you how to use the resource that i’m providing to Kind of figure that out um and this is where we’re going to start getting started on how we build these gates right so your goal now is to build um these gates not and or an xor and i want to show you how the website will help you kind of Get through this right so let’s take a look this website that i’ll be linking in the the chat here provides instructions on how to build not and or give it a second here it’s kind of slowing up and xor right all of these gates totally possible in minecraft And you can see a live demo here if my code worked i suppose not on firefox okay all right well if you have chrome that totally works um see if i can just throw it up in chrome here we’ll give it a moment to load the project Great this is how you would build an inverter in minecraft and by the way on the website itself you can use wasd to kind of navigate around this little frame that i’ve got on the website but this is how you would place a torch in order to build an inverted gate So i’m going to kind of kind of walk us through using this website’s walkthrough and how to build a not get and i want everybody to try and build the and um or or xor right and in the interest of time just try and build one of them One of the end or xor or the not kid right just to see if you can get it working but so you’ll notice that this is what it prescribes on the website this is the input we call that red and blue is output here just for the purpose of our Demonstration so let’s go ahead and do that if i can just throw up minecraft here here’s how you would build a not gate we’ve got input coming in and if we use any block so i’ll just use the first block available stone um basically any block right except for Ones with special properties with redstone and you put a torch right here in this strange little construct that is how minecraft defines an inverter right so take a look signal coming in this little setup inverts it and brings it out as false however we turn this one off It gets inverted right this is off but this comes out to on and you can see if i turn it back on it gets inverted so this is how you build a not gate in minecraft right so again this that we just built is our very real representation Of this this exactly the source is the left torch right and in a very real sense the source is actually just a left side so whatever not just a torch you can have another circuit perhaps two inverters in a row right we could totally do that we could do a chain not gate Just like this um and this would allow us to basically i mean it’s a completely useless construct basically all it’s doing is it’s inverting twice right so if i placed a torch here it would get inverted once inverted again and then sent back out this side So whatever is coming in on the left side whether it be torch or inverter or other logical circuit it gets nodded by this chunk right here so hopefully that makes sense and again feel free to ask questions um and now i invite you to take this time to open up minecraft Um and use i’m going to send the link right here to the the online textbook um and again we’re looking at chapter 2 logic gates sections you know 2.1 through 2.4 so you can click any of these right and i highly encourage you to try building one of these um that are here And or nor nand xor i’ve got all the demos just floating around in here somewhere so highly recommend right feel free to take a look but i’m going to give us some time perhaps a few minutes to kind of go through um and figure this out and while we’re Doing that if you don’t want to build it yourself no problem i myself i’m going to get to work building an and gate um while you all are giving this a try and should you need help here i’m going to um uh lower all hands for now and if you need help Just raise your hand and um we’ll come around and help you out or if i come around i mean you know what i mean so feel free to get started on this and again ask questions as needed and while you all are doing that i’m going to go ahead and get started Building an and gate so i’ll try to keep the commentary to a minimum so you can kind of focus and just for the sake of continuity i’ll i’ll reference the guide while doing it too so everybody gets an idea how to do this it’s got this we got two inputs here our Goal is to make an and gate so what i would do is pop on here reference the end right here and open it in chrome because i’m horrible at writing code that works in multiple browsers and if i wanted to figure out how to build and i would just scroll down here Right and there reasons these constructs work basically just nuances with inverters here we’re using a fancy series of inverters and leveraging the properties of redstone itself to build an and gate so i take a look at what we’ve got here on the demo that i’ve thrown up on the website after Taking a look what i’ll do is i’ll say okay pretty solid demo let me just keep that in the corner while i take my real minecraft and get to it so just like they’ve got on there i’m gonna put three blocks adjacently like this and if you feel uncomfortable with Building the other ones feel free to build the and too right this is just kind of an exercise in figuring out how to put some of this stuff together so i’ll just add this here add the blocks as it says on the website um and leveraging the nuances of minecraft Redstone right you saw that the inverter was constructed in that strange seemingly arbitrary way these are just neat ways to leverage properties of redstone in minecraft in order to create these other logic gates right but check it out once we’ve created this construct this seemingly arbitrary and gate construct Which is really just an elaborate kind of series of of inverters moved together leveraging the properties of torches and redstone we end up with an and gate and if i could just provide a live demonstration here one input signals that this and gate produces no output right um again similarly if i Disable this input enable this input again producing nothing on the outside however if we provide both at the same time we see that our and gate is producing an on signal coming out of there and that’s how you would build an and gate right again In the interest of time i’m not going to go over all of the gates but the literature that i’ve provided specifically the link that i’ve provided gives you an overview on how to build all of the gates that we’ve got right here so that’s how you’d kind of get started In building these this little sort of combinatorial logic right these these little structures in minecraft that can do all this logic stuff for us um and again i’m going to take this moment to answer any questions that we’ve got about logic gates or building them in minecraft Or perhaps with the um for the end why are the tours at the top necessary great question the torches at the top are necessary mainly in short because of how strange minecraft’s um torch and redstone mechanics are right they’re basically little nuances built in so in here we’ve actually got this weird Sort of inverter setup going that basically says okay unless both of these inputs are on at the same time this particular torch is not going to light and you can kind of see that if we disable this um here’s what’s going on this is coming in as positive It cuts through here um and it doesn’t get outputted here so that’s that’s one thing if we get this here then we suddenly have the ability to invert this block which turns this block on but if either one of these are on that middle redstone bit The middle redstone bit will be on and therefore inverted by this torch and sent out so our goal basically is to design like the circuit in such a way that this middle redstone wire will be off such that it’s inverted um and sent through this torch uh so again It’s in this design and the other designs that i’ve got um on the website um to basically just leverage some weird kind of arbitrary constructs of minecraft just to make sure or we’re kind of leveraging those to build gates that totally work right so i would say going super in depth There’s like you know obviously an explanation um for why this behaves the way that it does but it’s great to build these basic circuits um as part of your like overarching larger circuits um when you’re putting stuff like this together so i would say it’s good to kind of know What how this works is like a black box level great okay cool so that’s the logic gates and i mean perhaps you’re kind of thinking okay well that’s sort of you know basic stuff perhaps boring right and i just wanted to start here because it’s sort of a basis for how We’re getting through this um but let’s talk about logical complements for a bit occasionally we have a gate or circuit that produces the exact opposite of what we want right so i just want to add that suppose you wanted to make the at the um nand gate right you would just invert The output of the um the end gate um so ta-da you’ve got a name gate um again if nand is kind of a it just goes over your head no worries that’s you know just the logical compliment the opposite of the and gate but in case you ever needed you know Just to produce the nand uh nor or other logical complement gates all you have to do is add an inverter to the end of it right so i’d really like to stress that you can combine all these right you can have like multiple ends if you’ve um In discrete structures if you’ve kind of gone through those formulas where you have like multiple gates right um all connecting to each other and you can simplify them all that boolean logic and stuff is totally possible um in minecraft right so you can have this and gate connect With perhaps you know we can build maybe another and gate right here just to demonstrate i can say uh maybe we can have um and we’ll call this an inverted gate perhaps we have something like this we’ll just make that like that and if we wanted to build another and Gate to compound on this we totally could right so you can kind of see how we can combine all of these inputs right into multiple gates there’s and there’s and over there again and there’s not i would really think about this in terms of you know those diagrams that You draw in 250 where you have like the little gates as these little triangle diagram things and you connect them all together that’s kind of what we’re doing and that’s what i’d like to get at in my next little bit here right when we can essentially take these Little logic gates and you’re probably thinking now what well let’s start by expanding to a slightly larger well-known example then we can talk about much larger generalizations right so if you’ve taken discrete or enrolled in one right now um it’s these are two rutgers 250 here you’ll know about adders Right and if it’s been a while since 250 or you need an overview of adders again um unit 3 chapter 1 and unit 3 chapter 2 in the textbook that i linked go ahead and throw it again in the chat those will get you there the kind of broad overview Of what exactly adders are so i’ll just quickly go over how to build something like that right um so here’s kind of an overview we can use adders these circuits that i’m talking about to accomplish the following given two binary numbers one or zero as input Right perform a binary add of both of them um if that’s a little weird and unfamiliar to you um think of it this way right so given two binary numbers if we add zero and zero we get one all right sorry zero that was excellent on my part okay um if we add Zero and one we get one if we add one and zero we also get one and if we add one and one this is a little weirdly tricky but we also get zero with a carryover of one right but we’re going to ignore the carryover for now So does anybody have any questions on the binary edition that i just put forth here does that perhaps seem a little strange to anybody okay all good so as discussed earlier we’re going to take input and provide output in the form of redstone wires where one on means one and off means Zero right that’s why binary is so useful to us when we’re building computer constructs computers really only know on a basic level how to handle two states on and off so it doesn’t count the outputs and that’s why the ones create zero so the real thing is the ones create Zero because it basically is one plus one equals one zero right except we don’t count that overflow because we can only represent the output as um as one digit but in the circuit that we’re building now we can kind of represent the this carry as one as well so great point But essentially yes yeah exactly yep yep i think this will make a little more sense we look at the circuit here and the main point i’m trying to get across is okay now that we can build each of these individual logic gates congratulations you can build like anything that you possibly want right Here i’m just demonstrating that you could build this adding circuit right incidentally this adding circuit here is the basis of calculators within computers right this is how computers manipulate numbers they’ll perform ads and with a simple edit to this circuit um you can turn this into a subtractor right And again here i probably won’t go through building it just because you can kind of see just like i’ve done here when i combine the outputs of xor with the and here you can totally do something like that in here right you just have to So you could put like a xor here and an and gate here and then combine their output right um and so hopefully it’s kind of apparent to everybody that once we know how to build a few of the logic gates you know you can combine these in any way that you want And once you can do that a little spiel that i have here is um well i have this little workshop task here too so feel free to go ahead and put this together um if you’d like right and while you do that while you put together use the knowledge of these um These little gates to put together a half adding circuit just as i’ve demonstrated here i’ll kind of talk a little bit about why this is so important to us um so here’s the deal since we’ve already you know kind of looked at building these small logic gates and we’re moving on to building More combinations of these small logic gates let’s talk a little bit about functional completeness the idea there is that a logic gate is known as functionally complete if that same gate can be used to construct all the other gates that sounds a little weird but there’s a reason we’re introducing this right so The nand gate and the nor gate so that’s inverted and and inverted or they’re the only gates that are functionally complete right so in other words using a combination of nand gates you can create not you can create and you can create or you can create xor just by combining That gate over and over again right but knowing that we can basically say that if we understand that the overlying idea in modern computers is simply just a humongous amalgamation of logic gates because that’s basically what it is right the system that you’re running this zoom workshop on Realistically i mean it could just be a whole bunch of logic gates or specifically nand gates all moves together right and that’s the idea that we’re kind of getting it by being able to build these basic logic gates in minecraft we’ve essentially proven that we can build a computer of Any size um so i don’t know if you’ve seen those crazy youtube videos that are like oh 32-bit computer in minecraft right um that’s all possible and we’ve kind of explored today how like theoretically that is possible right yes exactly so in other words if you take these logic gates this is Just like a shorter kind of workshop version but if you take these logic gates right the knowledge that you have to build these logic gates put them together in circuits like adders perhaps multiplexers demultiplexers encoders which are all by the way just again big mishmashes of these logic gates then you can Theoretically build a computer so i suppose if you’ve kind of at least tried one of these gates then pat yourselves on the back because that is essentially the basis of building a computer um in minecraft right and that’s what i’m trying to get at with this generalizing idea since we can Make the basic logic gates use them in basic builds um the world is now ours right so i’ve got a little bit of a spiel on this um on the textbook as well right and i talk a little bit about the nand gate and basically that’s what i’m kind of Trying to get at here right if you can build these basic logic circuits then you can essentially build a computer in minecraft right so logic kids have the story here although we can use them to represent computing logic we can begin to emulate other cool functions of computers uh with redstone as well So i’ll try and show you some neat examples combining what we learned with perhaps some newer ideas right just to kind of show you now that we know sort of like the basics of how redstone works um and how to use the logic gates some less theoretical stuff and some more fun Stuff because i’m sure that’s why everybody is here um so here’s one example combination locks right um and i did want to kind of work through this example but i decided to throw them in his youtubes um just in the interest of time so this is a great example To look at and i want everybody just as a quick exercise if you could take a look at this and tell me what like identify at least like one logic gate you see being used in the youtube video that i’ve thrown into the chat and feel free to kind of like you know Skim through the video click through it um and just throw it in the chat if you see a logic gate just be like oh this one um but this is just kind of like a an exercise in a real world application of well i mean minecraft world application of what We’ve learned so feel free to click the link kind of look through seriously because i’m looking for like there are a few answers that are totally valid here um of these logic gates um and also related i’ve included a more involved example of a bank with a piston door and an Advanced fault done by another youtuber on here again that one’s got a lot of logic gates in it as well um they’re a little bit more nuanced than the ones i mean they’re still the same logic gates but the way he builds them are a little bit more nuanced than we talk about But the simple example that i’ve linked is is great um so feel free to kind of click through and look at it i mean i’m not really throwing it up here but i could it is a loud video and it’s neat they don’t look exactly like the ones that we’ve built but you Can see that the logic there is kind of the same right and i hope that’s kind of what we try to get out of this because at the end of the day you know building a huge 40 like 32-bit computer you can’t do in one workshop But what you can do is you can build these these basic ideas that’ll that’ll help us get there right um so i can kind of throw up a chunk of the youtube video that i thought was sort of evident of logic gate use um and that is Check it out um if i can just drag this over here boop you can see that the creator of this video puts down um i guess some some blocks here and you’ll notice that they go ahead and place down these torches in a specific arrangement right you might think that they’re arbitrary But in actuality these are deciding the lock itself right so we’ve put down three torches one two three in these positions right and if you go over to the other side this is what it looks like on the back side these four levers notice that if these tor if these levers are turned On in the same order um that these torches are turned on then essentially the door will open right now that is i suppose in its most raw sense a use of either like inverters or like an and gate right you can kind of see that in your head see how that’s happening right They didn’t put it the exact same way that we did but essentially that’s exactly what’s going on the once the lever is on and once the torch is on right we’re good to go um a circuit or redstone at the bottom here we’ll kind of Figure that out and be like oh well the lever is on and the torch is on at the same time or the lever inverted whatever’s on the torch and it’ll recognize the result coming out there and you can use that result to open the door Right so hopefully it’s kind of a way to kind of get us started to kind of get started thinking about how exactly how big of a role that these logic gates will play um in designing these these redstone circuits right and that’s the key with redstone design really since it emulates Real world digital logic so well that’s why it’s been so wildly successful and that’s why people have been able to build these crazy circuits usually they’re like electrical engineers or digital logic students who are like well i mean i learned this in my digital logic class so i might as Well just build a version in minecraft right um and that’s how we get these cool inventions like this piston doors combination locks right they’re all just leveraging these logic gates so thanks to this turing completeness proof i say that basically that was me going off on um You know since we can build these logic gates in minecraft we can build literally any computing circuit there are some other neat computing circuits that we can build that might not be totally one-off obvious right so i i have a few examples here one of them is a clock right uh and a Great example of an analogy to this is your computer it has a processor um you it might say that it’s you know like 5.3 megahertz gigahertz to 4.2 gigahertz right that’s running on a clock cycle that’s a circuit that runs over and over again and in minecraft we can build a very Basic representation of a clock cycle um not sure oh actually no the um danvy is running the server is upstairs so if this makes a mess on it then hugh i will be the first to know i suppose because he’ll bang on the the roof that i am currently Under so let’s take a look at our little clock circuit here which is an example of a computing circuit that we can build in minecraft so here’s what you need to know a clock is essentially a circuit that has a signal and repeats routinely right and we can Get this done with if you remember that we talked about earlier that redstone repeaters provide a little bit of a delay let’s go ahead and leverage that suppose in this circuit i wanted something to happen something exciting to happen whenever a signal reached around um all The way right so here’s what i’m gonna do first put down some repeaters here in order to slow down the signal right and i’ll kind of give you a live demonstration of how that is and how that works um so if i quickly put down a torch or Whoops quickly pretend to torch and break it oh that was too quick let’s try that again or you can also right-click repeaters to increase the delay on them so i’ll go ahead and do that and if i quickly put down a torch and break it You can see what i’ve done here and that is the signal just goes like that and follows the repeaters just like this in this kind of circular fashion right and this is because these repeaters all provide like a little bit of a delay before sending the signal forward And if we do that in a cycle we get this really neat design now this is an essential computing circuit because something like this is what drives a computer to kind of process assembly line by line right every time a clock circuit goes around and hits this point perhaps um Exactly exactly it’s plugging extension cord into itself except by throwing the delay in it actually works right um so with something like this and this is where it gets kind of cool um suppose you had something like a dispenser right so instead of parsing through lines of code which is for boring people We can do something neat we can take a bunch of perhaps snowballs dispensers right and we can go ahead and perhaps now that we’re reliably getting a redstone signal to this little bit over and over again you can kind of realize what i’m going to do next here Oh actually this might be kind of cool um go in here i throw in the snowballs and you can see that it’s just going to shoot them out repeatedly right based on our clock circuit suppose i wanted snowballs to come out faster that’s no problem i can reduce the delay On the clock circuit and let me just reduce it a little bit more here so you can kind of see boop boop so they’re coming a little faster and this is one essential computing circuit um that we can work on right um a clock basically just leverages the Fact that we’ve got wire and we’ve got a redstone charge running through it repeatedly right and this will work in fact if you build a lot of these it becomes somewhat problem problematic for whoever is running the server right so i mean this might get exciting but i think the server’s got some Solid pricing power behind it so feel free to kind of give this stuff a try right um and given this clock circuit you can now do a ridiculous amount of things right so let’s let’s not just stick to this example um suppose we wanted to maybe build um A neat server stopping strobe light we could totally do that we could put some lamps here and the time is day but we could leverage the clock circuit again to okay see it’s already starting to lag a little bit but if we build a large version of this then you can totally see How we could have perhaps a you know a strobe like doing things like this right so hopefully this is kind of a neat example of how we would use this sort of stuff to you know work with redstone signals and things like that ah of course okay so you to fire Snowballs um all i did was so i just basically broke my clock here just so that it wouldn’t stop the server the item was the dispenser that i think will be the final kind of um part of my workshop so while we kind of work through the digital logic we’ve Kind of gotten all through the boring stuff that we need to work through the last few minutes i do want to talk about some of the neat things that you can use within minecraft itself with these and gates uh with these clock circuits right to build neat things so number one uh Dispensers they’re great you can fill them with snowballs you know they can have flame charges or i forgot they’re called fire charges okay so watch if we put this in here you can have a slightly more devastating version of our previous circuit right this will just fire fire and hopefully the server I don’t think that’ll do anything terrible to the server but that’s that’s fine that that probably shouldn’t cause any problems another cool thing you can get going right so neat little defense here um and to propagate these redstone signals you can also use things like pressure plates Um to get a signal started right so perhaps you wanted to design some sort of trap right and again these are kind of arbitrary designs that i’m kind of throwing out here um but perhaps you wanted to start firing this as someone walked over something Well by using a clock circuit we can do just that we can say if somebody walks over this then oh well that kind of went a little little more than i expected here but you can use you know these different perhaps a button would be a better way of Presenting something like this right um again if you’re the longer the the cycle the more you like a delay you can also add like a pulse limiter um to make sure that that pulse coming in will run this clock properly but things like that will allow us to set up Um to combine our knowledge of logic gates uh along with you know instruments in these basic computing circuits to produce some pretty neat stuff um so again i’m here to take questions uh and again i’ve put this slide in here you know we can use these clocks to do All sorts of crazy like obnoxious things that’s totally fine um but the conclusions that we have here uh are that minecraft provides us with some excellent tools to work with with amazing functionality and the key there is that they’re so similar to real-life constructs that we are you know All good we can use those the same way we would use real-life constructs and that is why it’s become so wildly successful people who know electrical engineering digital logic can kind of throw that knowledge together right in our case and perhaps discrete structures throw that knowledge together To put that into minecraft and have it work exactly as we expect it to right with amazing functionality furthermore an interest and background in cs helps immensely in optimizing and taking advantage of this right for those of you who have taken discrete or who have gone through a little bit of already You’ll maybe notice that you have exercises in distilling down boolean logic operations right so if you had like multiple gates in one big spaghetti of logic gates you learned how to condense them down into a few logic gates um in minecraft that’s saving blocks right you could have a bunch of logic Gates here and then do some discrete math on it to kind of mush them down into as little logic gates as possible totally viable right um and of course we can make strobe lights and a bunch of other neat stuff so again since i can’t literally Show you all of the you know digital logic constructs that you can build within minecraft i wanted to go over the basics to you the first few gates and tools that you can produce in minecraft kind of prove that we can go ahead and build whatever digital logic circuit we want Within minecraft knowing these few basic properties and using those in conjunction with cool minecraft gadgets and properties you know clock circuits which are you know a real life circuit but we can also leverage this clock circuit um to do any things like fire a bunch of fireballs perhaps it’s someone’s plot i Don’t know actually that’s i shouldn’t encourage that um but that’s exactly what we’re kind of trying to get at here so hopefully this workshop was good kind of establishing the the basics of you know putting forth no nothing of the sort i said that oh actually it’s been recorded live But i hope this provided the basics for everybody i will be hanging around um i know we’re kind of rounding at the end of the workshop here i will be hanging around afterwards if anybody has any questions or want specific help building something that is totally fine Um but otherwise thank you so much for coming bill don’t break yes yes a lot of us better excellent for it um i hope this was useful for everybody um and of course at this point i can open the floor that clocks at every and that is amazing yes okay I’m glad i helped emmanuel that is solid you could probably put a chicken spawn egg in here and make as many chickens as you desire on a schedule of course yes thanks so much Video Information
This video, titled ‘Redstone Computer Architecture in Minecraft’, was uploaded by Technica on 2020-10-25 05:53:09. It has garnered 229 views and 8 likes. The duration of the video is 00:58:59 or 3539 seconds.