How computer processors run conditions and loops

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ก.ย. 2024
  • This video was sponsored by Brilliant.
    To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/.... You’ll also get 20% off an annual premium subscription.
    In the final episode of this low-level series, we learn the fundamentals of how computers evaluate conditions and loops, a very important feature that makes them as useful as they are today.
    CPU "emulator" tool:
    tinycpu.com/co...
    Questions and business contact:
    contact.coredumped@gmail.com
    Join our discord server:
    / discord
    Follow me on twitter:
    twittter.com/c...
    Twitch:
    / coredumpped
    Sponsor me on Github:
    github.com/jdv...

ความคิดเห็น • 302

  • @CoreDumpped
    @CoreDumpped  22 วันที่ผ่านมา +34

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

    • @ysblt1069
      @ysblt1069 20 วันที่ผ่านมา

      the AI voice ruined the experience

  • @abots
    @abots 20 วันที่ผ่านมา +270

    I still cannot believe this channel exists man. Generational content

    • @Dreamer66617
      @Dreamer66617 20 วันที่ผ่านมา +9

      where the fuck was this during my CS degree ffs

    • @dalejulson3175
      @dalejulson3175 18 วันที่ผ่านมา +3

      @@Dreamer66617 I don’t mean to sound like a grandpa, but kids really don’t understand how lucky they are to have these sorts of resources these days. NONE of this existed when I was in school. You read a textbook and that was it.

  • @itso6778
    @itso6778 20 วันที่ผ่านมา +76

    Dude not only do you have the talent to explain low level concepts in an intuitive way to understand. You provide stunning visuals as well, what a gem for the computer science community

  • @d3thtr4p10
    @d3thtr4p10 20 วันที่ผ่านมา +70

    We're truly living in a golden age of educational content on TH-cam when we have access to these kinds of videos. I love it and thank you for it.
    Question: Have you considered making a video about Virtual Memory sometime in the future? I still remember how mindblown I was when I learnt about it in college.

    • @dervaken3902
      @dervaken3902 19 วันที่ผ่านมา

      I would LOVE a video about virtual memory

  • @ezsnova
    @ezsnova 20 วันที่ผ่านมา +35

    Core Dumped is the GOAT of Computer Science teaching videos

  • @Jaynautic
    @Jaynautic 15 วันที่ผ่านมา +4

    i honestly was barely even interested in learning about how lower level programming works until i stumbled across this channel. truly incredible content

  • @efe099
    @efe099 22 วันที่ผ่านมา +31

    At 8:15 I was like, wonder if it would be turing complete.. and you just made a cliffhanger 😂

    • @M_1024
      @M_1024 20 วันที่ผ่านมา +4

      With all the instructions in this video it's Turing Complete.

  • @by010
    @by010 20 วันที่ผ่านมา +15

    I am developer, as job. Man, the "from the transistor to the code" thing was bugging me for years. This channel exists and explained it all to me, and continues to do excelent job at that. The amount of questions I happened to have over +- 15 years that are just casually explained in plain english and plain animations here.... Insane. Since these questions were bugging me in long time, I had fragments of knowlage that I managed to get on my own, you managed to fill in the gaps and make it make sense in total. Nobody in uni managed to make it happen.
    Thank you very much for this channel. Like, actually. Thank you for this. I mean it.

    • @Aim54Delta
      @Aim54Delta 20 วันที่ผ่านมา +3

      I come from the electronics world, first - doing band filters, op amps, and flip flops before getting into logic gates and registers.
      I always thought I was missing something when I would go to program in C. I could easily dissect what other programs were doing, but I always felt like I was not understanding what the computer was actually doing or how to actually tell it how to move the data as I visualized things.
      Then, I started playing ExaPunks and realized the problem is that I should have just learned assembly, as assembly is exactly what I was expecting a programming language to be and made sense to me.
      I can work in higher level languages, but it is so much easier, now that I understand just how fundamentally different "programming languages" are from hardware programming. Programming languages are math languages - platonic constructs which are mapped onto assembly instructions by glorified macros. The people writing in them may know assembly and what is going on in the computer, but the language itself is not usually designed to control the machine, but to describe an abstract flow of concepts without knowing anything about the machine.

  • @DevXcode_P
    @DevXcode_P 20 วันที่ผ่านมา +11

    OMG BRO THANK YOU!!!!!!!!!!!!!!!!!I built a computer about a month ago in minecraft and still couldn't figure out how to make conditions and cycles, but thanks to you, I can complete my computer and present it to my subscribers. If I do make a video and post it, I will definitely leave a link to your video

    • @CoreDumpped
      @CoreDumpped  20 วันที่ผ่านมา +4

      Glad I was helpful!

  • @kacperillo
    @kacperillo 20 วันที่ผ่านมา +12

    Your videos are so great! It would be excellent if you could also explain how multistate conditions using AND/OR are processed in your future videos

    • @jingbinyu8136
      @jingbinyu8136 19 วันที่ผ่านมา

      I think for AND, first do the check for the first condition, and then do a conditional jump to the code after the if branch when the first condition is not met. Then, put the code to check the second condition right after the jump. Then after the code checking for the second condition, put a conditional jump to the code after if when the second condition is not met. Then put the body of the if statement after that jump.
      For OR, first check for the first condition and do a conditional jump to the start of the if branch code when the first condition is met. After the jump, put the code checking for the second condition and then do a conditional jump to the code after if branch when the second condition is not met. Then put the if branch's code after the jump

    • @jingbinyu8136
      @jingbinyu8136 19 วันที่ผ่านมา

      This also implies the short-circuit-ness of the logical AND and OR

    • @nbboxhead3866
      @nbboxhead3866 19 วันที่ผ่านมา

      Here's some example code, where "jump_if cond location" means to jump to the location if the condition is satisfied. Addresses are replaced by flags (such as code_start) because that's how you write assembly without having to change address locations all the time. code_start is obvious, but code_end always refers to immediately after the code, not the last line of the code. "any" just means that the instruction doesn't matter for the integrity of the conditional logic.
      OR:
      jump_if A code_start
      jump_if B code_start
      jump code_end
      code_start: any
      ...
      code_end: any
      AND:
      jump_if A b_cond
      jump code_end
      b_cond: jump_if B code_start
      jump code_end
      code_start: any
      ...
      code_end: any

  • @thefanboy3285
    @thefanboy3285 20 วันที่ผ่านมา +9

    My dude just made assembly look simple and easy !

    • @kevinscales
      @kevinscales 20 วันที่ผ่านมา +1

      That's the thing, it really is simple. Just verbose and fiddly with all the memory management and different for each architecture.

  • @CybernetonPL
    @CybernetonPL 20 วันที่ผ่านมา +19

    Bro is helping me make a 16bit CPU inside a game running on a cpu inside a plastic box

  • @calming_nothing
    @calming_nothing 20 วันที่ผ่านมา +47

    when youtube notifications actually work:

  • @hrishikeshaggrawal
    @hrishikeshaggrawal 20 วันที่ผ่านมา +11

    Incredible, most people think assembly is worse compared to hlls but that always confused me.
    Since most ppl with any hll experience usually start with coding before undertanding the circuits at the hardware level that would naturally be the case.
    Meanwhile, I began my journey trying to build something turing complete with just a clock, some memory and some gates in a simulator.
    It came naturally to me as I designed the ram and alu(alu needs at least only add and invert functions, rest can be derived), that you just need 3 special registers(accumulator, instruction reg, address reg), the ability to define variables, and most importantly the final piece; at least one flag and a instruction for conditional jumping to finally make something turing complete.

    • @ArneChristianRosenfeldt
      @ArneChristianRosenfeldt 20 วันที่ผ่านมา

      Most people want results . Python gives them ML . Do you meet people who claim to understand C++, Haskell, and all of C# ?

  • @xOWSLA
    @xOWSLA 22 วันที่ผ่านมา +7

    When I see a new video, I am excited as same as the release of a new episode of my favorite TV show.

  • @rammrras9683
    @rammrras9683 13 วันที่ผ่านมา +1

    I envy CPU architecture students. When I studied it, there wasn't all this high quality content available online. You're doing a wonderful job!

  • @4RunnerVideo
    @4RunnerVideo 19 วันที่ผ่านมา +1

    You are seriously talented.
    I am learning embedded software programming right now and your channel is helping me deeply understand what is going on at the low level.
    Also, the CPU emulator tool you made is beautiful.
    I hope you get the recognition you deserve && get to do what ever you want to do (which I selfishly hope is to continue to make great content like this) && be properly compensated for it.
    You are making a difference.

  • @user-rk6rp2es6m
    @user-rk6rp2es6m 13 วันที่ผ่านมา +1

    I'm taking a coumputer architecture course at uni. This is super useful and easy to understand. Thank you very much!

  • @Lord-Sméagol
    @Lord-Sméagol 20 วันที่ผ่านมา +2

    Very clearly explained.
    Your instruction set is very close to the language I started with at school, many years ago (using 3B pencil and 40-column cards).
    It was CESIL (Computer Education in Schools Instruction Language), which had only 14 instructions.
    All operations (IN OUT LOAD STORE ADD SUBTRACT MULTIPLY DIVIDE) were done through the accumulator and numeric constants or user-named variables.
    It had JUMP JINEG JIZERO, which is enough to do most things.
    And the remaining instructions:
    PRINT [some_text] to the printer
    LINE to start a new line on the printer (sometimes useful after OUT and PRINT).
    Finally, HALT to end the program.
    It was a good introduction to programming, makign you think about every step required to solve your problem.
    On the subject of educational programming, I recently encountered Scratch. Looking at its available blocks, I think it is a very good educational tool.

  • @oglothenerd
    @oglothenerd 20 วันที่ผ่านมา +5

    Now you gotta explain how a MMU works.

  • @santiagoerroalvarez7955
    @santiagoerroalvarez7955 19 วันที่ผ่านมา +1

    This is one of the best channels I have ever encountered in TH-cam. Thanks for your work, man!

  • @DanielGrbacBravo
    @DanielGrbacBravo 8 วันที่ผ่านมา

    I can't believe how good these videos are, I remember taking computer architecture at uni and its was nowhere near as clear and well said as this video, congrats!

  • @maanceto2
    @maanceto2 20 วันที่ผ่านมา

    Man, your videos have really helped me get into computer science and understand the process behind coding. You completely changed my perception of coding and finally answered my questions about how computers work in a clear and enlightening manner. Please continue!

  • @barni_7762
    @barni_7762 18 วันที่ผ่านมา +1

    Dude is making an "all of computer science" series, amazing :)

  • @NonStopBiyori
    @NonStopBiyori 3 วันที่ผ่านมา

    Man i really love this channel, it makes low lever programning easier

  • @trimuloinsano
    @trimuloinsano 20 วันที่ผ่านมา +2

    This channel is underrated. Great work!

  • @MercurySteel
    @MercurySteel 19 วันที่ผ่านมา

    While watching this video I realized something. While loops use mutiple jump instructions but if we place the body of the while loop first and place the conditional jump at the end of it, we will get a do-while loop which takes less lines of code. I always found do-while loops useless but now I see why they exist. Thanks for making this video. I always learn something new with each video.

  • @olhoTron
    @olhoTron 20 วันที่ผ่านมา +2

    11:04 some CPUs dont have flags, for example the xtensa CPU on the older ESP32 MCUs have some instructions like "branch if zero", "branch if less than" etc that take registers as parameters and the target offset as a immediate, I recall reading somewhere that it was done this way to make the circuitry simpler since its a customizable CPU... but who knows if this is actually the case

  • @muffincodingchannel
    @muffincodingchannel 11 วันที่ผ่านมา +1

    Info surrounding these concepts is usually very dense. You do an amazing job of making them not.

  • @matrix9134
    @matrix9134 20 วันที่ผ่านมา +1

    oh my God, bro I cannot believe that there is such a channel you're amazing bro please can you make the same tutorial videos with that low level but this time with functions and objects and classes how are these things and entities are implemented in the hardware level, please I've been searching for all of that the whole of my life.

  • @eanerickson8915
    @eanerickson8915 20 วันที่ผ่านมา +15

    do function call next.

    • @lMoonHawk
      @lMoonHawk 20 วันที่ผ่านมา +1

      very interested in this and vtables as well

    • @kevinscales
      @kevinscales 20 วันที่ผ่านมา +5

      In case you can't wait, this is my barely self-educated understanding for a simple subroutine that doesn't take arguments or return a value:
      Store the address of the next instruction to be run after the function returns into a memory location (the current position in the call stack) then increment or decrement (depending on which way your call stack grows) the current position in the call stack (push operation) then jump to the address of the function you are calling (might want to check for stack overflow during the push operation)
      At the end of the function, roll back the current position on the call stack (pop operation) and jump to the location stored there.
      There are assembly instructions that will do some of this work for you. You don't actually have to manually manage your own call stack (although you can if you want more stuff to manage), there are 'call (address)' and 'return' instructions that do the pushing popping and jumping.
      To pass values to and from functions you will need a stack that also stores the size of the data pushed in each push operation in order to be able to pass arbitrary amounts of data and pop the stack later (for the simple call stack, addresses are all the same size and only one at a time is pushed so no need). The reason you want to use stacks for function calls is so that you can call functions from within functions from within functions etc. including recursive functions that each have their own memory that isn't overridden by other calls and doesn't require complicated code to keep track of where each part of the memory is.

    • @nbboxhead3866
      @nbboxhead3866 19 วันที่ผ่านมา

      One way you can make (non-recursive) functions with arguments and return values is to:
      - Write input values to parts of memory dedicated to the function's input
      - Write an address to the end of the function for it to jump to when finished
      - Jump to the start of the function, have it do whatever it does (with input and output addresses in mind)
      - Read from a dedicated output location in memory to get results after the function finishes
      It could do with a better explanation than what I've given, but that's a way to do it if you have a process that can only have one instance running at a time. If you do want to get multiple instances/recursive functions involved, you need to get list management involved and all that jazz, which isn't the worst but takes a little extra work.
      You can add to a list of values without worrying about it running into something else by splitting it into blocks, with each one specifying its length and where the next list block starts for if you need to look up something beyond the current block. All you need is a way to check where is allocated and where isn't so you know when and where to make a new block, which isn't too bad.
      Once you can make lists, you can convert each function's input set and exit location to jump to (but not necessarily the output set) into a few lists, and you can read the input values of the current stack layer by looking up the last values in the list. Assuming you remove items from the list after you use them, you have a functioning stack. It'll still work if you don't deallocate, but you'll have a memory leak identical to one on a modern framework and eventually will run out of memory and run into whatever edge case you've set up for when you cannot make more list blocks.
      The simpler way to do this if you're fine with a limited number of stack layers is to make arrays instead of lists, (the difference being an array has a set length while a list does not) and use an address to keep track of which stack layer you're currently on. This is all fine and good, but if you want to continue recursing you'll want my previous solution.
      I hope this explanation is good enough until we get a video on it, and if there's anything to clarify or correct I'm happy to hear it. Bot-ass way to finish a comment but still.

  • @singmantkpss
    @singmantkpss 5 วันที่ผ่านมา

    Couldn’t find better content explaining this concept

  • @Dreamer66617
    @Dreamer66617 20 วันที่ผ่านมา +3

    This is so incredibly well put. Wish i had this during my undergrad in CS

  • @Arquinas
    @Arquinas 20 วันที่ผ่านมา +1

    I love your content. It has been the most clear and thorough explanation of low level computer processes i've seen on youtube. And I honestly don't mind that you are using an AI generated voice. if anything its a testament to what kind of absurdly complex things you can make with simple switches. It really kind of drives the point home how ridicilous modern computers actually are and it just makes me appreciate what we have more.

  • @nevokrien95
    @nevokrien95 20 วันที่ผ่านมา

    Oh that last slide of the making from ur set to the arm/x86
    Pure gold

  • @user-hk4cu5go9c
    @user-hk4cu5go9c 20 วันที่ผ่านมา

    You are genuinely my favourite youtuber - please never stop making these videos man!!

  • @NikolaNevenov86
    @NikolaNevenov86 20 วันที่ผ่านมา +1

    Sweet!
    Makes me want to learn Assembly more :)

  • @Reinaldo-e9y
    @Reinaldo-e9y 11 วันที่ผ่านมา

    That's why with a NPU we just need to input the values we need to calculate and let it iterates, respecting the flags conditions. 12:05

  • @InterDylan
    @InterDylan 20 วันที่ผ่านมา +2

    You are so great at teaching!
    Assembly always seemed like it was orders of magnitude more complex and arcane than C.
    But if what you said in this video was in any way accurate, i feel like i could make comparable program in x86 assembly if i took the time to learn it.

  • @harshnj
    @harshnj 20 วันที่ผ่านมา +1

    True! TH-cam Education is a revolution in itself. My COA professor taught me this topic and this weird assembly syntax just yesterday and no one understood anything, and today I see this video. Truly Brillant!

  • @Anjalisharma-dk6tk
    @Anjalisharma-dk6tk 20 วันที่ผ่านมา

    I would rather binge watch your content than any content available on Netflix. It's just so GOOD!

  • @blackdragon-et1ui
    @blackdragon-et1ui 20 วันที่ผ่านมา

    The more you make videos, the more I get hyped for the next ones !

  • @addajs3200
    @addajs3200 20 วันที่ผ่านมา +1

    Thank god you exist bro

  • @meeehdy6481
    @meeehdy6481 6 วันที่ผ่านมา +1

    what a stunning explanation and illustration, pretty useful♥.

  • @eldersprig
    @eldersprig 20 วันที่ผ่านมา +1

    Forth and a class on 6502 helped me figure this stuff a long time ago. Although you're going on to other topics, a part 2 for this video would be the case statement. When done in assembly language its an exercise in table lookup.

  • @thevrgrandpa2247
    @thevrgrandpa2247 20 วันที่ผ่านมา +1

    Please make a video about how instructions (commands) are decoded and encoded in the processor at the binary level

  • @anon_y_mousse
    @anon_y_mousse 9 วันที่ผ่านมา

    One of the things I would add is that "modern" processors have had the ability to load immediate values from the stream of instructions for many decades. It's a significant improvement on data loading efficiency and that's how it should be modeled. Also, optimizing compilers would convert that addition in the code into a single value. Some will do it without optimizations turned on.

    • @CoreDumpped
      @CoreDumpped  9 วันที่ผ่านมา +1

      We'll discuss this in the video about Compiler-Optimizations.

  • @ironic_bond
    @ironic_bond 20 วันที่ผ่านมา

    Look forward to your Turing completeness video ;) good job!

  • @amankishore3512
    @amankishore3512 20 วันที่ผ่านมา

    This is like the best channel. Now i wonder how functions work? Or r they just variables interconnected to each other

    • @hrishikeshaggrawal
      @hrishikeshaggrawal 20 วันที่ผ่านมา +2

      It's the compiler doing it's job, the compiler is essentially a library of how high level complex functions are performed by a series of low level instructions, and replaces the text of a typed function with a longer list of instructions automatically before feeding it to the computer.

  • @AntonioZL
    @AntonioZL 20 วันที่ผ่านมา

    Really excited for scheduling and threading.
    Btw, a little optimization could've been made with the conditional code: instead of a JMP_NEG addr followed by a JMP halt_addr, a JMP_ZERO halt_addr would've been enough. :)

  • @Sinthoras155
    @Sinthoras155 20 วันที่ผ่านมา

    I learned about a really simple instruction set made for learning in school. It is called "Bonsai Computer" and consists only of 4 instructions, increment, decrement, jump and test (+ the hlt instruction). I think it was developed by some German teacher, so I couldn't find English resources. It is really interesting tho, as it is turing complete

    • @hrishikeshaggrawal
      @hrishikeshaggrawal 20 วันที่ผ่านมา

      What's Hlt? How many flags did it have? You need only one.

  • @markfdez6718
    @markfdez6718 20 วันที่ผ่านมา +1

    No decepcionas nunca Jorge :) gracias por el video ❤

  • @jnr.guerreiro
    @jnr.guerreiro 6 วันที่ผ่านมา +1

    You content and production is awesome. Great channel, congrats. 🎉How do you do your animations ?

  • @Winkelknife
    @Winkelknife 19 วันที่ผ่านมา

    Thank you very much for making this high quality and free accessible video for us ❤

  • @666rusoeb
    @666rusoeb 15 วันที่ผ่านมา

    I like that preview picture in this video with randomly added code

  • @deno8322
    @deno8322 20 วันที่ผ่านมา +2

    In 14:13 I didnt get why you didnt place HALT instruction to memory location 0101 instead of JMP. Does HALT has to be located at the end of our instructions?

    • @CoreDumpped
      @CoreDumpped  20 วันที่ผ่านมา +1

      If there was more code to run after the loop, the program should jump to that code and continue execution. But since there is no more code, the Halt instruction is put there to make the CPU stop. Otherwise it will continue fetching and running data as if it were more instructions.

    • @kevinscales
      @kevinscales 20 วันที่ผ่านมา

      In this case you could, but in the general case there is going to be more code.

  • @AissaDev
    @AissaDev 20 วันที่ผ่านมา

    What an amazing video. Please do more of assembly videos❤❤❤

  • @kr4ck3d56
    @kr4ck3d56 20 วันที่ผ่านมา

    Been trying to implement an optimizing compiler for a while now. I would LOVE a video on the topic.

    • @ArneChristianRosenfeldt
      @ArneChristianRosenfeldt 20 วันที่ผ่านมา

      What if you don’t have a linker or some JIT? I think that it should be possible to assign registers for small procedures and blocks. Callers will probably run out of registers and will have to shuffle around some.

  • @911Salvage
    @911Salvage 17 วันที่ผ่านมา

    Your videos would've helped me tremendously when I was a CS major, 22 years ago.

  • @Dreamprime
    @Dreamprime 20 วันที่ผ่านมา

    It is not a video about computer programming, it is art of presentation on its best

  • @FUTFFF749
    @FUTFFF749 17 วันที่ผ่านมา

    Bro this channel is a hidden gem i ve paid dollars for courses that served me nothing and you my friend for absolutely 0 dollars are giving this knowledge god bless ❤❤❤

  • @0x5D
    @0x5D 20 วันที่ผ่านมา

    I second the compiler optimizations video

  • @lloydlion8959
    @lloydlion8959 20 วันที่ผ่านมา +1

    Hello Core Dumped, this video is really cool and simple explanation how to computer works. I understand that it is oversimplified but there are some mistakes.
    1. Single numbers never stored in special segments of ram, they just baked into instructions: LOAD R0 1001; ADD R0, 5; STR R0 1001, it works only for arrays, strings and etc.
    2. Static data and variables (local/static, global/dynamically allocated) are not mixed in same memory. real memory layout looks like that:
    start (0x00) [Code] [Static data] [Global vars] [Heap] ..... [Stack] end (0x00), static data is stored next to code, not at end of memory
    3. Real local variables usually don't allocate on stack (ram) if it not necessary, it means no STR instruction will be executed until you call function
    4. Virtual memory is not topic of this video, but when we talking in terms of 'start' and 'end' of memory, there are many questions about other programs on same computer
    5. 7:18 Real programs don't store zeros in bin files, there are only code and data in files
    6. Some mistakes in condition work: actually, there is only one conditional jump with inversed condition that skips condition code
    P.S. I am not computer engineer and also could have made some inaccuracies
    P.S. #2 I did not say that include all of that into 17-minute oversimplified video
    Thanks for you video again ❤

    • @hrishikeshaggrawal
      @hrishikeshaggrawal 20 วันที่ผ่านมา

      Where'd you learn all this.

    • @yet_another_communist
      @yet_another_communist 20 วันที่ผ่านมา +1

      He was showing sort of a bytecode more than machine code. That's why there are different instructions and functionality compared to x86_64 and ARM.

    • @rogerlevasseur397
      @rogerlevasseur397 20 วันที่ผ่านมา

      And layout isn't fixed in stone either. A port of System V release 2 for the 286 to simplify things had a slightly different layout. For modern stuff, between the Heap and Stack is an area where shared binaries are mapped into the address space. Having static data together with code allows that portion of memory to be read-only and shared with other processes using the same program.(more advanced stuff).

  • @efe099
    @efe099 22 วันที่ผ่านมา +2

    a video about how variables and pointers are actually stored would be fantastic 😅 like I belive I am speaking for a lot of begginers when I say Its realy hard to conceptualize what does something like double x = 123456; and int * x = &y; actually do in low level

    • @penfold-55
      @penfold-55 20 วันที่ผ่านมา +1

      Pointers arent as bad as they are made out to be. What is often confusing is how/when they are used and the implementation of them.
      A pointer is just a memory address. On its own, it doesn't tell you anything more. Think of it like a TH-cam video time stamp, "go to this part of the video".
      When you store data, say a 20 character string, you might store it back-to-back (contiguous). A pointer to that string just puts the cursor at the front of the string in memory.
      As I said, often the implementation is confusing, but in fundamental principle it's not difficult

    • @kevinscales
      @kevinscales 20 วันที่ผ่านมา

      @@penfold-55 Yeah, the fact that pointers have a type is just so the compiler knows how to handle the data the pointer points to. Any form of indirection (like pointers) adds more you might have to think about.

  • @Firestorm-tq7fy
    @Firestorm-tq7fy 2 วันที่ผ่านมา

    Pls do more videos on making optimised programs. Or rather explaining the underlying stuff so we can write good code. Love ur work ❤

  • @nbboxhead3866
    @nbboxhead3866 19 วันที่ผ่านมา

    This is great stuff! I built a 12-bit (16-bit if you're talking about the address data length, but 12-bit numbers) computer in Scrap Mechanic with programming it in mind, and this is the exact thing I have to do! I mean, I built the jump operations around comparing the two registers it has instead of ALU flags, (my computer doesn't have an ALU, the registers do incrementing/decrementing and there's no other arithmetic other than the comparison I've mentioned) but the style of code I have to make is identical. I'm looking forward to upgrading it to 256 or even 4096 addresses and seeing what I can make with it!

  • @Amarth1988
    @Amarth1988 9 วันที่ผ่านมา

    This channel is pure gold

  • @catfish3069
    @catfish3069 19 วันที่ผ่านมา

    Can't wait to see your next videos
    Thanks for all the work, time and love you put into this, it's awesome

  • @leftenanalim
    @leftenanalim 20 วันที่ผ่านมา

    This making me more and more excited to learn assembly!

  • @IvanToshkov
    @IvanToshkov 19 วันที่ผ่านมา

    Great video! I only have one minor note. I think it would be more consistent to name the instruction JMP_POS instead of JMP_ABV.

  • @rankonanamokoena312
    @rankonanamokoena312 17 วันที่ผ่านมา

    Please do a video detailing interaction between CPU and IO devices

  • @johnnytoobad7785
    @johnnytoobad7785 19 วันที่ผ่านมา

    The PDP-11 did this much more efficiently with its macro-11 assembly language.
    Back in the 70's (when taking Comp Sci courses in college..)
    I used a text book called "Structured Computer Organization" -- Tanenbaum (pub: Prentice Hall 1976)
    It explains all this kind of low level "machine code" for different popular machine "architectures" of the day.
    I guess books like that don't get written anymore...still have that book...
    But your automation makes it all the more "comprehensible" than just reading about it with B&W illustrations.
    Also the classic work: "The Art of Computer Programming Vol 1" (Donald Knuth) introduces the student to "Assembly language"
    using the "make believe" MIX language. I guess today if you need super fast code..you just write it in "C".
    "No Assembly Required" 🤗

  • @Manabender
    @Manabender 20 วันที่ผ่านมา

    8:15 While this is a *big* tangent, it's actually been demonstrated that the x86 mov instruction is Turing-complete. There's a lot of trickery and extreme abuse of x86 addressing methods involved, but it's been shown, and done. Look it up, it's a great read/watch!

  • @philpeko1796
    @philpeko1796 20 วันที่ผ่านมา +1

    👍👍👍👍👍Well, I pushed the "Like button" even though I did not learn some new thing, but I very much enjoy the way you made it. I would have learn with such videos 50 years ago. I envy a lot the young programmers who can learn from your content. You might want to elaborate on the different Assembler syntax, the Intel syntax type {operand / destination / source} opposite to AT&T syntax {operand / source / destination } Peace & Prosper. ❤🖖

  • @yashasvikumartiwari
    @yashasvikumartiwari 20 วันที่ผ่านมา

    This video was really great I really enjoyed and learned a lot, I am so thankful that channels like yours exist ❤❤❤❤

  • @tech_simpleterms
    @tech_simpleterms 19 วันที่ผ่านมา

    I can't wait for the next episode date and details. Kindly provide now.

  • @dzuchun
    @dzuchun 20 วันที่ผ่านมา +1

    compiler optimizations?!!!
    yesyedyesye pwease

  • @yemi_adetola
    @yemi_adetola 20 วันที่ผ่านมา

    Learnt more in 15 minutes than I did in an entire semester

  • @pingaz4387
    @pingaz4387 10 วันที่ผ่านมา

    Awesome video. What tools do you use to edit/create the slides/videos?

  • @deezydoezeet
    @deezydoezeet 20 วันที่ผ่านมา

    It's Core Dumped Again!!🙌🏾 Timeless!

  • @kossboss
    @kossboss 19 วันที่ผ่านมา

    Your content is going to go down in history as the easiest and best to understand computer science education out there. I am just glad to be catching it as it's made that way I can keep up at my own pace while I study my own stuff. Your gonna get a star 🌟 on some future road marking kings and queens of educational content.

  • @roncho
    @roncho 20 วันที่ผ่านมา

    George is the man!! Fantastic content

  • @shamilniftaliyev
    @shamilniftaliyev 17 วันที่ผ่านมา

    Very clear explanation, thanks!

  • @2k7Bertram
    @2k7Bertram 15 วันที่ผ่านมา

    Beautifully explained! Ive always loved assembly language

  • @othmanekaidi8
    @othmanekaidi8 2 วันที่ผ่านมา

    I wonder what is the continuation of the lessons is. If only they were disposed as a playlist with lesson no 1 then 2 then 3 …
    I went to some complex videos about arrays and tags and thought is was the following ones, I am really confused.

  • @ciCCapROSTi
    @ciCCapROSTi 20 วันที่ผ่านมา

    To be fair, most RISC instruction sets encode the constants into the CPU command itself, so to ADD 20 to something you literally write 20 into the Assembly. I understand that this example is on your made up primitive example, but just wanted to mention that operands are usually not stored in memory as separate addresses.
    And big yes for the compiler optimizations. Your style is just perfect for my understanding level.

    • @ArneChristianRosenfeldt
      @ArneChristianRosenfeldt 20 วันที่ผ่านมา

      Most CISC used immediate values as does JRISC. RISCV can load 32 bit in two instructions. Not clear how 64 bit are done? Only 68k likes to load from elsewhere.

  • @kavindu
    @kavindu วันที่ผ่านมา

    I watched every single video you uploaded. Thank you.

  • @diabloolivero73
    @diabloolivero73 20 วันที่ผ่านมา

    The content of this channel is pure gold on information, thank you so much sir😎😎

  • @dalmationblack
    @dalmationblack 20 วันที่ผ่านมา

    Big recommendation for the game "Human Resource Machine" to anyone who found this video interesting and wants to play around more with this kind of simplified assembly language

    • @baranoid
      @baranoid 20 วันที่ผ่านมา

      if you're more of a RTFM kinda person, go with shenzhen i/o or tis-100. or anything from zachtronics tbh, their games are great.

  • @dead-1ine
    @dead-1ine 4 วันที่ผ่านมา

    This is the best content of whole world about computer science!!!! Thanks a lot :)

  • @mdyousufgazi4030
    @mdyousufgazi4030 18 วันที่ผ่านมา

    In 14:04 why should I jump? Why can't I use halt there? Does it mean we can only write halt as the last instruction?

  • @damonguzman
    @damonguzman 20 วันที่ผ่านมา

    I’m simple man. I see Core Dumped. I click.

  • @rnd_penguin
    @rnd_penguin 12 วันที่ผ่านมา

    Absolutely Goated Channel!

  • @loganhodgsn
    @loganhodgsn 20 วันที่ผ่านมา

    I wish there were two types of assembly: verbose (uses long, descriptive names for instructions, maybe using capital letters to teach you the shorthand instructions) and shorthand (as they currently are)

    • @ArneChristianRosenfeldt
      @ArneChristianRosenfeldt 20 วันที่ผ่านมา

      Names don’t get very long in English: Copy Add Sub And Or load store shift branch or jump multiply divide

  • @Ruisu_11
    @Ruisu_11 20 วันที่ผ่านมา

    This video is great, easy to understand! Thank you for the amazing content!

  • @moyoloco09
    @moyoloco09 6 วันที่ผ่านมา

    Man I love your channel and videos. But what I love the most is your voice.

    • @CoreDumpped
      @CoreDumpped  6 วันที่ผ่านมา

      Sorry to disappoint you but is not "mine". Voice is computer generated.

  • @Oussamaenezari82
    @Oussamaenezari82 20 วันที่ผ่านมา

    Cpu ram and bus everything in data processing right ? Nice presentations !!

  • @vikingthedude
    @vikingthedude 19 วันที่ผ่านมา

    4:20 if the address register can store only 4 bits (so that it can address locations 0-15 in the RAM), would we call this a 4-bit computer?

  • @jeejeejee2837
    @jeejeejee2837 20 วันที่ผ่านมา

    Wonderful and informative content! Very well done, this sort of knowledge is extremely important to keep available for anyone who is interested in these kind of topics.

  • @creatorpk6577
    @creatorpk6577 16 วันที่ผ่านมา

    That's one heck of COA Explanation. But I have learnt from "Sagar pingili " sir so i felt you could dive a bit more in depth