Binary counter

Поділитися
Вставка
  • Опубліковано 9 вер 2024
  • The JK flip-flop can be used to count in binary!
    Support me on Patreon: / beneater
    You can get all the components used in this video from any online electronic components distributor (Jameco, Digikey, Mouser, etc).
    Complete parts list (everything in this video):
    - 4x 74LS76 (Dual master-slave JK flip-flops)
    - 4x LEDs
    - 22 gauge wire
    - 5 volt power source (e.g., a USB phone charger)
    - Clock circuit from • Astable 555 timer - 8-...

КОМЕНТАРІ • 137

  • @brakenthemole2377
    @brakenthemole2377 5 років тому +210

    That end reveal was amazing

    • @jayyyzeee6409
      @jayyyzeee6409 4 роки тому +4

      And abrupt.

    • @nateforlaw
      @nateforlaw 3 роки тому +9

      I noticed after he hooked up the second light and the feeling was just as good. This guy knows what's up. I learned more about circuits in a few hours than my entire past education, and I have a computer science degree.

    • @gatedrat6382
      @gatedrat6382 3 роки тому +8

      @@nateforlaw Is education really that terrible? to the point where you learn more in a couple of videos than in years?

    • @B2Roland
      @B2Roland 2 роки тому +6

      @@gatedrat6382 yes.

    • @-LTUIiiin
      @-LTUIiiin 2 роки тому +11

      @@gatedrat6382 yes, mostly its due to unintuitive teaching styles(only telling you the 'what' while skipping the 'how' and even crucial 'why' part).
      For example a d flip flop. When i first learnt it, i thought it was kind of pointless. Q was just following D. What will you use that for? Teacher never bothered to elaborate on that. Then, i get on youtube and watch like 2 videos and quickly understand how powerful this circuit actually is, and how it opens the gates to the wonderful world of computer memory, which in turn made more excited to learn more!

  • @FarmCraft101
    @FarmCraft101 6 років тому +85

    You made this awesome revelation in the last 3 seconds of the video and then just ended it?? That was such a revelation for me to see it suddenly as a counter, I was expecting dramatic music, a drum roll, or something! ;-)

  • @micbenner
    @micbenner 5 років тому +48

    The sign of a great lesson is when you (as a student) have that A-HA! moment right before the teacher tells you what the concept is. I clicked it was counting binary a thus program instructions at just the right moment. Fantastic.

  • @Luda_chris
    @Luda_chris 7 років тому +213

    I wish I could like your videos twice

    • @ScorpionCA
      @ScorpionCA 6 років тому

      Chris Orellana you can it negates it and leaves no rating

    • @monad_tcp
      @monad_tcp 6 років тому +2

      Have two accounts. That's against the TOS, but who cares.

    • @moonbuster4667
      @moonbuster4667 5 років тому +1

      Just open the vido tab twice and like from each one

    • @hardiehero8987
      @hardiehero8987 3 роки тому

      Hundo p man

    • @moonbuster4667
      @moonbuster4667 3 роки тому

      @Srujan Shenoy Actually, No. But Logically, It is.

  • @TebiByyte
    @TebiByyte 6 років тому +76

    Woah! This actually kind of blew my mind a little bit. The circuit is so simple and elegant for such a behavior, it's almost astounding.

    • @DrJamesMP
      @DrJamesMP Рік тому

      Exactly my thoughts as I now watch this for the first time 5 years after your post - Ben's final comment is "it's counting in binary" and then the video ends just like that. But for me it's a revelation and a huge jump in my understanding of computer logic. I hope Ben realizes just how important and inspirational his videos are for us all.

  • @JasonMasters
    @JasonMasters 7 років тому +153

    Allow me to reiterate what I've seen said in earlier comments.
    I like the way you introduce simple concepts and then slowly build on those concepts to make something complicated.
    I also like how you're willing, once the concept has been explained, to then introduce integrated circuits which do everything in the one chip, to reduce both the size and the power consumption of the circuit, yet you don't "go overboard" with this approach, instead turning this into a Visible Computer where everything which is really important can be seen.
    And a big thank you from me, too. I wait for each instalment of this series with eagerness and impatience.

  • @tylerreeves895
    @tylerreeves895 7 років тому +43

    Logic design is freaking amazing! XD

    • @banemiladinov8202
      @banemiladinov8202 4 місяці тому

      Like the symbol q2 and compliment q2 are making on that diagram, fking amazing! 😅

  • @Ursacke
    @Ursacke 3 роки тому +16

    "It's counting in binary"
    * mic drop *

  • @gautamkappagal
    @gautamkappagal 10 місяців тому +1

    Bro just casually dropped the hardest cliffhanger in cinema history and left.

  • @libbylebyane3681
    @libbylebyane3681 5 років тому +12

    Best teacher I’ve ever seen. First does something you know then shows you how to move from that to the next topic, making it more simple. Unlike some videos they just get to building circuits without explaining where they are derived!

  • @hayden.A0
    @hayden.A0 3 роки тому +7

    The last few seconds were quite amazing, I honestly wouldn't have guessed and it took me a few seconds to even understand why it worked like that. Very interesting indeed.

  • @oscill8ocelot
    @oscill8ocelot 7 років тому +40

    You're pumping out the videos lately, Ben - glad to see this. =D

  • @neilpayne8244
    @neilpayne8244 7 років тому +12

    Hey Ben, just want to thank you for doing this series!!! As a programmer i have always been interested to learn how a computer works at its lowest level, and your series has taught me so much already! I almost understand the whole process though im looking forward to seeing how you implement the control unit/instruction decoder. Also, i have bought breadboards and components and are faithfully reproducing what you are doing and have learnt so much about electronics so far! keep the series going i beg you :) Finally, the biggest gap i have is how graphics are brought into the mix, so if you ever want to expand this it would be great to see you cover a simple 8 bit video or something like that.. thank you!

    • @cryptic_daemon_
      @cryptic_daemon_ 3 роки тому

      As EE major, this is the kind of stuff of like!!!

  • @heyandy889
    @heyandy889 5 років тому +4

    This is one of those series I will be sad to finish ... it is taking self-control to not binge it as quickly as possible.

  • @nosyarggrayson
    @nosyarggrayson 7 років тому +6

    I am so excited you have kept this series running

  • @COMB0RICO
    @COMB0RICO 5 років тому +2

    Surprise ending to this one. Thanks from Texas.

  • @vladimir520
    @vladimir520 4 роки тому +2

    I wish I could have seen my face when I realized what was happening! I made a counter using an Arduino and noticed how the speed was being halved. Really cool seeing the opposite in action :)

  • @spmanojgowda
    @spmanojgowda 6 років тому

    That is the best version of a binary counter explained in my whole life . You are awesome .

  • @zlac
    @zlac 7 років тому +1

    I used 74HCT74 to divide my clock by 4 on a "special device, it's a dual D-type flip-flop.
    You feed your clock to clock input, then you feed inverted output to D input and you use normal output as frequency/2
    It's a dual device so you also get "two bits" in a single 14 pin package
    now that I think about it, you can simply use a pre-made "4 bit counter" in a single 14 pin package (say 74LS93, it's just 4 master-slave JKs in a single package)
    It's nice to have more ways of doing the same thing! :)

  • @kevindemand
    @kevindemand 7 років тому +1

    Ben, these videos are absolutely brilliant. I'm learning more watching your videos than I did in my digital circuits class :D

  • @mistsu1171
    @mistsu1171 5 років тому +1

    Wow!!! What the hell I can't believe something is as simple as this could be used to count numbers!!!!!

  • @alexgochenour8740
    @alexgochenour8740 5 років тому +1

    Mind: Thoroughly blown! Thanks Ben

  • @frankiefp4027
    @frankiefp4027 5 років тому +3

    My mind was just blown

  • @mianfazlerazik3636
    @mianfazlerazik3636 Рік тому

    So he essentially has been using the Q output as the clock for the next flip flop. it is to be noted that when u use the Q output, the falling edge of the clock will be changing the state of the next flip flop in question (not the rising edge).

  • @lukasrussell5905
    @lukasrussell5905 7 років тому +1

    Ben I am so happy to see you back!

  • @ulriks9
    @ulriks9 7 років тому

    Dude, your videos are so freaking good. i have learned so much from the last 5 videos I have watched

  • @Machin396
    @Machin396 6 років тому

    Thanks very much, high quality videos! I just noticed using Logisim that rising edge JK flip flops produce a decreasing counter, and falling edge flops produces an increasing counter like the one in the video.

  • @TheGamingDinosaurRoblox
    @TheGamingDinosaurRoblox 7 місяців тому

    you can do the same with D flip flops
    by connecting the second output to the data in to create a single divider

  • @nilp0inter2
    @nilp0inter2 7 років тому

    Hi, I noticed this video is not in the 8bit computer playlist.
    And, btw, best series ever!

  • @chrisskyr623
    @chrisskyr623 3 роки тому +1

    This is fantastic

  • @mukunthag8760
    @mukunthag8760 2 роки тому

    Best teacher I've ever seen!

  • @adriansikora6556
    @adriansikora6556 7 років тому +1

    LOL, I lern something different at school...but this work in this way too! Very nice video!

  • @DmitriyDunaev
    @DmitriyDunaev 7 років тому +1

    Thank you very much Ben. You are doing an incredible job!

  • @SebastianScholle
    @SebastianScholle 7 років тому +19

    How did you get all those perfectly fitting jumpers?

    • @JC-be5tt
      @JC-be5tt 4 роки тому +1

      I have a feeling he cut them himself.

    • @AAAAAA-gj2di
      @AAAAAA-gj2di 3 роки тому

      @@JC-be5tt naah mate few sellers provide the cut pieces for a bit more

    • @ekmett
      @ekmett 3 роки тому +1

      @@AAAAAA-gj2di In another video he shows how he cuts them all to length.

  • @user-np3gm1ht5d
    @user-np3gm1ht5d 10 місяців тому

    If it Area = 1080 x 1080 . It is designing tool. It either run with binary bit left shift or right shift counter. Lot of picture figure work.

  • @lazzerbear
    @lazzerbear 7 років тому

    That punch-line at the end of this video, "it's counting in binary".
    That punch-line made my laugh my ass off. I didn't even see that punch-line coming at all. I just thought to myself before the punch-line hit, ok we cut the clock speed in half, and then cut that half in half. Then out of nowhere, Ben drops that punch-line based bomb. ""it's counting in binary!". LMFAO

  • @sayantanmaiti2513
    @sayantanmaiti2513 7 років тому

    You showed the magic at the last!!!!

  • @joaquinortiz279
    @joaquinortiz279 4 роки тому

    the end was so fucking MINDBLOWING!!!

  • @museypoo
    @museypoo 7 років тому +3

    Love the vids, keep going

  • @matth3wc
    @matth3wc 7 років тому +1

    love these video because I'm taking a digital circuits class and it helps me understand more of what's happening. Ben, have you done things with fpga boards before?

  • @menglin4134
    @menglin4134 3 роки тому

    My mind is blown in the last 3 seconds...

  • @charfractal9441
    @charfractal9441 4 місяці тому

    AAAAAAAAHHHHHHHHH , THIS BLEW MY SMOOTH BRAIN A, AAAHHHHHHHH !!!!! , JUST WOW

  • @andyd8865
    @andyd8865 9 місяців тому

    Damn that was sick

  • @TheRealMentat001
    @TheRealMentat001 7 років тому +5

    Anybody know a good replacement for the 74LS76? Little buggers were discontinued and are getting expensive and harder to find.

    • @TheRealMentat001
      @TheRealMentat001 7 років тому +6

      Never mind, I don't even need them. The next vid uses a 4-bit counter 74LS161. I can get those for less than $1.00 USD each.

  • @zolamastrike
    @zolamastrike 7 років тому +1

    Omg and just in time too :O ThANK YOU So MUCH

  • @athp
    @athp 7 років тому +8

    After the binary counter could you make the instruction decoder?

  • @SuzanneKowalski
    @SuzanneKowalski 7 років тому

    This is brilliant.

  • @filedotzip
    @filedotzip 5 років тому

    Thanks cody.

  • @94BrandonV
    @94BrandonV 5 років тому

    Totally awesome knowledge!!

  • @TheUnofficialMaker
    @TheUnofficialMaker Рік тому

    make a cool little train warning signal!

  • @May-sy9jk
    @May-sy9jk 7 років тому +1

    i have a power problem , each module in itself works well , but when i connect them together, they do not have enough power, voltage will drop across each module,the further away from power , the LED gets dimmer.i do know how to solve , i definitely didn't connect them in series, which is kinda wired.

    • @NoOne-ft8bq
      @NoOne-ft8bq 7 років тому

      Volador May check the datasheets and calculate the power draw of your circuit (number of 74ls04s * power draw of 74ls04 + number of 74ls76s * power draw of 74ls76 + ...) and compare it to the current rating of your power source

    • @djamparo6636
      @djamparo6636 7 років тому

      Volador May Current drops voltage not. only in a series curcuit.
      series curcuit:
      voltage is devided over each mudule, dependent from its resistance.
      Current stays the same.
      U=R•I
      paralel curcuit:
      voltage stays the same over every component. Current devides.
      I=R/U
      so no voltagedrop, you have to litle current. you can help that by putting an other baterie in paralel. current adds, voltage stays
      NOTE: THEY HAVE TO BE THE SAME. you can ignore the deviation of the batteries that is negligible.

    • @azaraliyev5172
      @azaraliyev5172 5 років тому

      I have the same problem. Did you solve it?

  • @gregorymorse8423
    @gregorymorse8423 3 роки тому

    How are the JK flipflops Q0 initial state initialized on power on? In prior video about RS flipflops it was stated that it is random but obviously the chips must have some way of making sure its reset on power on otherwise the counter would not be consistent. It's a small but important detail...

  • @omiorahman6283
    @omiorahman6283 5 років тому

    ty

  • @redabahislaoui2498
    @redabahislaoui2498 7 років тому

    Great as always. Do you plan on talking about finite state machines ?

  • @Autumn-qc5rc
    @Autumn-qc5rc 2 роки тому

    I LIKE YOU MAN

  • @nkos6376
    @nkos6376 5 років тому +1

    thanks for all your videos. just a question. are you using 5v LEDs? i don't see resistors connected to them!

    • @tehedx
      @tehedx 5 років тому +1

      (doing a wild guess, based on earlier videos) it's ok since these chips already have a resistor in them for the output (130Ω) right?

    • @3lpid3
      @3lpid3 4 роки тому +1

      WOW. That’s precisely the question I wanted to ask!!!

  • @0deer0se
    @0deer0se 4 роки тому

    Very cool

  • @masthisis3914
    @masthisis3914 5 років тому

    you are amazing . . .

  • @CyrusPellet
    @CyrusPellet 6 років тому

    And then you get a binary counter... (2000 IQ lost, brain explodes)

  • @memestopyoutubeless3157
    @memestopyoutubeless3157 2 роки тому

    Professor, No Quarter percebe Kashmir é Power é lendeas estão desfocadas em RGB da raiz ao quadrado de quatro pra o mundo

  • @colejohnson2230
    @colejohnson2230 7 років тому +1

    can you do a breadboard randomizor

  • @basarbinici8604
    @basarbinici8604 Рік тому

    I run this down on a simulation and it was counting but reversed.What i mean is when you expect LED's to be 0 they were 1 and visa versa. If i connect them with NOT gate,then i'm getting the correct form. Is there anybody knows why it's happening ?

  • @nathanjohnson9715
    @nathanjohnson9715 2 роки тому

    how much do I have to give on patreon for a video on implementing core memory into the breadboard computer?

  • @user-np3gm1ht5d
    @user-np3gm1ht5d 10 місяців тому

    It Area = 1 x 4. If you make it Area = 32 x 32. Something else discover..

  • @asadaziz5450
    @asadaziz5450 4 роки тому

    Excellent :)

  • @BigHeartBreak93
    @BigHeartBreak93 5 років тому

    why is th eclock signal bein divided by two? Is it so everytime or just with this master slave flip flop and if so why? Thank you:)

  • @saikatdutta1991
    @saikatdutta1991 3 роки тому

    I have some doubt.. when try to simulate with pen paper, i get the count order from 15 to 0 .. quite confused..

  • @crocellian2972
    @crocellian2972 7 років тому

    I did not think it possible for trolls to invade an elite channel. I was wrong. What voltage? Groan.

  • @nithinjackson1453
    @nithinjackson1453 4 роки тому

    Can we connect this binary counter output to any processer to show the value in a display?

  • @ogre5576
    @ogre5576 4 роки тому

    Anyone saw the swastica on the second jk flip flop in the schematic?

  • @alphasatari
    @alphasatari 5 років тому

    I have a question
    What if we use Clock as LSB and Last bit as MSB, this will give us 5 outputs without the need of an extra FF and it counts upto 31. Is it possible?

  • @iyiaksamlarbentuna
    @iyiaksamlarbentuna 4 роки тому

    Wow!

  • @rimmersbryggeri
    @rimmersbryggeri 3 роки тому

    I would like to make a mux toggle between 4 different inputs via button presses. Could this be used to achieve that function?

    • @hxhdfjifzirstc894
      @hxhdfjifzirstc894 6 місяців тому

      I think you're on the right track, although I have no idea if there's a simpler way... first button press (manual clock signal) to count 01, second, 10, third 11, and fourth 00 (resetting cycle back to input 1). Sort of a baseball theme, bazinga.

  • @jobssmith1685
    @jobssmith1685 6 років тому

    When I switch from the program mode to run mode, the data stored in the ram will be lost, especially in the 0000 address. It is so confused. Do you know what's happened ?

  • @Brainstorm4300
    @Brainstorm4300 7 років тому

    Do binary counter chips use this design?

  • @TheMechatronicEngineer
    @TheMechatronicEngineer 4 роки тому

    Those last 10 sec tho

  • @thecharlesfickle3647
    @thecharlesfickle3647 6 років тому

    Q2 and inverted Q2 when he's looking at the chip diagram for the 74LS76 makes a well known symbol LMAO just throwing that out there Hahaha

  • @jasonzurlo1543
    @jasonzurlo1543 3 роки тому

    There's a hidden swastika on the data sheet

  • @RobertMOdell
    @RobertMOdell 7 років тому

    Is this to be a component of your small scale computing machine?

    • @scitwi9164
      @scitwi9164 7 років тому +1

      It might be. The 8-bit computer uses binary counters, for example for the program counter register, and possibly in the sequencing unit.

  • @minhajshovon9789
    @minhajshovon9789 4 роки тому

    owowowowowowoowowowowowo
    had to watch the end twice

  • @briangommage3863
    @briangommage3863 7 років тому

    Problem:
    I have finished the A and B registers, the ALU, and the clock, but when i try to test it I can't get everything to turn on. Whatever is closest to where I plug power in will turn on, but other things won't. I measured 4.8-5.0V on the power strip where it is plugged on, and then as it gets farther away from that the voltage drops all the way to 0.8V. I am using a stripped USB cable and mobile phone charger for power. As far as I can tell there aren't any shorts, broken components, or anything like that.
    It is a current supply issue, or the intermittent contacts and resistance on the breadboards? Do I need to put in regulators and capacitors?
    Btw your videos are awesome thank you so much!

    • @NoOne-ft8bq
      @NoOne-ft8bq 7 років тому

      Brian Gommage Sum up the current draw in the datasheet of all chips you are using (remember to multiply by the quantity of each chip) and compare it with the current rating of your power supply

    • @djamparo6636
      @djamparo6636 7 років тому

      Brian Gommage Also make sure you dont sink current by default the chips wil do so.

    • @JasonMasters
      @JasonMasters 7 років тому +1

      I see others have suggested that the ICs might be drawing too much power, but while that's a possible problem, your description hints at another possibility.
      If the voltage starts out fine at the source and then drops drastically the further it gets from the power supply, this suggests that you have a high resistance link in your power bus (I'm assuming that you're using more than one breadboard and have their power buses linked together).
      One thing to try is to connect the power supply to the opposite end of the bus. If the situation reverses regarding your voltage measurements, then a high resistance link is more likely.
      Also try disconnecting chips from the power supply and see what happens to the voltage. If you've disconnected all the chips on one board from the power supply but all the chips on the next board still see a significantly lower voltage than that measured at the supply, that's another good indicator of a high resistance link.
      Finally, try measuring the resistance (with the power off) from one end of the power bus to the other on each side (positive and negative, separately). Anything more than about 2 ohms is another indicator that you have a high resistance link.
      The cause of a high resistance link could be using wire which is too thin to carry the current or to make good contact with the breadboard sockets, or using wire which is corroded.
      If a high resistance link isn't the problem, then the problem is almost certainly that your charger doesn't supply enough current for this project and you need to get a beefier supply. 500mA (half an amp) is probably not enough for more than two breadboards. 1000mA (1A) might be enough. 1500mA (1.5A) will almost certainly be enough. 2000mA (2A) should be plenty, with power to spare.

    • @briangommage3863
      @briangommage3863 7 років тому

      Thanks! I will try that.

    • @octagoncake2560
      @octagoncake2560 7 років тому

      I have the exact same problem as Brian Gommage. I also lose voltage over multiple breadboards all the way down to around 2V on the 5th breadboard or so. I use an apple phone charger as a power supply with an output of 5V 1A and then I just use a 2 meter usb 3.0 cable where I just use the power and ground connection. I measured my circuit and it uses around 140mA so the 1A should be fine, but I already tested it with a 5V 2.1A adapter and I get the same voltage drop. So for me the current isn't a problem. I've also changed my 24AWG wires with 20AWG wires, so I get some better contact with the breadboard, but still I lose much voltage over multiple breadboards. So I have no idea what the problem is and how I can fix it?

  • @divasimao5290
    @divasimao5290 7 років тому +1

    Maybe is a weird question... Is it possible to do a "DIY" PCB?

    • @coolbionicle
      @coolbionicle 7 років тому +1

      If by PCB you mean Printed Circuit Board, then yes, it is very possible, and fairly common and simple to do.

    • @GRBtutorials
      @GRBtutorials 6 років тому +1

      Angel Gonzalez Yes, but nowadays it’s cheaper to just order them. You can buy 10 for only $2 from JLCPCB.

  • @ElizabethGreene
    @ElizabethGreene 5 років тому +1

    This chip messes with my OCD. Like every other one you've used has had power and ground on the corners. This guy has them in the middle. :( :/

  • @p1nesap
    @p1nesap 7 років тому

    Did you have to increase clock speed to get binary counter? Seemed to cut off kinda fast.

    • @abdelrahmangamalmahdy
      @abdelrahmangamalmahdy 7 років тому +2

      Project Paul no it totally doesn't matter.. the clock speed is just the speed of counting, nothing else.. actually he only did that in order to clearly see it counting

  • @May-sy9jk
    @May-sy9jk 7 років тому

    can we use 74ls112 build this counter ,does it work the same when using 74ls112 instead of using 74LS76?

    • @chuck97791
      @chuck97791 7 років тому

      I used a 74ls193. One IC does it all. A few changes had to be made in the overall wiring.

    • @May-sy9jk
      @May-sy9jk 7 років тому

      i dont have 74ls193 available ,i test the 74ls112 just now,did encounter racing problems ,can i just use D flip flop counter?i dont know if D type counter can perform JUMP instruction properly

    • @chuck97791
      @chuck97791 7 років тому

      There's many ways to build binary counters. JK flip-flop is just the most useful.

    • @May-sy9jk
      @May-sy9jk 7 років тому

      i built one with two 74ls74, D type 4 bit counter which works pretty nice.

  • @rifett3832
    @rifett3832 7 років тому

    What voltage do you use for your computer?

    • @scitwi9164
      @scitwi9164 7 років тому

      Judging by the fact that he uses the 74LSxx series chips, which use TTL levels, my bet is on 5 volts.

    • @ihnwtpu
      @ihnwtpu 7 років тому

      Ri Fett 5V from a USB phone charger with the plug cut off. He shows it in one of the earlier videos.

  • @zes3813
    @zes3813 7 років тому

    they are not interesx or uninteres or chanllenx, do anyx

  • @May-sy9jk
    @May-sy9jk 7 років тому

    wow!