What’s up guys welcome back to minecraft’s logical redstone today we’re going to talk about memory so we’re going to talk about two main types of memory read-only memory known as rom and random access memory known as ram so let’s start with raw this is basically memory that is stored in one Location like permanently and it never loses its value whenever we want to access this information we can do so by reading it there are plenty of real-life examples of rom such as a cd which stores information on its surface and to read the information you just insert it Into a cd drive and you know the spinny thing and the information on the cd never changes it’s meant to be there permanently so the only thing you can do is read it which is why it’s called read-only memory so in minecraft the easiest way to make raw is just an Encoder i mean an encoder is a form of read-only memory you have lines that store information which are the torches and you can have a truth table for it so a maps to this b maps to this c maps to this and yeah you’re storing information And you can read it by selecting a certain character and if you haven’t seen this already check out part 2 that’s where i explain encoders in full detail obviously this is not the only way to make rom we can do it in many different ways as long as you can store Information and read it it’s wrong so what we have here is information trying to go through comparators but it’s being cancelled and then i have all the outputs being ordered into one single line so if you want to read c it unlocks c’s comparators by d powering these Torches and allowing the c information to be read out same thing with b and same thing with a and there’s going to be a world download as well if you want to look more into it and see how this is working this method tends to be a bit slower and like bigger Because you have like a separate line to cancel all the comparators but i still wanted to show you it because it can definitely be useful sometimes another cool thing is that rom doesn’t have to be one-dimensional we can go as big as we want so this is two-dimensional rom That basically stores characters so each line here uh stores the pixel values of that character represented in torches so if we turn this a line on it depowers all the parts of a which powers all the torches connected to it and again those torches are the pixel values that make Up a on a screen so that’s why we get an a there and we can do all these characters as well this one’s coded for a six and truly we can draw anything on the screen that we want and i’ve used this in my designs multiple times i’ve used it for The word processor to show letters and i’ve also used it for tetris just to store all the different types of pieces and one thing i want you to realize about rom before i move on to the next type of memory is that ramen minecraft is deterministic meaning that One input always gives the exact same output unless you go in and literally change the rom which you usually don’t want to do right you don’t change what’s on a cd but this next type of memory is not deterministic meaning that it’s not as simple as input and output anymore It’s not a combinational circuit it’s a form of memory that basically you use dynamically it’s always changing and there’s no such thing as a truth table for it anymore but don’t be scared that just means it’s more powerful and we can do more stuff with it and this Second type of memory is called ram which stands for random access memory just like with rom we can read from this memory but we can also write to it meaning that we can give it new information to hold at any time ram is not permanent and in real life it’s Constantly changing at ridiculously fast speeds on top of that ram will actually just lose all its memory the instant the computer is turned off because it discharges but in minecraft there’s no such thing as discharging so minecraft’s version of ram is going to have a manual clear function as well as reading and Writing and notice how i said minecraft’s ram because really i mean we’re getting pretty far away from the actual use of ram in real life ram would be used to hold data that a program uses in a computer and unless you’re making an entire computer out of redstone that’s Not really what we’re going to be using ram for really we just want a form of memory that we can write to read from and clear and ram is the closest real-life equivalent so that’s why i’m calling it ram so how on earth are we going to make a circuit that holds Information lets us write to it lets us read from it and lets us clear it well uh this is it all you have to do is put a torch into a torch and so whenever you want to write you press this button and it stays on because it toggles between two different States if you want to clear it you set it back to the original state and now we don’t have it anymore and as far as reading goes we’re just going to do the easiest thing which is just locking the output with the comparator and when we read it we unlock the comparator and Show the information so what i’m going to do instead of throwing this all at you at once is i’m going to gradually introduce more and more concepts as we go down the line until eventually we have all the parts of ram that we want very first function is really simple i Already showed you it with the torch into a torch i just changed the design a little bit so here we have a torch which goes up here into this slab into another torch which powers this dust and so we have a torch into a torch and so when You power this side on any of these cells it lights it up and so you can essentially write to this register of information you can probably see the problem we don’t really have a way to clear it i mean the easiest thing you can do is Just maybe go down here and place a redstone block but that’s really tedious so let’s add a clear function so here’s our clear function by default it’s just a line with a bunch of torches that are off so they’re not doing anything but they’re connected to this dust which i Just showed will reset the cell back to zero and so if we write information over here let’s just write this and this now if we want to clear it we just press this button which floods all these setting them all back to zero and there We go we can now write and we can clear now let’s add reading reading is just another line with torches except these torches this time are canceling comparators that are just slapped onto the output and so whenever we want to read it unpowers all the cancellation And it shows what answer was in these registers so let’s try it out i’ll write this bit and this bit and notice how we don’t see anything you almost can’t tell what’s in the machine and so if we want to read it we do this and we get a Signal sending out what was in the machine at that time when we clear it i mean it still clears it we can’t really tell what’s going on but the way to know that it’s clear is if you hit read and nothing comes out now we know that we’ve successfully cleared it And technically that’s all the functions that we need i just want to add on one more thing to make it even easier so sometimes if you’re writing to it and you make a mistake well now i have to go over here and hit clear and restart over again that’s Really annoying it’s kind of a waste of time so what i have over here is i basically did the exact same thing as like the reading circuit but in reverse so now when you try to write it won’t let it in until you hit the right button which Uh unpowers all these lines and lets whatever answer you’re trying to write through so now you kind of like get time to decide what you want to do first if you messed up and said oh wait i actually don’t want that bit no worries when you’re all set deciding what you Want to write you hit this button and it writes it to the register i also threw some lamps on here so you can kind of see what’s going on so that’s what’s actually in the register and if we want to see it we just hit the read button and there you go clear Beautiful that’s all i got for you i hope you learned something i hope you enjoyed world download is in the description as always peace out You Video Information
This video, titled ‘Memory | Logical Redstone #4’, was uploaded by mattbatwings on 2021-10-30 14:24:37. It has garnered 135066 views and 5863 likes. The duration of the video is 00:07:36 or 456 seconds.
!!! Check out the NEW AND IMPROVED logical redstone series here! https://youtube.com/playlist?list=PL5LiOvrbVo8keeEWRZVaHfprU4zQTCsV4 !!!
In this episode, I go over ROM and RAM, two forms of memory used in real life and in redstone.
Patreon: https://www.patreon.com/mattbatwings Discord: https://discord.gg/V5KFaF63mV My socials: https://linktr.ee/mattbatwings My texture pack: https://github.com/Xyverle/MattPack World Download: (JAVA 1.16.5) https://www.planetminecraft.com/project/memory-from-tutorial-video/
————————-
Want to get more involved in the logical redstone community? Learn Logical Redstone! https://youtube.com/playlist?list=PL5LiOvrbVo8keeEWRZVaHfprU4zQTCsV4 Open Redstone Engineers (ORE): https://openredstone.org/
0:00 Welcome to Episode 4! 0:11 ROM 3:00 RAM 7:19 Subscribe!
Music: https://youtu.be/mWebB6zby6Y