Stepping through a program on the 8-bit breadboard computer

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ต.ค. 2024

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

  • @bjrnerikmoen6529
    @bjrnerikmoen6529 8 ปีที่แล้ว +30

    Interesting vid.
    Imagine how much of hardware logic is going through your computer/phone, at super fast speed right now.

  • @santoshbanerjee3407
    @santoshbanerjee3407 8 ปีที่แล้ว +79

    Your videos are plain addictive!

  • @rishabhsathe2580
    @rishabhsathe2580 10 หลายเดือนก่อน +1

    I have watched your complete playlist on construction and working of the 8 bit computer. It provided me deep understanding and conceptual clarity of digital electronics and microprocessors. Thank you.

    • @iraniansuperhacker4382
      @iraniansuperhacker4382 5 หลายเดือนก่อน

      Ben eater needs to be awarded by a global platform. People say he is the Bob Ross of programming but I think its even more than that. I bet over the course of a generation he helped generate trillions in economic value. Millions of people have gotten jobs because of what they have been taught in his videos.

  • @germainguerin3063
    @germainguerin3063 7 ปีที่แล้ว +27

    Hello Ben, i have been through all 30 videos " building an 8 bit breadboard computer" serie and have made all components but cannot follow you here since i can't find control logic and instruction register videos . I think we should see these two videos at the end of the 30 serie just before these two "programming" videos.
    This serie is SO well done and so exciting .
    I'm waiting for these videos to complete my computer and be able to program it like you do here. Thanks!

    • @m.sierra5258
      @m.sierra5258 7 ปีที่แล้ว +4

      You do realize this video was posted 2015?

    • @seanld444
      @seanld444 6 ปีที่แล้ว +11

      M. Sierra so? Ben gets the notifications about any comment, period. Posting this comment on the video that came out a couple months ago in 2018 is no more effective than this...

  • @mikedelosier95
    @mikedelosier95 8 ปีที่แล้ว +5

    Vary nice machine language program example executing in single step mode and explaining control logic of the CPU operation

  • @TyCrawford
    @TyCrawford 7 ปีที่แล้ว +2

    This is seriously the most interesting series I've watched in many moons. I've been intently watching and just amazed. Thanks for doing this.

  • @X-OR_
    @X-OR_ 8 ปีที่แล้ว +92

    Has Microsoft tried to install Windows 10 on this Computer yet?
    And are you using the 74181 as the ALU?
    I Love Minimal Computing

  • @learncomputerscience4077
    @learncomputerscience4077 9 ปีที่แล้ว +28

    Can I please get the schematic and parts list for this? I would like to build one as a school project.

  • @stevensirski
    @stevensirski 3 ปีที่แล้ว

    I don't think I've ever "rewound" a video so many times just to see some lights blink. Neat stuff!

  • @imrank340
    @imrank340 7 ปีที่แล้ว

    Truly wonderful, putting theory to actual in practice and making a working solution.

  • @johndunn8154
    @johndunn8154 8 ปีที่แล้ว

    These are incredibly helpful!! Thank you for taking the time to make these videos. Your demonstrations are very well paced and informative.

  • @mistervoldemort7540
    @mistervoldemort7540 7 ปีที่แล้ว +9

    How on Earth can this only have 40k views???!

  • @davidm.johnston8994
    @davidm.johnston8994 8 ปีที่แล้ว +2

    That is so cooool! I've always wanted to know how a computer works exactly.

  • @0deer0se
    @0deer0se 5 ปีที่แล้ว

    Thank you for your amazing explanations and detail of the process. What you are doing is really valuable.

  • @ReonFourie
    @ReonFourie 7 ปีที่แล้ว

    What RAM and ROM chips did you use? Because I'm looking for some that are also easy to program like these

  • @AgentM124
    @AgentM124 5 ปีที่แล้ว

    So in your machine, you basically have wasted clock cycles for T5 on LDA and various instructions which need less steps. But is there a way to skip the steps that aren't required and start at T0 for the next instruction?

  • @sistematrix493
    @sistematrix493 9 ปีที่แล้ว

    Great to understand how the clock speed works!! Thanks for the good work!!

  • @lythd
    @lythd 6 ปีที่แล้ว

    This has taught me alot about control logic thank you for all of your videos about this computer :)

  • @ramsubramanian5604
    @ramsubramanian5604 8 ปีที่แล้ว

    Brilliant. ..I am addicted to this channel!

  • @furrydog7341
    @furrydog7341 8 ปีที่แล้ว +44

    42, the answer to everything!

    • @ibuprofen303
      @ibuprofen303 7 ปีที่แล้ว +1

      Even to the question "What's 14 plus 29?"

    • @asj3419
      @asj3419 7 ปีที่แล้ว

      it's called experimental error.

    • @harsiddakbedi8999
      @harsiddakbedi8999 4 ปีที่แล้ว +2

      lol, i gave this comment its 42nd like

    • @barto1035
      @barto1035 4 ปีที่แล้ว

      Lol 42 likes

  • @ddacombe4752
    @ddacombe4752 4 ปีที่แล้ว

    Excellent explanation and great series of videos

  • @michaelwilson18
    @michaelwilson18 9 ปีที่แล้ว

    Very nice.. Like the layout of the breadboards. You really did good showing how it works by stepping through it and giving detailed information. Do you have schematics for it?

  • @erickweil4580
    @erickweil4580 7 ปีที่แล้ว

    just a question, are RAM and PROGRAM memory the same in that computer, so the program could change in the fly his own code? leading to unpredictable results in most of the cases, but could it be used to show something cool?

    • @lescitrons
      @lescitrons 7 ปีที่แล้ว

      It's like that on x86. Programs are run from ram. The difference is that on x86, the computer loads the program into memory for you and then executes it, and has memory protection, so the code in memory can't be modified by the program. (In modern os')

  • @hermanvanopdorp5044
    @hermanvanopdorp5044 7 ปีที่แล้ว +2

    brings back old memories.

  • @Aeroxima
    @Aeroxima 5 ปีที่แล้ว +2

    Suddenly I understand how a punch card could be a program, without looking it up specifically. And how a hard drive can act in the same way, so we can load programs without manually physically doing it. Purely editing by software is so, so much nicer, my mind feels all bendy right now. Abstraction is amazing. I think I'll stick to higher level programming though!

  • @DrTube893
    @DrTube893 8 ปีที่แล้ว +43

    Great computer you have there, better than a PS4

    • @jetaddict420
      @jetaddict420 8 ปีที่แล้ว +11

      probably even runs at 1080p 60fps

    • @antkoos
      @antkoos 6 ปีที่แล้ว

      It have 10 GHz processor 😂

    • @MightBeSmart
      @MightBeSmart 5 ปีที่แล้ว

      Even my old atari was way better than PS4 or any other consoles!

    • @gangstasteve5753
      @gangstasteve5753 4 ปีที่แล้ว +1

      yeah. show me a ps4 you can write assembly on without hacking.

  • @PhilippeCarphin
    @PhilippeCarphin 7 ปีที่แล้ว

    That is the coolest light-show I've ever seen!

  • @anthonysurya6454
    @anthonysurya6454 5 ปีที่แล้ว

    Hello Ben, i'm just wondering what power source are you using to power this computer?

  • @laius6047
    @laius6047 8 ปีที่แล้ว +1

    enjoyed your videos and in depth explanations. Liked and subscribed. Thank you for making them

  • @codyfsw
    @codyfsw 7 ปีที่แล้ว

    Your channel rocks! Thanks for all the work youre sharing!!!

  • @louishenn3028
    @louishenn3028 7 ปีที่แล้ว

    how do you sync up the enable out and set in wires. like if the enable out control wire goes off the set wire may save nothing into the appropriate register. hope my question makes sense.

  • @polaris_babylon
    @polaris_babylon ปีที่แล้ว

    This computes gives the answer to the Ultimate Question of Life, the Universe, and Everything.

  • @vk2amv
    @vk2amv 9 ปีที่แล้ว +5

    I also would love some schematics for this so I can build one.
    Would be a very enjoyable project for me to do.

    • @sontapaa11jokulainen94
      @sontapaa11jokulainen94 4 ปีที่แล้ว

      He actually sells kits on his website which instruct you how you would build one (i think). www.beneater.com

  • @leandronc
    @leandronc 7 ปีที่แล้ว

    This is so impressive, thank you for sharing! Definitely showing this to motivate my Digital Logic students :)

  • @ropersonline
    @ropersonline 3 ปีที่แล้ว +1

    It would have been helpful to have had another note onscreen listing all the instructions, which would have made it more intuitively understandable why e.g. LDA is 1 and HLT is 15, etc. I know that was already (DIP-switch-)programmed into memory at this point, but it would have explained the bits that do show up on the memory contents and instruction register LEDs. The memory addresses 4 and 5 are obvious here, but the instruction bits are not.
    Similarly, it would have helped to also have included a legend for the control word bits.

  • @andrewdeneve7274
    @andrewdeneve7274 7 ปีที่แล้ว

    is there any reason why the control word changes in that specific sequence? Could it have just incremented like the program counter did?

    • @drcosmos137
      @drcosmos137 7 ปีที่แล้ว +2

      The control word is telling which registers to Set and which to Enable. All the registers read off the same data bus, so for any given instruction, only one register should be Enabled to output it's contents to the bus, and typically only one will be Set to store the bus value. For example, the LoaD A instruction at 4:47 in the video, for the t4 micro-instruction, Enables the memory address to output to the bus, and Sets the A register to the value on the bus. So the control word isn't incrementing, so much as it's dictating what each register should do.

  • @rikschaaf
    @rikschaaf 7 ปีที่แล้ว +1

    With the add instruction, how do you make sure that there is no feedback loop when you store the Sum to the A registry?

    • @m.sierra5258
      @m.sierra5258 7 ปีที่แล้ว

      The answer lies in the basic understanding of Flipflops (not sure how he did it, but that's how it's usually done) and its difference to a latch.
      A LATCH takes over the input data as long as 'high' is on the enable pin, a FLIPFLOP only takes over the input data at the low-to-high edge of the enable pin. It happens so fast that the output of the flipflop changes AFTER the write has happened, and then when the propagated feedback looped data arrives at the FLIPFLOP, it won't read it any more.
      At least that's the simplified version explanation.
      Hope that made it clear.
      Greetz

    • @rikschaaf
      @rikschaaf 7 ปีที่แล้ว

      M. Sierra isn't it heavily dependent on the length of the rising (or falling) edge of the clock?

  • @alpcns
    @alpcns 8 ปีที่แล้ว

    Brilliant! Very interesting and well-presented.

  • @massimogiliberti
    @massimogiliberti 5 ปีที่แล้ว

    Hey Ben, not sure how to PM you. FYI there is someone posting this exact vid on YT with the same name. Love the content; keep it coming!

  • @ramilakalasuva3170
    @ramilakalasuva3170 6 ปีที่แล้ว

    which books you referred to build this stuff and how you build this circuit thats more important can you help me to make this circuit

  • @mb106429
    @mb106429 7 ปีที่แล้ว

    has Ben published a component list?
    I've got everything up to the RAM IC's but don't know what he uses for the large packages at the bottom, for the Output/Address/Control Word Registers

  • @samh1022
    @samh1022 7 ปีที่แล้ว +4

    where are micro instructions stored? what're they written in? who writes them?

    • @CJBurkey
      @CJBurkey 6 ปีที่แล้ว +2

      Tom Riddle writes them in his diary, of course.

    • @jardel_lucca
      @jardel_lucca 6 ปีที่แล้ว +2

      Sam H they are stored in the ROM memory, which is programmed manually with dip switches. See the other videos. There is one where he shows that.

  • @abhijitdeka7437
    @abhijitdeka7437 8 ปีที่แล้ว

    you did a great series of 23 videos explaining computer work....but i can't quite find the next videos....so did you complete that series??

  • @topzozzle6319
    @topzozzle6319 8 ปีที่แล้ว +13

    could you possibly make a dual core cpu and tell us how a bus and cache works?

    • @austinbentley6234
      @austinbentley6234 8 ปีที่แล้ว +3

      +sasdlasokdalkfdalksfa You'd have better luck fooling around with a FPGA.

    • @topzozzle6319
      @topzozzle6319 8 ปีที่แล้ว

      Austin Bentley i've heard about fpga chips like the spartan, could i create an emulator on one and possily hook it up to a graphics driver?

    • @thoughtyness
      @thoughtyness 6 ปีที่แล้ว

      Have you found a way to emulate an FPGA that worked for your purposes?

  • @Jorza4daWorld
    @Jorza4daWorld 7 ปีที่แล้ว

    When you add the data in A and B and then store that in A, what's stopping the new value in A from automatically being added to B and then stored again in A (overwriting the previous data, then adding to B and continuing in a loop forever)?

    • @erenyeager3742
      @erenyeager3742 2 ปีที่แล้ว +1

      Cause he did alu to A register move only once

  • @philt-one
    @philt-one 8 ปีที่แล้ว +4

    Seems to be the SAP-1 architecture if anyone is looking for it.

  • @enmusfara6307
    @enmusfara6307 9 ปีที่แล้ว

    whats the name of the ram ic or is it a self build flip flop circuit ?

  • @koppadasao
    @koppadasao 7 ปีที่แล้ว

    I've been watching you series for a while, and are going to make my own version, but I'll be using 8 bit instruction set, 16 bit addressing, using bank switching.
    Here's a translation of you program in this video
    LDZ 0x8
    LDA
    LDZ 0x9
    ADD
    OTB
    HLT

  • @holyngrace7806
    @holyngrace7806 7 ปีที่แล้ว

    Ben, this is super.

  • @iancraftsandmines6266
    @iancraftsandmines6266 8 ปีที่แล้ว

    Please build a 2 or 4 bit version of this as a tutorial. That would make it make even more sense! Nice computer by the way.

  • @farmerfootball27
    @farmerfootball27 5 ปีที่แล้ว

    The is the most beautiful thing I've ever seen in my entire life

  • @dashbloxx9352
    @dashbloxx9352 5 ปีที่แล้ว +1

    Instead of using RAM, can I use an EEPROM to replace the RAM?

  • @MohamedSayed1
    @MohamedSayed1 7 ปีที่แล้ว

    brilliant, nice work

  • @prose4145
    @prose4145 9 ปีที่แล้ว +2

    Do you have schematic of the computer of yours ? It's sort of fun to make...

  • @bdot02
    @bdot02 7 ปีที่แล้ว

    What sort of educational background do you have? I enjoy electronic tinkering but I'd have no idea how to start on a project like this without TH-cam.

  • @StasisTV
    @StasisTV 8 ปีที่แล้ว +1

    just a random question,how much voltage does this take

    • @buildingbloxs6202
      @buildingbloxs6202 8 ปีที่แล้ว +3

      5v he says it another vid

    • @lescitrons
      @lescitrons 7 ปีที่แล้ว

      BuildingBloxs yeah 5v is standard in small electronics

  • @ricardoseguro6802
    @ricardoseguro6802 5 ปีที่แล้ว +1

    Can I connect it to a display? And write a simple C++ game or whatever? Could you show how to? :)

  • @ghostxop2101
    @ghostxop2101 8 ปีที่แล้ว +3

    I would hope for such intelligence you are rewarded a well paying job you enjoy.

  • @tmdrake
    @tmdrake 7 ปีที่แล้ว

    I understand! This does compute!

  • @FutureAIDev2015
    @FutureAIDev2015 8 ปีที่แล้ว +4

    What are you using as a clock signal?

    • @austinbentley6234
      @austinbentley6234 8 ปีที่แล้ว +1

      +Matthew Ferrie The button he's pressing repeatedly.

    • @FutureAIDev2015
      @FutureAIDev2015 8 ปีที่แล้ว

      +Constantino Fine Art Is he using a 555?

    • @FarsightElectronic
      @FarsightElectronic 8 ปีที่แล้ว

      +Matthew Ferrie I'm not sure about him, but he has done videos on 555 timer clocks. Those videos are pretty recent.

  • @Machin396
    @Machin396 9 ปีที่แล้ว

    Dude this is amazing, this needs more likes.

  • @burdendmist6543
    @burdendmist6543 7 ปีที่แล้ว

    hello i would like to say i am 12 years old and the only one in my class that loves arduino microcontrolers and robotic c , python, c+, c++ , and command line on windows i am imprest with this computer were did you come up with this intestine design?

    • @lescitrons
      @lescitrons 7 ปีที่แล้ว

      Maybe you need to give it a few years, considering that you can't even spell correctly.

    • @czmik
      @czmik 7 ปีที่แล้ว

      Don't be a dick.

  • @antipoti
    @antipoti 6 ปีที่แล้ว

    Best explanatiom ever!

  • @DanielOliveiraViolao
    @DanielOliveiraViolao 10 หลายเดือนก่อน

    Amazing! Thank you!

  • @Z80System
    @Z80System 9 ปีที่แล้ว

    Hi, great job! Could you explain how you convert the binary result 00101010 into the two 7 segment displaying "4" and "2" ?

    • @israelRaizer
      @israelRaizer 9 ปีที่แล้ว

      +Sébastien PETRE I don't think he actually implemented a binary decoder to show the output, the 7-segment display already takes the input in binary...

    • @erenyeager3742
      @erenyeager3742 2 ปีที่แล้ว +1

      Just do some k map...you will arrive at the answer

  • @Zenas521
    @Zenas521 7 ปีที่แล้ว

    And that is an overview of how you compute life, the universe and everything...

  • @TheHealPoint
    @TheHealPoint 8 ปีที่แล้ว +17

    Can I please get the schematics and the parts list?

    • @feysalimran
      @feysalimran 7 ปีที่แล้ว +4

      Loop through all the videos. He has put the parts list in the respective descriptions.

  • @First_Principals
    @First_Principals 6 ปีที่แล้ว

    How many clock cycles did it take to calculate 42?
    It would be great to have a written discription of each clock cycle.

    • @mina86
      @mina86 6 ปีที่แล้ว +1

      Three instructions, six cycles each. If you want to include HLT instruction add another three cycles.

  • @yazidderouiche8736
    @yazidderouiche8736 9 หลายเดือนก่อน

    EXCELLENT ;.........GREAT JOB . THANK YOU

  • @anteconfig5391
    @anteconfig5391 7 ปีที่แล้ว +3

    This thing gave me an idea. I love it.
    I'm thinking of making my own computer, whose only purpose is to be the foundation of a simulation world that is inhabited by neural networks, and their goal is to attempt to communicate with me. But they would have to pass a bunch of tests(in their world) before they can meet with me.
    and maybe i'll add the ability to connect a monitor and controller so that I can walk around and take a look at things and interact and stuff.

    • @Rasmus0909
      @Rasmus0909 6 ปีที่แล้ว +4

      Either you're the next Nikola Tesla or you're in for a wake-up call. Good luck :)

    • @ObjectsInMotion
      @ObjectsInMotion 6 ปีที่แล้ว +5

      How about you try coding the simulation first? Or maybe learn how to code a neural network? Or, you know, code at all.

    • @anteconfig5391
      @anteconfig5391 6 ปีที่แล้ว

      +Rasmus0909
      Oh yeah, I woke up about a week later. I have this idea of making a computer that has one purpose and that's to have hardwired neural nets control a simulation.
      I have one vague idea just floating around in my head, but I can't quite figure out how to make it happen.
      For now I'm thinking that I have to use a mixture or AC and DC currents but other than that I'm just gonna have to what Anthony Khodanian suggests and code a simulation.

    • @anteconfig5391
      @anteconfig5391 6 ปีที่แล้ว +1

      +Anthony Khodanian
      Yeah, I know how to do all that. I've just had this idea of making a hardwired specialized system.
      But for now I think that I'm just gonna make a small Operating System dedicated to the task. This way I could try and utilize the full power of the computer without having to worry about how many microsoft services I have running in the background.

  • @MackoWackoGaming
    @MackoWackoGaming 5 ปีที่แล้ว

    And this is what happens millions of times every second in a computer

  • @fjz3453
    @fjz3453 7 ปีที่แล้ว

    Could someone explain to me why the memory adress is in 4-bit and not 8-bit? There has to be a reason right?

    • @lescitrons
      @lescitrons 7 ปีที่แล้ว +1

      The memory addresses are four bits because each instruction is within one byte, which is 8 bits, so there is four bits for the instruction, and four bits for the address. He could have 8-bit addresses, but he would have to rebuild the entire computer.

  • @ricardo.mazeto
    @ricardo.mazeto 8 ปีที่แล้ว

    which book did you read to learn micro architecture? you did a great job there!

    • @dalesmith4609
      @dalesmith4609 8 ปีที่แล้ว +3

      +Ricardo Mazeto
      hitch hikers guide

  • @Digiphex
    @Digiphex 6 ปีที่แล้ว

    This is a bit like the trainer I used in school. It ran on the 8086.

  • @MatthewSmith-wh5dr
    @MatthewSmith-wh5dr 8 ปีที่แล้ว

    absolutely cool. amazing.

  • @computersolutions164
    @computersolutions164 8 ปีที่แล้ว +1

    Excellent !!

  • @-aaa-aaa
    @-aaa-aaa 7 ปีที่แล้ว

    Where did you get all of your wires?

  • @harmonichighways
    @harmonichighways 7 ปีที่แล้ว

    Thanks, this is great!

  • @jonathanfeller
    @jonathanfeller 8 ปีที่แล้ว

    What are you using as RAM?

  • @alfiewhitson7726
    @alfiewhitson7726 8 ปีที่แล้ว

    try and get it so that you can somehow connect a ATA hard drive and then get it to import some integers before it calculates stuff if its in run mode

    • @lescitrons
      @lescitrons 7 ปีที่แล้ว

      Alfie Whitson that is waaaaay to complex for his simple little computer.

  • @AlanMedina314
    @AlanMedina314 8 ปีที่แล้ว

    Cool Video.

  • @niklasnickel
    @niklasnickel 7 ปีที่แล้ว +1

    This is the best computer for people that don't like spam and malware... ;)

  • @johansilvacueva9705
    @johansilvacueva9705 7 ปีที่แล้ว

    Very Good

  • @inventoruz
    @inventoruz 8 ปีที่แล้ว

    Hi. Howw i buy this important things ?

  • @idromano
    @idromano 9 ปีที่แล้ว +12

    So... is 42 is inspired by The hitchhiker galaxy guide?

    • @FutureAIDev2015
      @FutureAIDev2015 8 ปีที่แล้ว +2

      That's exactly what I was thinking!

    • @Klaevin
      @Klaevin 7 ปีที่แล้ว +3

      yeah. the "explaining" of how this computer works is wrong, and the only answer this computer is able to give is 42 because it's the answer to life, the universe and everything.

    • @flobo23
      @flobo23 7 ปีที่แล้ว

      and at that point, a wast majority of the audience forgot the question ; )

  • @Thedurp123
    @Thedurp123 7 ปีที่แล้ว +1

    hey it's a real life TIS -100

  • @G8tr1522
    @G8tr1522 7 ปีที่แล้ว

    I wish you pointed to the schematic from the previous video instead of the breadboard. I'm getting lost with the bus connections.

  • @dogusural5792
    @dogusural5792 8 ปีที่แล้ว

    amazing

  • @germainguerin3063
    @germainguerin3063 7 ปีที่แล้ว

    Have you made an Instruction Register video, I can't find . I think this is a requirement to understand this video

  • @prestonstith8744
    @prestonstith8744 9 ปีที่แล้ว +1

    How much did this cost you to make?

    • @Michael-cm4nr
      @Michael-cm4nr 8 ปีที่แล้ว +2

      +Preston Stith I would guess less than $40. The breadboards are probably the most expensive part next the the ICs

    • @prestonstith8744
      @prestonstith8744 8 ปีที่แล้ว +1

      It's really cool.

    • @indjev99
      @indjev99 8 ปีที่แล้ว +1

      The most costly part with such a project would normally be the RAM, but in this case it is just 16 bytes, so this isn't a problem. I am currently making a 16 bit computer with 10 bit addresses, so that means 2048 bytes and in my case that would be the most expensive part, if I decide to actually install all 2048 bytes, which I probably won't do.

    • @RussellTeapot
      @RussellTeapot 7 ปีที่แล้ว

      16 bit computer...10 bit addresses.. that means 6 bits for the instructions?

  • @FranklinHarding
    @FranklinHarding 8 ปีที่แล้ว

    Amazing.... make more videos!

  • @bigmac7346
    @bigmac7346 9 ปีที่แล้ว +2

    I also am interested in the origin and reproduction of your design.

  • @reparandola
    @reparandola 5 ปีที่แล้ว

    How can i send you a message i need your help in a especific topic.

  • @Ragnarok540
    @Ragnarok540 4 ปีที่แล้ว

    It would be easy to make a self modifying program in this computer. It would be almost impossible to debug or understand, anyway.

  • @someoneyoudontknow106
    @someoneyoudontknow106 8 ปีที่แล้ว

    AWESOME PROJECT, OMG!!!!!!!!!!!
    (NEW SUBSCRIBER )

  • @mina86
    @mina86 6 ปีที่แล้ว

    Why not increment PC in T1? T2 seems unnecessary.

  • @exothornoblerbaker1314
    @exothornoblerbaker1314 8 ปีที่แล้ว

    god send

  • @TimbavatiLion
    @TimbavatiLion 7 ปีที่แล้ว

    So every singular instruction takes 6 cycles? Thats... longer than i thought o_O Is this still the same for modern 64bit CPUs?
    For the question what would happen if you could advance beyond the HLT:
    It would read the 14 (00001110) as an instruction (in this case 0000 NOP with parameter 1110) so nothing would happen.
    Next is the 28 (00011100), which means 0001= LDA with 1100=12, so it would read memory address 12 into register A (which is probably 0b0). After that, everything is 0b0, so just NOP commands.

    • @laurentiucristian1
      @laurentiucristian1 7 ปีที่แล้ว +1

      Modern CPUs can do multiple instructions per clock (IPC).

    • @mina86
      @mina86 6 ปีที่แล้ว +1

      Two things happen in modern CPUs:
      ⅰ) Processing is pipelined. For example, assuming each instruction takes six phases, a CPU would be executing six instructions at once but each would be in a different phase. While one instruction is finishing, instruction four steps behind is being fetched and an address if instruction five steps behind is being loaded. With this, even though each instruction takes six clock cycles, an instruction is executed every cycle.
      ⅱ) There are multiple ALUs which means that CPU can perform multiple operations at once. If one instruction sums two registers and another sums some other registers, those two operations can be carried out in parallel.
      This is of course simplified, and there are multiple things that complicate the issue such as:
      ⅰ) Data dependencies: ‘a = a + b’ instruction followed by ‘a = a + c’ cannot be executed in parallel since result of the latter depends on the result of the former. To mitigate, CPU will try and rearrange instructions and execute them out of order. For example, sequence ‘a = a + b; a = a + c; d = e + f’ can be rewritten as: ‘a = a + b; d = e + f; a = a + c’.
      ⅱ) Control dependencies: conditional jumps mess with the pipeline since what next instruction needs to be executed depends on the result of the current one. This means that it’s not possible to know which next instruction to fetch before the current one finishes. To mitigate, CPU will try to predict which branch is taken and execute instructions from that branch. If later the prediction turns out to be false, all the calculations will be discarded. x86 architecture also includes conditional move instructions, for example ‘set EAX to 10 if carry flag is set’. This changes control dependency into data dependency which has lower penalty on misprediction.
      ⅲ) Different number of different execution units: A CPU might be able to perform two additions at once but may be unable to perform two multiplications at once just because it has some components duplicated but others not. Similarly to ⅰ), CPU may try to mitigate by rearranging operations.
      And I didn’t even mention memory yet. A memory read can take dozens or even hundreds of clock cycles. ‘How much clock cycles an instruction takes’ is nowadays a very complicated question to answer and you probably can count number of people who know the answer to that on your fingers.

  • @IvanSanchezDS
    @IvanSanchezDS 7 ปีที่แล้ว

    may I ask what is your career?

  • @anonymousone6250
    @anonymousone6250 7 ปีที่แล้ว +2

    Do pipelining