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.
@AN717174 сағат бұрын
so cool!
@SubatomicPlanets4 сағат бұрын
I'm a programmer and game developer and this series is gold! I love understanding such low level topics like CPU architectures but most learning resources are boring or too complicated. But your videos are fun! Explaining it with minecraft really helps too! Thanks for making this series!
@FrightfulMC4 сағат бұрын
I agree
@doodocina2 сағат бұрын
what language do you program in?
@The_real_CreepermasterСағат бұрын
True
@SubatomicPlanetsСағат бұрын
@@doodocina Mostly Python, C#, and C++
@doodocinaСағат бұрын
@@SubatomicPlanets you love such low level topics but program in python, c#?...
@the_m_original2 сағат бұрын
4:43 quick note from me here: if your program counter is quite literally a counter that you can set to any time, i recommend just setting it to the jmp address -1, so when it increments, it goes to the correct address. (this preproccessing step can be done in hardware, by making an adder that adds 255 to the jmp address and having the result get stored instead of the actual address) 7:06 another way to solve this is, get this, implementing temporary pointers in the assembler (JMP [pointer] -> pointer: \code), which, even if gets more instructions added before the pointer, will move the pointer up.
@mtarek200552 минут бұрын
or relative jump as a pseudo instruction
@rtyyyyb10 сағат бұрын
the 3 classic properties of trees: branches. flags. and jumping competitions
@mrseriousv13 сағат бұрын
VOTE MATT FOR THE AWARDS
@Benlego20172 сағат бұрын
typo at 1:10 : you accidentally had the ALU Input B display a 7, not a 3
@altrightz4 сағат бұрын
Everytime matt uploads, I get smarter
@Purple_ProgСағат бұрын
😂 me too
@Cinnimin3 сағат бұрын
Parity is also a neat flag to use if you have the space for it. It is only true if the LSB is true (like the opposite of the negative flag) and can be useful in programs like multiplication :D
@kylebowles982011 минут бұрын
I love that once the computer is turing complete it becomes about making it super convenient to program ❤
@NK-613 сағат бұрын
YESSSSS MATT RELEASED A BRANCHING EPISODE
@Sokar6186Сағат бұрын
Relative jumps also help in the case when your memory is large enough to have addresses larger than instructions themselves. More often than not you need to jump locally for loops rather than across your program, so relative jumps are great for most cases. This way you can quickly and easily do jumps without always needing paging registers.
@henrynagel26583 сағат бұрын
I was so excited for this episode, knowing that selection would make this the real deal
@DarmiGames3 сағат бұрын
This is getting more and more complicated. I've had to rewatch and pause the video to understand it. Thank you for this series!
@PSP_242 сағат бұрын
I'm taking an assembly and architecture class at the same time as this series, it's amazing how well you are able to describe every concept better than my prof! Plus it's really cool to see what i'm learning in class be put into minecraft lol
@Sand.53 минут бұрын
I was having trouble adding flags to my CCA this morning, so this will definitely help!
@MrTurtleWithTophat4 сағат бұрын
Man, you posted this right as I was watching the redstone awards trailer.
@EliaxLavrix__2 сағат бұрын
All my fellas🔥
@whisperSSG843 минут бұрын
finally he caught up to my microcontroller engineering 2 module now i can just watch this instead of going to lectures
@SobTim-eu3xuСағат бұрын
Bro, I respect you
@diggoran2 сағат бұрын
Interesting seeing the branch conditions not being built into the opcodes. I expected JEQ and JNE to be their own opcodes, but you're able to do a 4 in one with BRH due to using a 10 bit address and having 4 bits left over.
@Harmon-3 сағат бұрын
i have absolutely no idea what this means but i love it
@icy_orca934849 минут бұрын
This guy has inspired me to study computer science
@MasonAlex-f9p2 сағат бұрын
you should add an even flag, it could be useful in bitwise operations
@MadocComadrin42 минут бұрын
It's a bit of interesting pedantry, but it's not actually Turing Complete yet. With only a finite number of finitely-sized registers, we can only decide problems in constant space, i.e. DSPACE(O(1)). But DSPACE(O(1)) is contained within the Regular Languages. Anything this computer could do that halts, a DFA could be made to at least brute-force it. We need memory (in an amount that varies greatly enough with the size of the input) to do better, and we'd need unbounded memory (and a way to access it) to be Turing Complete.
@thebluefroganimation4 сағат бұрын
another video. another APSALUTE BANGER
@shailist50 минут бұрын
relative jumps are far superior to absolute jumps when you introduce dynamic code loading and relocations. since this architecture uses a ROM, dynamic code loading and relocations are never a problem. (tho mplementing relative jumps is as easy as plugging the operand into the addition in the program counter)
@gamerguy45513 сағат бұрын
Bro wth ur da goat
@lorenzomarconetto4 сағат бұрын
You are the best
@BaldiReycaster2 сағат бұрын
Nice.
@banan_guys4 сағат бұрын
Good job
@FeriElenatro3 сағат бұрын
Matt, what about being able to specify the address of a register/memory location as a number from a register? For example, if register 1 stores the number 3, then will do something with register 3
@Purple_ProgСағат бұрын
you mean like pointers ?
@MrMoon-hy6pnСағат бұрын
I imagine once he gets to memory he would implement something like an “ldr”instruction, load from memory address into a register (and set the zero flag?) as well as the complementary store opcode. Then the world’s your oyster.
@rodrigoqteixeira3 сағат бұрын
10:15 everyone has made mistakes. Everyone has been on the unexplainable darkness. Glad to hear you're normal now
@rodrigoqteixeira3 сағат бұрын
5:46 love how this version of the computer that doesn't have BRH is actually cool, not because it's any powerful or even useful, but because its halting problem is solved.
@Kynatosh3 сағат бұрын
Yeah it is solved because it has no conditionals so you can solve for "does it end or not" in polynomial time: if there is a loop at any time, it won't ever end.
@diggoran2 сағат бұрын
Zero 7 mentioned
@thesp1r1tdragon5531 минут бұрын
If direct jumping is better on the actual hardware why would you ever do relative jumping? Couldn't you just translate all the relative jumping instructions in your code to direct ones during the assembly process?
@Didomate3 сағат бұрын
Clicked on this on the very first Planck second
@UtkuDeniz1233 сағат бұрын
Im sure that he is programming in assembly.
@mine_blame2 сағат бұрын
clownpierce posted at same time lol
@codeflowshai3 сағат бұрын
under 30 minutes?!
@eclipse082713 сағат бұрын
Hi
@whylookhere4 сағат бұрын
hi
@rodrigoqteixeira3 сағат бұрын
4:08 OH YEAH BOYS, INTRODUCING *BRH* !!!!! 🎉🎉
@rodrigoqteixeira3 сағат бұрын
4:28 those 2 free bits. Maybe they could be used for relative jumps...? Think about it master
@rodrigoqteixeira3 сағат бұрын
2:35 nice, you used the congruent simbol :)
@lolmuffen86044 сағат бұрын
Yoooooooo!!!!!!
@ELITE-CHIEF-DRILL-MAN-ko3yp4 сағат бұрын
YAHOOOOOOOOOOOO
@BEAM-BOTOND4 сағат бұрын
Yoooooo!!
@YellowBunny3 сағат бұрын
Edit: It's not as obvious as I thought while writing the comment initially, and I would need to think about this some more to come to a definite conclusion on whether the computer would be Turing complete without branching. The computer was already Turing complete without conditional branching or even any branching (if we assume arbitrarily large memory and program memory, which is always needed in some way for Turing completeness). The proof of this is analogous to the one in the paper "mov is Turing-complete", which also proves the Turing completeness of a subset of a programming language that does not contain jump instructions.
@mattbatwings3 сағат бұрын
@@YellowBunny I’m actually not sure that’s true. I’ve looked into that paper a little bit, and it’s referring to x86’s MOV which is much more capable than any pseudo MOV you could’ve made on my cpu. It relies on a lot of lookup tables and switches between different addresses modes as well. I didn’t really read it that much tho so I could be wrong
@YellowBunny2 сағат бұрын
@@mattbatwings Admittedly, it's been a while since I read that paper and I might not have remembered all the details correctly. It's definitely not as obvious as I thought while writing that comment 10 minutes ago :) I'm not sure anymore myself now. I'll add a disclaimer to the original comment.
@rodrigoqteixeira3 сағат бұрын
10:38 it technically can be considered bad code to use the to changing flags thing but idc that much so I'll use it hehe
@rodrigoqteixeira3 сағат бұрын
Thinking 'bout smth. I'm thinking about making an assembler that supports the normal instructions but also supporting an AVG instruction (average). It would be the same as RSH but the secound parameter may not be set to 0.
@rodrigoqteixeira3 сағат бұрын
8:43 ok. But... BUT DID YOU REALLY HAVE TO MAKE RSH NOT UPDATE FLAGS?!!
@Tbgw4 сағат бұрын
“Only 300000 views in 2 seconds Bro fell off”
@altrightz4 сағат бұрын
Yoooooooooooo!!!! 5 min ago!
@rodrigoqteixeira3 сағат бұрын
5:21 that is so ugly. Just use a damn LSH
@Ghal00xx4 сағат бұрын
3rd :)
@theguywiththewhiteblanket3 сағат бұрын
46th! also NEEEERD
@deltamico2 сағат бұрын
not cool
@catto884 сағат бұрын
Meow!!!! :3
@giovannicesaramorim9adigan9614 сағат бұрын
The instruction set seems extremely innefficient, you could probably double the amount of instructions by rearranging and simulating instructions
@mitchratka36613 сағат бұрын
Efficiency is like the lowest priority for this series, he said it outright in the beginning, this instruction set is supposed to be the simplest/most readable
@giovannicesaramorim9adigan961Сағат бұрын
@@mitchratka3661 not even, no op has no reason to exist, and was only added due to "style", where a whole instruction could be fit. Also, multiple holes are left in the operand part of the instruction set, where it could be filled with another instruction (where if != 0 it is the said instruction).