From Transistors To Tetris Part 2: Program Counter and Stack Pointer

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ก.ย. 2024
  • This is the second episode in a series documenting my build of a 1970s era computer out of discrete transistors. In this video, I design and explain the stack pointer and the program counter.
    Link to schematics: drive.google.c...

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

  • @qwertzuiopqwertzuiop2107
    @qwertzuiopqwertzuiop2107 3 ปีที่แล้ว +160

    hi, i just discovered this amazing series. but i was pretty disappointed the last update to it was 9 months old. i hope you can come back to youtube in the future:) take care

    • @BGTech1
      @BGTech1 2 ปีที่แล้ว +23

      1 year later and still nothing

    • @sanane7030
      @sanane7030 2 ปีที่แล้ว +14

      I discovered it just right now.... I am really curious now...

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

      just now : (

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

      @@bonta4671 same

    • @julesparty
      @julesparty 2 ปีที่แล้ว +23

      From doing some research, he seems to be in college at Harvard atm

  • @jdaniele
    @jdaniele 2 ปีที่แล้ว +44

    Great series Lev, don't give up! We are waiting for your next video.
    Hey, it doesn't matter if it works or not, we can learn a lot from mistakes, even more than from well done things.
    So, please, give us just an update about what you are working on.
    Keep on and take care!
    Thanks for sharing.

  • @ropersonline
    @ropersonline 2 ปีที่แล้ว +33

    14:45: I really appreciate the honesty here. Too many "school projects" are stage-parented in a way that's very dishonest. Also, props to your dad for teaching you well.

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

      that is right, and let me say f*** his dad. god. the lie.

  • @joaovitormatos8147
    @joaovitormatos8147 2 ปีที่แล้ว +26

    "I'll probably release the third episode in a month or two"
    Said he, 24 months ago

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

      Me.

    • @jbird4478
      @jbird4478 2 หลายเดือนก่อน

      First Harvard, then NVIDIA snatched him, so he didn't have time anymore. I thought about making a joke like this, but it's actually true. Well, it was pretty obvious this was miles above the average amateur.

  • @jfrancho
    @jfrancho 2 ปีที่แล้ว +36

    Part 3??????

    • @ryanzheks3731
      @ryanzheks3731 3 ชั่วโมงที่ผ่านมา

      😂

  • @kg5ubb478
    @kg5ubb478 4 ปีที่แล้ว +25

    This looks awesome, I am exited to watch this project evolve.

    • @kg5ubb478
      @kg5ubb478 3 ปีที่แล้ว +4

      Just in case anyone actually stumbled upon this comment, please take the time to report the two spam bots that replied to the parent comment.

    • @nukechicken4862
      @nukechicken4862 2 ปีที่แล้ว

      😢

  • @tolateFB
    @tolateFB 2 ปีที่แล้ว +12

    I hope there’s more on this series! It’s beautifully simple yet complex. Also great management!

  • @hardiehero8987
    @hardiehero8987 3 ปีที่แล้ว +47

    Amazing series!!!!!!! I’m so excited for the next video

    • @super66reaper91
      @super66reaper91 2 ปีที่แล้ว +3

      Yea me too!!! ...

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

      It's been 2 years :(

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

      yea i would like to see it play tetris i hope he comes back to this project and doesnt abandon this channel

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

      Must have gave up. It’s been 2 years….

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

      @@josephwilliamcosta Lev got accepted into Harvard. I'm assuming he is now too busy to maintain this TH-cam channel.

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

    Ahhh eXXXciting stuff! Unbelievable how you gained this understanding of programming, hardware in so little years! Kudos, hope you never lose track! Cheers!

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

    Please don't stop making these videos, I really want to do something similar and this is inspiring, I almost built an alu in my digital logic class but I never went this far. This is super inspiring, thanks for this wonderful series 👍

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

    Your populated pcbs are beautiful! Truly a work of art. This is a spectacular project, Lev. I hope you continue with this design. Subscribed.

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

    Ahh! You got me hooked! I hope you're doing well and you come back to this project.

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

    What kills these projects is memory and storage. The 4004 CPU had 2300 transistors. SRAM uses 6 transistors per bit while DRAM uses 1 transistor and a capacitor. 2KB of memory would require 12,288 transistors. It's cool but would probably be better as an educational series that just focuses on particular components and some theory or using an emulator. One of my projects in college for a digital design class was building a 4 bit ALU. It was all done with a piece of software for emulating digital circuits down to the logic gates rather than down to transistors.
    Even with low power transistors, eventually it gets ridiculous just to power something this complex.

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

    Nice work Lev.

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

    I m really impressed. I m myself an Electronics Engineer. Really loved your work. You are a super Engineer brother. Keep it up.

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

    I really love this project so far! Of course the recursive printing is just for demonstration, but one thing you could do, is only jump to the print function at the end rather than jump to subroutine. Then, when you find the null terminator, you could use return from subroutine and it would immediately go back to where it left off rather than going through every layer of recursion first. Essentially tail recursion optimization.

    • @levkruglyak
      @levkruglyak  4 ปีที่แล้ว +5

      I'm glad you're enjoying it! I think that's just the normal way to print a string, since that's essentially a loop. I'm pretty sure it's also the most efficient way to print a string using my instruction set.

    • @brycemw
      @brycemw 4 ปีที่แล้ว +3

      Lev Kruglyak I’m surprised that I just happened to have come up with the correct way by accident though I guess it makes sense. I love seeing these types of projects of building things from scratch.
      I’ve had one of my own sitting on my ideas list for a while now. I wanted to try building a hardware BF interpreter that is expandable both in memory and looping depth.
      Good luck with yours!

  • @techdoc99
    @techdoc99 2 หลายเดือนก่อน

    Very impressive work! And you were only in high school then? How far we’ve come! I hope you continued on the path of exploration and continue to challenge yourself. You’ve undoubtedly learned much more than you could just reading books and taking tests!

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

    And here i thought i was gonna see this entire series only to realise you havent posted for 2 years..

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

      Yeah... it's a pity. Maybe he enrolled to college, and now doesn't have time for real professional stuff, like this - been there, done that

  • @superhawk6105
    @superhawk6105 2 ปีที่แล้ว

    Watching the stack pointer jump back after finishing recursion was really neat!

  • @skmgeek
    @skmgeek 3 ปีที่แล้ว +5

    Still waiting for the next video :3

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

    Hi!
    Great project!
    We are waiting for the next part, I hope it will be soon
    Best wishes

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

    Well done mate! Awesome job! I am really excited while waiting for your next videos!

  • @kwgm8578
    @kwgm8578 2 ปีที่แล้ว

    Lev, this used to be part of the BSEE undergraduate education. I hope that it still is. You sound like you're having fun. I certainly did, 45 years ago! Best wishes.

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

    It makes me sad that not that many people are into this stuff, us computer architects need to stick together ya know. Pretty soon I'm thinking about building a 16 or 32 bit cpu that has multiple core on a idea I want to patient. I appreciate you sticking up and making a video stay safe bud.
    Regards,
    Morty.

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

    At least you owe us an explanation as to why we do not see a third and fourth... video.

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

    Looks like it is using an FFTs to do the division the algorithm is found in the Numerical Recipes in C/C++.

  • @AI_Image_Master
    @AI_Image_Master 3 ปีที่แล้ว +2

    Very cool. I have been building a 4 bit computer from transistors. Very similar to what you are doing except smaller in scale and a bit simpler in design. Not using pre printed boards but still a lot of soldering. Using several data registers, alu, control logic (not in a rom), program counter, command register and an input panel. A few of my own commands, just trying to add and subtract a few numbers at first. Basically have it all in my head. Version 2 to add memory and more complex commands. Trying to do every thing with transistors, from registers to alu to logic to clock. Only problem is memory, since a computer of this time would have used core memory. Can't use transistors because that would be a heck of a lot of transistors for a small amount of memory. Oh well, will most likely use a sram chip, that should be the only compromise. Nearing version 1. All modules are working just need to tie it all together.

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

      That's very interesting stuff. I want to learn more about computer architecture and build my own computer as well. Maybe you would like to share a video about your project progress😀. That would be a nice thing👍

  • @ri-gor
    @ri-gor 3 ปีที่แล้ว +1

    I'm in the planning stages of a similar project (although less ambitious on the speed/interfacing front and more ambitious on the architecture front). I look forward to future updates from you!

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

    Excellent video and start to a transistor computer! I'll definitely look out for your next video!

  • @LollosoSiTV
    @LollosoSiTV 8 วันที่ผ่านมา +1

    Would be really interesting to see this project made with SMD and no floating wires

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

    Amazing work.I'll try it out in a minute, because you've given the gerbers file.

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

    this channel will explode

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

    More than half a year has passed, and I have been waiting for your third video.

    • @levkruglyak
      @levkruglyak  3 ปีที่แล้ว +10

      Stay tuned, I’ve been very busy with work during the year, so I had to pause the project for about half a year. I started working on it again recently and I’ve already finished soldering all 3,000 transistors all that’s left is a bunch of wire wrapping

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

      @@levkruglyak did you enter MIT?

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

      ​@@levkruglyak i am going to enjoy it and i will try to make it

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

      @@levkruglyak Even a year on were still waiting (but take your time).

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

      @@levkruglyak could you give us a update

  • @AlbySilly
    @AlbySilly 2 ปีที่แล้ว

    Great stuff so far, I'm looking forward to seeing the next video you make, whatever it may be

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

    I find it weird you have so little subscribers because you are amazing

  •  ปีที่แล้ว +1

    Will you make a part 3 any time in the future?

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

    TNice tutorials helped sooo much!

  • @chromosundrift
    @chromosundrift 4 ปีที่แล้ว +3

    props to dad for making the assembler !!

  • @rdoetjes
    @rdoetjes 3 ปีที่แล้ว +2

    Really impressive and such commitment! Can’t wait for the next one. One question though: why not use SMD SOT323 MOSFETS? They can still be easily soldered and saves a lot of space.

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

      The main reason was price and familiarity; I found a pretty good deal for bulk 2N7000s and I used them throughout the prototype phase so I was pretty familiar with their specs. Also I think they’re easier to solder for me, I’ve never done any smd soldering

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

      Ive done some SMD soldering and it’s actually faster for bulk smd soldering, would save a ton on soldering but then again you wont have access to the back board for quick wire connections

  • @Kenbomp
    @Kenbomp 2 ปีที่แล้ว

    Nice using through hole where you can get to the pins something magical about them. You can probably create a graphics processor unit for display that does rotation and such in hardware. Though that's a project too.

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

    What a neat project! Did you continue it or have to put it on indefinite hold?

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

    Love the thanks to your Dad.

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

    amazing! just...where is the next video?

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

    Carry in+carry out is not a half adder, but a full adder. Half adder only has carry out

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

    Really Nice Architecture!
    Hope you get through college using that!

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

    Hey Lev,
    What happened at the end? no more videos?

  • @suncrafterspielt9479
    @suncrafterspielt9479 2 ปีที่แล้ว +3

    hey, will you continue this series?

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

    Hopefully this gets continued!

  • @kalj7
    @kalj7 2 ปีที่แล้ว

    Cool project and video! Here's to hoping you will get around to doing the rest of it :)

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

    No part 3 yet? :(

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

    If you had used 74 series logic chips or maybe smd instead of through hole, would it be easier to make it run faster?

    • @levkruglyak
      @levkruglyak  4 ปีที่แล้ว +3

      Most definitely, it would be possible to get it to run in the megahertz range then.

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

    Wow. Impressive.

  • @canaDavid1
    @canaDavid1 2 ปีที่แล้ว

    Cool! Still waiting for the next episode, though

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

    What program is that Digital Circuit Simulator? I can't seem to find it

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

      its a custom program I made a few years back: github.com/LevKruglyak/CircuitSimulator

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

      @@levkruglyak when will the next video in this series come out

  • @ecosta
    @ecosta 2 ปีที่แล้ว

    Interesting project, but I'm not sure about 14:40 - why the "RTS" instruction pops out all recursive calls at once? If you were using "23 jmp print_msg" instead of "JSR", then it would be a classic tail-call optimisation. But in that architecture, it seems you can't have more than one on-going subroutine. Am I missing something important here?

  • @rpocc
    @rpocc 2 ปีที่แล้ว

    Great job! Can’t imagine how much effort it takes to design and solder a whole computer just of a bag of 2N7000s.
    Just curious why didn’t you implement some peripheral registers based on arduino placed directly to the address bus. Though it’s never too late to attach such register implementing virtually any peripheral device.

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

    Great work, but; 7:55 When will the future video come? It's 2 years later now. 😁

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

    Terrific! This is way down into the 'bare metal' where every bit is built from analog. When you get around to talking about the MOSFETs, I'd like to hear about the decision you made defining levels for 1 and 0. How much can you minimize power (voltage, really) before the values become ambiguous?

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

    Hey great video why did you go with MOSFET's? Are you planning on doing CMOS?

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

      He said one day. It would be good to go to CMOS eventually as it doesn't require as many transistors.

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

      @@douro20 It requires about twice as many transistors and more expensive transistors but virtually no resistors or diodes so less components overall. I've learned a lot since then and CMOS mainly just saves power. I really like it though and I'm going to make my design mainly CMOS despite the extra cost.

  • @alexxyo6061
    @alexxyo6061 3 หลายเดือนก่อน +2

    NOOO I THOUGHT THE SERIES WAS COMPLETED

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

    What program are you using to simulate all this appears in multiple points in this video and I don’t know what the problem is

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

    You are really inspiring.......

  • @KSATica
    @KSATica 2 ปีที่แล้ว

    Looks amazing

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

    Very interesting, keep going!

  • @richardlighthouse5328
    @richardlighthouse5328 3 ปีที่แล้ว +2

    How about using STM32 to replace arduino mega, so you can run it faster than 4khz?

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

      but a stm32 is 3.3 volts so a lot of level shifters are needed

  • @MrGigi-dz9cv
    @MrGigi-dz9cv 3 ปีที่แล้ว

    I wish i had the time to learn and understand all of these things.

  • @procactus9109
    @procactus9109 2 ปีที่แล้ว

    No part 3 in a year... Owell 2 good videos anyeay

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

    Hello friend can you create a video about the gates and create the projects with gate

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

    Mind-blowing. I see you used Powder Toy to simulate the computer.

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

      Not exactly, I coded this logic gate simulator myself. Powder toy seems really cool though, so thanks for the reference.

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

    Which specific mosfets are you using?

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

      Jamon Terrell I’m using 2N7000s

  • @robodev6033
    @robodev6033 2 ปีที่แล้ว

    Did you using putty to connect with it?

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

    this is the greatest computer homemade i have ever seen with transistors i am waiting for more parts and excelent job.Also can i use bc547?

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

      You could, but shouldn't. You would need a current limiting resistor for the base and could drop the pulldown. The main downside to transistors is the constant current draw from the base that doesn't exist on a mosfet gate

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

    when will the part 3 come out?

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

    Awesome project!

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

    Fourth would be a great model for this cpu

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

    where is the digital circuit design app you are using to demonstrate the circuits? It looks a little like Sabastians Digital Logic Sim app but I like the layout much better. Is it downloadable from somewhere?

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

      it’s a Java project I made quite a while back, here’s a link to the GitHub: github.com/LevKruglyak/CircuitSimulator
      Just warning that this was coded by 10th grade me so it will have bugs and use way too much RAM

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

      @@levkruglyak Do not apologize you should be proud of what you have done. Thank you for sharing.

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

    please,, come back when you got time, i'm really curious

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

    wow. i accidently found this awesome channel . pls consider making a simple os for a simple processor in the feature.

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

    Been two.years buddy, what's the hold up?

  • @AntonioSouza
    @AntonioSouza 3 หลายเดือนก่อน

    Thanks for squematics.

  • @midclock
    @midclock 7 หลายเดือนก่อน

    Waiting for part 3

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

    what program did you use at 6:37?

  • @mlab3051
    @mlab3051 2 ปีที่แล้ว

    I build TTL from bjt once but never sucess to build CMOS. seem like FET inside CMOS has very high ON-resistant so it not worry about shoot-through.

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

    What program is he using At 7:05 I want to see it or use it

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

    It might be possible to have it built using SMDs and make the whole unit smaller.

  • @ArielLothlorien
    @ArielLothlorien 2 ปีที่แล้ว

    Keep up the good work!

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

    Very amazing!!!!

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

    Amazing my brother. Am good saporting ok

  • @hipposhark
    @hipposhark 2 ปีที่แล้ว

    ayo how are you going to do the control word??

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

    Where is Part 3?!?!?!

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

    how do i bookmark this video?

  • @arthurfacredyn
    @arthurfacredyn 4 ปีที่แล้ว +3

    Hooooolllly crap this looks pro

  • @ShopperPlug
    @ShopperPlug 2 ปีที่แล้ว

    This is cool!

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

    Awesome!

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

    And then he passed to surgeon classes and dropped the project. The end.

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

    what program is it at 6:44

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

    You should be able to make the ‘readAddress’ much faster by reading entire Arduino input channels instead of just one bit at a time. I mean you can have just two 8 bit reads in order to get your computer 16 bit address, no loop required. Also use an Union to just place these 8 bit values in a 16 bit address with zero overhead.

  • @uso2484
    @uso2484 2 ปีที่แล้ว

    where is the new series?

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

    What the program you use 6:12 ? Thanks)

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

      It’s a program I made myself in Java, which I haven’t released publicly yet

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

      @@levkruglyak wow, ok, thanks)

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

    Second ... and last episode ?