Instruction Memory - Let's Make a Redstone Computer! #5

Поділитися
Вставка
  • Опубліковано 26 жов 2024
  • Ігри

КОМЕНТАРІ • 138

  • @mattbatwings
    @mattbatwings  День тому +27

    To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/mattbatwings
    You’ll also get 20% off an annual premium subscription.

  • @mattbatwings
    @mattbatwings  День тому +212

    Some quick FAQ! Please like so it stays on top!
    Q: Why not have NOP be “ADD r0 r0 r0” and save an opcode?
    You can absolutely do that! That’s called a pseudo instruction. In this series I chose to give NOP its own instruction for simplicity.
    Q: Why not have the LDI operands flipped so that Reg C can be the destination, saving a mux?
    This is perfectly valid too! I should have mentioned in the video that having LDI write to Reg A will actually save us from building hardware later on in this series, once more instructions come in.

    • @QwertyAD1150
      @QwertyAD1150 18 годин тому +7

      Why couldn't you have just added this to the bottom of the brilliant comment?

    • @entityredstoneonyt
      @entityredstoneonyt 18 годин тому +2

      when you try to have 2 pinned comments

    • @DizzyWhaleX
      @DizzyWhaleX 17 годин тому +5

      @@mattbatwings The Pinned comment could have the brilliant ad at the top of the comment and the FAQ below
      -LIKE THIS TEXT HERE.

    • @Arae_1
      @Arae_1 9 годин тому

      why would "ADD r0 r0 r0" make no operation? wouldn't it double what's currently in r0? or am I misunderstanding something

    • @minirop
      @minirop 9 годин тому +1

      @@Arae_1 r0 is forced to be read as zero and writing to it is just ignored.

  • @maximiliankrause4380
    @maximiliankrause4380 14 годин тому +15

    As a cs student, i wish you did this series 2 years ago. The visualistion minecraft provides to this abstract topic is crazy helpful. They should show this in universities! Great work ❤

  • @choonyongtan5671
    @choonyongtan5671 20 годин тому +30

    This is really coming together

  • @mpp_user
    @mpp_user 18 годин тому +5

    i was *JUST* making the redstone computer, and i *JUST* needed this video, and it *JUST* appeared an hour ago. Wow!

  • @widrolo
    @widrolo 18 годин тому +19

    As someone that loves to write my own computers (in C, not in Minecraft), i can say that this is easily the best series to watch if you want to understand how computers work.

  • @ggorg0
    @ggorg0 20 годин тому +24

    I recently got inspired to create my own computer, both in Minecraft and IRL, on breadboards! I've also seen the Computerraria project, so maybe it's possible to make an entire RISC-V computer in... Minecraft...? Maybeee...? Can we run Linux on it...? (requires the RV32IMA instruction set)
    Also, why did you make LDI have argument A as the register? If it was LDI val reg then there wouldn't be a need for an additional mux and control line... I guess that was for some more future instructions, but right now it wasn't necessary.

    • @mattbatwings
      @mattbatwings  19 годин тому +11

      @@ggorg0 You’re right, it is becuase of future instructions. Probably should have said that in the video! It’s actually gonna enable us to save a mux later.

    • @d4rkmn643
      @d4rkmn643 10 годин тому +2

      So about the RISC V, isnt it a very complex isa? I dont even know if a minecraft computer can be so complex lol. However, maybe a custom isa which is a subset of RISC V could be done? Then we could make a custom subset of C specifically tailored for it with a custom compiler that compiles this for minecraft lmao

    • @iwikal
      @iwikal 8 годин тому +1

      ​@@d4rkmn643no, had it been a complex isa, it would have been called CISC-V

    • @nadie9058
      @nadie9058 7 годин тому +1

      @@iwikal Complexity is relative, of course it's simple compared to x86, but in the interest of Minecraft computers it's still very complex. RISC-V is designed for a 32 bit computer, so yeah, too complex at least for what I have seen done in Minecraft

  • @kngod5337
    @kngod5337 19 годин тому +14

    it somehow feels weird to me hearing memory addresses and bits being refered to in decimal. I guess ben eater has me too used to hex

  • @anthonycannet1305
    @anthonycannet1305 7 годин тому

    The branch memory thing from 5:02 can be explained like this:
    The before side is all 10 bits forming a list of 1024 address locations, and when you select one the input notifies all 1024 of them with the input selection. Then the correct associated address location will output what it has stored in memory while the other addresses don’t because their address did not match the input. Imagine you had a stack of 1024 pages and you needed to find what was written on a specific page, you’d have to look through all the pages until you found the right one.
    The after side is instead 16 (4bits) “separate” memory units each having 64 address locations (6bits). When you put a 10 bit input into the overall system, it checks the first 4 bits to know which one of the 16 sub-units to check, then uses the remaining 6 bits to know which address of that unit to use. It’s like if you needed to find that one page in 1024, except this time they are separated into 16 books with 64 pages in each. It’s much easier to search through 64 pages than 1024, and you just need to find the correct book first. Now instead of sending the input address signal to over 1000 registers, it sends it to a 4bit selector that then sends it to 64 registers. Significantly fewer redstone updates.

  • @TVmommyUwU_YT
    @TVmommyUwU_YT 20 годин тому +68

    Had to click in a micromilipikosecond I got the notification

    • @raffayirfan
      @raffayirfan 19 годин тому +3

      Bro you violated a rule ! That's wrong to use more than 1 prefix.

    • @TVmommyUwU_YT
      @TVmommyUwU_YT 19 годин тому +1

      @@raffayirfan who said

    • @TVmommyUwU_YT
      @TVmommyUwU_YT 19 годин тому +1

      Math can break everything, so break physics

    • @ringo2872
      @ringo2872 19 годин тому +1

      You should do it in 1 plank second!

    • @TVmommyUwU_YT
      @TVmommyUwU_YT 18 годин тому +1

      @@ringo2872 break da rules, rules are there to break them, MAKE IMAGINARY AND NEGATIVE MASS, NEGATIVE AND IMAGINARY LIGHT, NEGATIVE AND IMAGINARY ENERGY
      NEGATIVE AND IMAGINARY SPEED, SPEED FASTER THAN THE SPEED OF LIGHT OR EXPENDING OF THE UNIVERSE 😈

  • @PoProstuLatanie
    @PoProstuLatanie 20 годин тому +2

    Good job on the series, keep it up.
    These videos are very neatly made

  • @clehpton
    @clehpton 19 годин тому +3

    I thought was a good idea to use the instruction "nop" as a synonimous for "add r0 r0 r0" or something like that to save the opcode for other instruction, except if you want to have a specific instruction wich takes less cycles to execute. I'm liking your series so much!

    • @mattbatwings
      @mattbatwings  19 годин тому +5

      True, any ALU instruction that writes to r0 will work just fine!

    • @nadie9058
      @nadie9058 6 годин тому

      This is something that's actually done in some cases. The one I can think of is the Raspberry Pi Pico, which is a microcontroller that has something called PIO, which to not go into too many details is like a very small computer that handles IO operations, and is programmed with 16 bit instructions as well, with 3 for the opcode (yes, it only has 8 instructions). It's so crammed that even though a nop was needed, it didn't fit, so it's an alias for mov y, y, or load the value of the y register into the y register, which does nothing.
      Man, I love that piece of technology.

  • @MoleGamingPlus
    @MoleGamingPlus 20 годин тому +5

    I like this series

  • @sovereignshahid9265
    @sovereignshahid9265 12 годин тому

    funilly enough ive been following this series in logisim which is contrary to what you said in the first episode, but compared to all the other resources I've looked at, this series has been the best by a large margin.

  • @nexarsji
    @nexarsji 19 годин тому

    new mattbatwings vid? hell yeah

  • @Lampe2020
    @Lampe2020 4 години тому +1

    I wondered all the time why I didn't get your videos in the notification bell, and now I realized that I wasn't even subscribed to you! Either I was too dumb to subscribe earlier, or I got unsubscribed by a bug (has happened before)…
    Anyway, I corrected that now.

  • @Jakala2257
    @Jakala2257 19 годин тому +4

    11:17 why, instead of using another multiplexer, we don't just make Reg A and B the Immediate, and Reg C the destination ? this way, we don't even need another mux

    • @diggoran
      @diggoran 19 годин тому +4

      he answered in another comment, basically it will make some future instructions easier and actually saves a mux

  • @NateTmi
    @NateTmi 17 годин тому +2

    When ever someone tells u minecraft is a kids game & adults are not to play in a kids game. I think of how many complex redstone things there are like this, & u even explain part of how this can do any basic game not only tetris

  • @justinnamilee
    @justinnamilee 11 годин тому +1

    Would love to see a chonkin behemoth von neumann architecture system... Chonking cause I'm assuming you'd need a mega memory. xD

  • @apekz3592
    @apekz3592 11 годин тому

    It feels natural to make a programming language for this

  • @MECKENICALROBOT
    @MECKENICALROBOT 11 годин тому +1

    Harvard architecture this way is _luts on luts on luts._

  • @purple4395
    @purple4395 12 годин тому

    Redstone Andy's are allways so fucking crazy

  • @vaccvaccvacc
    @vaccvaccvacc 20 годин тому +6

    Next thing you will do is a quantum computer.

  • @loukas130
    @loukas130 18 годин тому

    I wasn’t expecting that smooth transition at the end 😂

  • @feeries8208
    @feeries8208 19 годин тому

    brilliant is back

  • @ShadowTheAge
    @ShadowTheAge 19 годин тому +2

    Why not share load immediate and NOP? if you try to load immediate into 0 register the result will be NOP. So load immediate could be 0000 while all zeros are still nop.

    • @mattbatwings
      @mattbatwings  19 годин тому +2

      @@ShadowTheAge Yep, there are many ways to simulate NOP. “ADD rX rX r0” works too. I chose to give NOP its own instruction because I would rather not get into pseudo instructions yet, but they will be talked about later

  • @rodrigoqteixeira
    @rodrigoqteixeira 33 хвилини тому

    6:25 you may think that's good but it would be much less glitchy to have the 0 instruction to be halt. That way it would detect when it finishes if you forget to put the halt opetation.

  • @hello128bit
    @hello128bit 15 годин тому

    İ love this series so much❤

  • @zombiechameleon614
    @zombiechameleon614 20 годин тому +1

    OMAGA NEW VID

  • @ding.1367
    @ding.1367 14 годин тому +1

    for the machine code file, shouldnt you create binary like \x10\x89 \x30\x91 \xb9\x02 (this is hexadecimal but i only used it to compress the binary as its long) instead of using plain text? theres nothing wrong, but its more fitting and more importantly it saves space to store the instructions

  • @alexpopblock6435
    @alexpopblock6435 20 годин тому +1

    NEED MORE NOW LOL

  • @TheArrow4012
    @TheArrow4012 15 годин тому

    IDK if someone brought it up, but wouldn’t NOP actually be be wrong if flood carry is 1 on the ALU.
    It would give all bits on instead of off
    So flood carry has to be zero, I think?
    A few of the other ones too. Like !A and !B and carry in may also causes problems 11:16

    • @redstoniker6424
      @redstoniker6424 14 годин тому

      But enable is off, so it wont cause any problems

    • @TheArrow4012
      @TheArrow4012 14 годин тому

      @@redstoniker6424​​⁠​⁠
      enable is off but that only turns off the register file making A and B in the ALU zero
      But the ALU itself is still on. When the inputs of A and B are zero, but those modifications are 1 it still has an non-zero output.

  • @kenzostaelens1688
    @kenzostaelens1688 18 годин тому +1

    so how much can i bet on the next component being the.. program counter?

  • @Mineraljk
    @Mineraljk 19 годин тому

    NEW VIDEO WOOHOO

  • @LatendC
    @LatendC 9 годин тому

    Great video, one question tho.
    What editing software do you use to make those simple animations?

  • @rodrigoqteixeira
    @rodrigoqteixeira 40 хвилин тому

    List of replacements to nop:
    LDI r0 0
    LOD r0 r0
    ADD r0 r0 r0 (changes flags)
    SUB r0 r0 r0 (changes flags)
    ADI r0 0 (changes flags)
    JMP [next instruction]
    XOR r0 r0 r0 (changes flags)
    BRH C [next instruction]
    RSH r0 r0 (I wish this instruction allowed for r shifting more than once a time 😢; doesn't change flags tho)

  • @nexarsji
    @nexarsji 18 годин тому

    i love you matt ngl, do you have any tutorials from ground up? because im so stupid i cant make a 3x3 door, i would apreeciate it if you would answer

  • @diceptivegd5015
    @diceptivegd5015 15 годин тому

    I feel dead inside, I’m making this on bedrock and I haven’t downloaded any fabric mods so I’ve been doing this by hand. I think it’s time to finally download some mods

  • @vk8a8
    @vk8a8 18 годин тому +2

    please dont change the instruction set too much im already making a programming language for this 😭😭

  • @ELITE-CHIEF-DRILL-MAN-ko3yp
    @ELITE-CHIEF-DRILL-MAN-ko3yp 18 годин тому

    Can you make the programme counter tutorial next, so we can use the computer automatically

  • @JunxiSalamander
    @JunxiSalamander 10 годин тому

    5:04 "The moment I realized the weakness of my own PC... It disgusted me"

  • @winterfoxx9851
    @winterfoxx9851 16 годин тому

    I have completely lost the ability to follow and understand this series, but Im still watching

  • @rodrigoqteixeira
    @rodrigoqteixeira 24 хвилини тому

    Oh cool. Wait, couldn't you swap the order of the register and the value on the assembler?

  • @SaltyMold
    @SaltyMold 12 годин тому +1

    Why make an alu capable to do ADD SUB AND NAND OR NOR XOR XNOR RSH and make control rom just for ADD SUB NOR AND XOR RSH ?

    • @harrazgamingyt
      @harrazgamingyt 10 годин тому

      We only use 6 operations but with the controls, it's possible for all those other operations

  • @aarongostein9230
    @aarongostein9230 15 годин тому

    @mattbatwings Just curious, are you planning on making a high-level language (and a compiler for it) for your assembly language?

  • @modman4842
    @modman4842 18 годин тому

    when we making the GPU i realy want to see someone make that architecture in minecraft

  • @totoshampoin
    @totoshampoin 19 годин тому

    So you're making a Harvard architecture.
    Have there been Von Neumann architectures in Minecraft?

  • @diceptivegd5015
    @diceptivegd5015 16 годин тому

    I’m predicting a sponsor from Brilliant

  • @mami_40404
    @mami_40404 20 годин тому +4

    man you should start a kind of tech company with your redstone knowladge

    • @Chakamatics
      @Chakamatics 17 годин тому +1

      Now how's that going to work Mami?

  • @MrEliseoD
    @MrEliseoD 3 години тому

    Can someone explain to me the point of having NOP, when all it does is nothing? What purpose does it serve? is it simply filler for it to skip?

  • @TheStone190
    @TheStone190 4 години тому

    Next thing write a C compiler for your Minecraft assembly

  • @atom1kcreeper605
    @atom1kcreeper605 10 годин тому

    How hard would it be to add a write to memory [imidiate] instruction

  • @tipsforlife-mohammedramahi7524
    @tipsforlife-mohammedramahi7524 20 годин тому

    keep going

  • @MalteFP
    @MalteFP 19 годин тому +1

    Hey, I'm build along with the series at home and really enjoying it. I'm having a bit of trouble with the assembler, when I input a program as
    ADD r1 r1 r2
    XOR r1 r2 r3
    RSH r2 r2
    that should become
    0010 0001 0001 0010
    0110 0001 0010 0011
    1111 0010 0000 0010
    but insted I get something along the lines of
    0001 0010 0010 0001
    0010 0011 0110 0001
    0000 0010 0111 0010
    These are the right program just in the wrong order, they go
    B C OP A
    or
    r1 r2 ADD r1
    r2 r3 XOR r1
    r2 RSH r2
    I really don't know what the problem is and could use some help with it
    Also when I paste the schem in I get a lot of random repeaters just floading around.

  • @noobletzzz1267
    @noobletzzz1267 20 годин тому

    This good

  • @Cube_man_epic
    @Cube_man_epic 20 годин тому

    Jo so fast of a upload

  • @joker876x
    @joker876x 19 годин тому

    So I'm guessing the next step is probably an instruction counter?

  • @RobRed1011
    @RobRed1011 20 годин тому

    Hi i love your videos I don't know what to say so i just love your videos

  • @Slicudis
    @Slicudis 20 годин тому

    Greetings!

  • @YuHayate
    @YuHayate 19 годин тому

    nice

  • @cookieeater1010
    @cookieeater1010 15 годин тому

    ITS SPONSORED BY BRILLIANT 😩😩😩

  • @drunkelpumf
    @drunkelpumf 3 години тому

    did you go to university of michigan by chance

  • @mattyj39_
    @mattyj39_ 18 годин тому

    6:23 shouldn't it go up to 1023?

  • @chocoplaysgames
    @chocoplaysgames 20 годин тому

    yippi new video :3

  • @ELITE-CHIEF-DRILL-MAN-ko3yp
    @ELITE-CHIEF-DRILL-MAN-ko3yp 15 годин тому

    Pls, can you give me a trick to build decoders faster without modes.
    I just spend like, an hour to build a huge 8bit decoder to finally realize that I can’t use it, it’s to tight.
    I can’t just use a structure block, because every possibility’s has their own code.
    Pls give me a trick

  • @DinnerboneWiki
    @DinnerboneWiki 19 годин тому +1

    omg 256 likes beautiful number

  • @simbafs
    @simbafs 18 годин тому +1

    How about change `LDI r1 4` to `LDI 4 r1`. In this way, the destination address matches those in add, sub instructions. You can avoid the extra mux.

    • @MichelHermier
      @MichelHermier 7 годин тому

      The instructions set seems to be a little bit rushed, lack some experience/oversight. For simplicity I would rename regA in opcodes as the destination register, but it would make a lot of changes in the math open codes. So it may be too late for such change, in that CPU implementation.
      I would have used a pseudo opcode for NOP but that is addressed in the authors top comments.
      Instead I would have used the 0 opcode to implement a interups. It is a nice trick since usually memory is usually zeroed, and hitting non initialized data triggers and interrupt, such is "better" than silently continuing.
      That said it is fine. Learning is also making errors and reflecting on the mistakes from us and others, and making tradeoffs.
      That series taught me the reason for the r0 being hardwired to 0 that puzzled me for years in some CPU designs, and I'm grateful for that.

  • @FluffyCatsindeed
    @FluffyCatsindeed 20 годин тому +2

    I got here quick!

    • @MelonMaguYT
      @MelonMaguYT 20 годин тому +5

      Thanks for letting us know, FluffyCatsindeed.

  • @LVLhereee
    @LVLhereee 19 годин тому

    W VIDEO

  • @mitchtom1409
    @mitchtom1409 17 годин тому

    12:50 is it just me or did it turn black and white here

    • @tudor7397
      @tudor7397 16 годин тому

      Its the same for me

  • @ThatGeometryDude
    @ThatGeometryDude 20 годин тому

    LES GO

  • @RayhaanAlamgirShahjehan
    @RayhaanAlamgirShahjehan 7 годин тому

    I made a computer(of sorts) that only has a 12 bit instruction

  • @rodrigoqteixeira
    @rodrigoqteixeira 22 хвилини тому

    Me wants functional madness. Me no like harvard. Me like ace. Give us ram code execution pleese

  • @Realduokidsfan
    @Realduokidsfan 20 годин тому

    👍

  • @ELITE-CHIEF-DRILL-MAN-ko3yp
    @ELITE-CHIEF-DRILL-MAN-ko3yp 18 годин тому

    Wow

  • @chamoischamois
    @chamoischamois 20 годин тому

    more than 25 comments in 4 minutes, nice

  • @DeadShot-c4q
    @DeadShot-c4q 20 годин тому

    31 in comments in 18min thats crazy

  • @Quartef12345
    @Quartef12345 20 годин тому +1

    NEW VIDEO LETS GO
    First comment nice

  • @CheesyEngineer100
    @CheesyEngineer100 20 годин тому

    hi guys

  • @sidarth632
    @sidarth632 20 годин тому

    Clicked so fast

  • @ItzFlowerGMD
    @ItzFlowerGMD 20 годин тому

    peak

  • @UnfussyLeaf2440
    @UnfussyLeaf2440 17 годин тому

    hi

  • @manouel3417
    @manouel3417 20 годин тому

    Hello

  • @yaniro7153
    @yaniro7153 16 годин тому

    I am not very early

  • @MofoMan2000
    @MofoMan2000 18 годин тому

    But can it run DOOM?

    • @samuelhulme8347
      @samuelhulme8347 17 годин тому

      Not at the moment, we need a program counter, jump instructions, enough instruction memory, a graphical display, keyboard or mouse input (which requires some sort of interrupts or simple polling), a C compiler that uses our custom instructions, then just MAYBE we will be able to run doom (or at least a custom version built from the ground up), ALSO we probably need some RAM too.

  • @hunterprice321
    @hunterprice321 18 годин тому

    Yeah I still can’t make a piston door

    • @samuelhulme8347
      @samuelhulme8347 17 годин тому

      That’s a completely different field of redstone, I’ve done lots of digital logic with redstone and I am unable to make piston doors bigger than a 2 x 2.
      Well, there’s still time to learn I guess?

  • @redstoniker6424
    @redstoniker6424 14 годин тому

    I build the computer using the tutorial in Excel😂

  • @WafflingWaffler
    @WafflingWaffler 20 годин тому

    yo I'm early!

  • @DeadShot-c4q
    @DeadShot-c4q 19 годин тому

    im the 200th like

  • @ThrowTop
    @ThrowTop 18 годин тому

    the video compression is insane, record in higher quality

  • @ZackaryTipton-jk5mo
    @ZackaryTipton-jk5mo 17 годин тому

    4081veiw

  • @ECanDo
    @ECanDo 19 годин тому

    Weeeeeeeee

  • @gavinjustakid_abu8588
    @gavinjustakid_abu8588 20 годин тому

    1st thats not matt

  • @Otheraccount-k3c
    @Otheraccount-k3c 20 годин тому

    close 2 first

  • @lilicrafter
    @lilicrafter 19 годин тому

    I like this series