Digital Logic Gates from Transistors, AND, NAND, OR, NOR, XOR, XNOR, Buffer, and Inverter

Поделиться
HTML-код
  • Опубликовано: 19 июн 2024
  • How to build digital logic gates using individual transistors is discussed in detail. The logic gates are built on breadboards using transistors, resistors, LEDs, and different color wires. The truth table and circuit diagram will be shown for each logic gate. In many cases, there is more than one way to build the logic gate so multiple configurations will be shown.
    The types of logic gates that are built and tested are a switch, inverter, buffer, AND gates, NAND gate, OR gates, NOR gate, XOR gates, and an XNOR gate. At the end of the video, I also demonstrate how to properly wire up AND logic gates on a breadboard using integrated circuits.
    All of the logic gates are built with 2N2222 transistors and the circuit is powered with a 5-volt power supply. The positive wires are red, the ground wires are black, and most of the resistor values are 2K.
    0:00 Intro
    2:21 How transistors work
    3:34 Transistor as a switch
    5:35 Inverter
    8:15 How to send output
    11:13 Buffer 1
    12:20 Buffer 2
    15:33 Resistor Values
    16:48 AND 1
    19:00 AND 2
    20:07 AND 3
    21:46 NAND
    22:44 OR 1
    25:10 OR 2
    26:44 OR 3
    28:40 OR 4
    30:38 NOR
    31:48 XOR 1
    35:19 XOR 2
    35:51 XOR 3
    37:02 XOR 4
    38:05 XNOR
    40:23 AND 4
    42:58 AND 5
    AND Gates with ICs
    44:19 AND 6
    46:42 AND 7
    48:07 What is inside an IC
  • НаукаНаука

Комментарии • 92

  • @ardentdrops
    @ardentdrops 7 дней назад +3

    I love this guy's ambition. Start with individual transistors on a breadboard and work your way up to a human brain. I haven't seen this level of optimism since heaven's gate. Go get 'em, buddy

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  4 дня назад +1

      Thanks, that is the plan! I have the summer off now and am almost finished moving so I will be getting some more content up soon!

  • @GiC7
    @GiC7 17 дней назад +1

    Master, I love teachings like this from zero to and product's. Thanks

  • @williammorris1763
    @williammorris1763 Год назад +20

    I'm here for the next Ben Eater rise to fame.

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  Год назад +2

      Thanks for subscribing William! I am trying to get lots of people that are interested in electronics to subscribe. Right now I am working on building a 4-bit computer using individual transistors to help explain the basics. Then I will be working on building artificial neurons and I will be trying to get other people's creative ideas on the best way to build them. It should look fun so thanks for following along and I bet you can help along the way.

    • @electronicq624
      @electronicq624 Год назад +1

      Me too supporting you strongly. I’m subscriber no approximately 300.

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  Год назад

      @@electronicq624 Thanks for subscribing!

  • @aarons7836
    @aarons7836 Год назад +8

    From the bottom of my heart, thank you. You are doing lords work for Electrical Engineering majors

  • @vidback
    @vidback 6 месяцев назад +2

    Ih have been asking why we need to connect the inputs of the IC to ground under Ben Eater's video. Now I have the answer 47:43. Nice job. Thanks.

  • @aramboodakian9554
    @aramboodakian9554 11 месяцев назад

    Excellent explanation of transistor and logic gate theory. Simple, clear and clean demonstration circuits with diagrams right there at the same time.

  • @jadeninja9jadeninja9
    @jadeninja9jadeninja9 Год назад +4

    I thought this was going to be a popular video, this is good content with some nice satire

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  Год назад

      Thanks! I think building digital logic gates is something everyone should take time to understand. We will be using this basic information to build more advanced computations devices soon!

  • @moover123
    @moover123 Год назад +1

    exactly what I was looking for a while actually.

  • @miguelillosoft
    @miguelillosoft Год назад +2

    It is a very useful video. Thank you.

  • @hugo_pikoslav
    @hugo_pikoslav 5 месяцев назад +1

    thank you thanks to this video I was able to build my 8 bit computer from scratch you helped me thru my elementary school

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  5 месяцев назад +1

      Great, that is sweet! I bet it was lots of work to build!

  • @user-ce4gm5lq8n
    @user-ce4gm5lq8n 11 месяцев назад +1

    This is what i am looking for! Thx

  • @philoreda9102
    @philoreda9102 Месяц назад +1

    great video, thanks for sharing.

  • @jamespaguip5913
    @jamespaguip5913 Год назад +1

    Thank you this really helped

  • @furkanadak8439
    @furkanadak8439 5 месяцев назад +1

    KING OF THE DIGITAL LOGIC!!!

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  5 месяцев назад

      Thank you! The goal was to get good a the fundamentals. I am going to be posting videos about building neural networks on breadboards soon.

  • @karersio7062
    @karersio7062 Месяц назад +1

    thank you. im building an 1 bit adder and this video is what i need

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  Месяц назад

      Great! I also have a video on building full adders. Good luck with your project!

    • @karersio7062
      @karersio7062 Месяц назад

      @@GlobalScienceNetwork :D

  • @PySnek
    @PySnek 9 месяцев назад +1

    Thank you so much

  • @MrMadhavbroco7220
    @MrMadhavbroco7220 4 месяца назад +1

    Thanks sir for nice information🎉😊

  • @SameerAhmad-vq8uu
    @SameerAhmad-vq8uu 9 месяцев назад +3

    Some quality content at last!
    I was searching for these things for a long time and finally found the best thing on youtube.
    I watched Ben Eater and he was also quite useful but he never told things like adding just a buffer, we can send the signal to any other circuit and I was just stuck in this problem that how will I send the output of an AND gate to another circuit.
    LOTS of wishes for you success and hope you keep doing more like this.

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  9 месяцев назад +1

      Thanks for the positive feedback. That is good you were searching out how to build with multiple logic gates using transitors! Follow along and I bet you will be able to help on future builds!

  • @joj4163
    @joj4163 Год назад +1

    Thank you

  • @spprogmaker4624
    @spprogmaker4624 Год назад +3

    Thanks for this video - it must have been a lot of work going through all of those options. A couple of suggestions for the future. 1. at some point you started referring to the base of a transistor as its 'input'. That's kinda confusion terminology - in some sense the E, B, C are all 'inputs'. I suggest using 'base' to avoid confusion. 2. When you discuss the use of default the pull-up resistors in ICs it would have been good to mention that they are specific to the LS family. If your viewers ended up with HC ICs then they'd be confused as to why they weren't working! Looking forward to seeing future videos.

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  Год назад

      Thanks for the feedback. I really do appreciate it as I will be trying to improve video quality as I learn along the way. I will be trying some close-up camera angles in future videos as well. I did use LS ICs for the most part. Although I ran out of one type and the HC version did work with the resistor values I used. The input voltage and output drive voltages are slightly different for HC vs LS. I am pretty sure either one will work with the 5V input, yellow LED and resistor values used. Although I am not positive about that. Thanks for following along! Building a 4-bit computer with individual transistors is next and then artificial neurons. It should be fun!

    • @ArneChristianRosenfeldt
      @ArneChristianRosenfeldt 8 месяцев назад

      E B C can all be common. But only E and B can be inputs.

  • @SajjadHossain-xo9ds
    @SajjadHossain-xo9ds Месяц назад +1

    I want to make a 4 bit adder. But I was confused about the logic gates. Hope your video willl be helpful.

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  Месяц назад

      It should be helpful. I have two videos about how to make a 4-bit adder/calculator using transistor's. One is called how computers add numbers. I also have one called how to build a full adder. Once you understand the logic gates making the adders and calculator should be straightforward.

  • @ljcohen1849
    @ljcohen1849 Год назад +1

    I see your other videos may have what I'm looking for in some form but since I haven't looked harder at that yet, I would like to ask if you have any advice on how to hook up multiple of these gates in a line? This is because there was a version for each gate to make chaining them possible.

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  Год назад +1

      Yeah, if you watch my full adder video it explains how multiple logical gates can be used to make more complex logic. The how computers add numbers explains how to take the full adders and make a simple 4-bit calculator. I am actually working right now to make a 4-bit computer using individual logic gates where the logic gates are built with individual transistors. Thanks for watching, if you have any other questions, let me know.

    • @ljcohen1849
      @ljcohen1849 Год назад +1

      @@GlobalScienceNetwork Thanks a ton, I'll let you know if I have anything else!

  • @Bhavuk_Varshney
    @Bhavuk_Varshney 24 дня назад +2

    Make a video on Password buttons using XNOR and AND gates merged

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  24 дня назад +1

      That would be cool. My thought is that it could be built similar to the 4-bit calculator. If the state(password) is reached then it would accept the password. If only 4-bits were used it would be pretty easy to sequence through and figure out the password though.

    • @Bhavuk_Varshney
      @Bhavuk_Varshney 23 дня назад

      I think if the password would be 6-bit or 6 digit, it will look more cool
      6 digit password is more difficult than 4 digit! 😎

  • @user-pl5oj1hr8n
    @user-pl5oj1hr8n 9 месяцев назад +1

    Good day, i think everyine would apreciate if you did the same thing but with fets.

  • @icollided
    @icollided 2 месяца назад +1

    Great video! I have been messing around with the 74HC series chips, and was thinking about going fully discrete. So far, what has caused the most frustration is the crappy quality breadboards and thin leads on the resistors that I have been using. I have wasted a few hours, thinking that I made a mistake, and couldn't find it. Only to discover that everything magically works when I wiggle the wires. I just ordered some BB830 boards per Ben Eater's recommendation. What brand of resistors do you use?

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  2 месяца назад +1

      Awesome, going discrete can be rewarding as you can see every component in the circuit. Any 1/4 watt resistor should work, these are the small ones. Yeah, when it comes down to wiggling wires it can be frustrating. Honestly, I had a few bad connections in breadboards that were a pain but find it is around a 2-10 percent bad transistor rate that causes most of the problems. So I do a quick transistor test to make sure they are good and it makes things go much smoother. Check out my video on testing transistors. Great questions!

  • @kenzo4Ever
    @kenzo4Ever Год назад +1

    Just subscribed 😅.
    My son just started computer learning.
    If you make your videos as clear,well detailed and simple as this one then your channel would be one of the best !
    BTW , would you please suggest any free simulator of the kind you are doing so we can learn from your channel then practice on the simulator
    Thanks

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  Год назад +1

      Thanks for subscribing Kenzo! I made all of the drawings with EasyEDA, it is free to use. Go to their site under products and choose the standard online editor. When you are in the editor switch to simulation mode. Start a new project, you might have to start an account but it is free. If you do not like this one LTspice is another popular circuit simulator. Just look for tutorials online. Yeah, that would be great if you follow along. I will be building a 4-bit computer using individual transistors and then will be working on circuits that act as artificial neurons. Also if you use 1K resistors rather than 2K in EasyEDA the LEDs should light up in the simulator. Otherwise, you will have to use the multimeter function to view the results.

    • @kenzo4Ever
      @kenzo4Ever Год назад +1

      @@GlobalScienceNetwork
      Thanks a lot my Dear
      Wish you outstanding success 😅

  • @arunya4239
    @arunya4239 10 месяцев назад +1

    bro yu teach me something fabulous thanks

  • @youtuuba
    @youtuuba 11 месяцев назад

    Again, another good video. However, I did notice a tendency to randomly (?) use the word "across" when "through" was probably meant. As an example, when saying that current goes through a resistor, then through a transistor, then through a switch, etc; what was actually said was more along the lines of, current goes through the resistor, then ACROSS the transistor, then ACROSS the switch, etc. I know what you meant, but I suspect a lot of beginners might be thrown for a loop by the inconsistency, and by the word ACROSS being used in conjunction with current, where instead it is usually used in reference to voltage (drop).

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  11 месяцев назад

      Yeah, I thought about that. I was using through and across to say the same thing and just changed up the wording because otherwise the wording was very repetitive as I describe where the current is flowing in most of the circuits. It is good to know what other people think when watching the videos as I am trying to improve as I make new videos. Thanks!

  • @shark9oooo
    @shark9oooo 3 месяца назад

    Quick question, as I was watching the AND gate 3 and NAND gate, why does the circuit prefer to travel across the transistors instead of the shorter option which is ground or led to ground?

    • @shark9oooo
      @shark9oooo 3 месяца назад

      As I watch the OR gate 2, I get further confused on how the current prioritizes since it seems to make more sense to just travel through the LED over the transistors

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  3 месяца назад

      @@shark9oooo When the transistor has current going into the input (the base) it makes it so the current can travel across the transistor with almost no voltage drop. The full voltage drop occurs across the pull-up resistor in this case. When the transistor is off (zero current going into the base) then the current will go across the LED and the pull-up resistor acts as a current limit resistor to not burn out the LED.

  • @markgreco1962
    @markgreco1962 11 месяцев назад +1

    New subscriber

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  11 месяцев назад +1

      Awesome, thanks! I will be posting a video with a computer built with these basic logic gates soon!

  • @ArneChristianRosenfeldt
    @ArneChristianRosenfeldt 8 месяцев назад +1

    Do you have Video which goes from small signal analog amplifier for radio, audio, and video to a gate?
    I still think that the S in LS has a great explanation. TTL is great for glue logic, but if we put 1000 transistors on a board, we can decide what to use. CMOS needs those large anti static diodes on the pins. Current amplifiers. TTL does not. So for small integration TTL wins, for large other logic wins.
    AND and OR is just add with a different bias. Bipolar transistors have this exponential curve which gives us saturation behavior. I guess that we need to invert the signal twice per gate if we want saturation with npn only. XOR needs more strict voltage levels.
    Closed metal box. Cooling. Tuning. Maybe we get to voltage levels as in human neurons.
    I think I now get it. It’s the pull up resistor. We don’t want to pull up beyond our low voltage signal level.
    A pull up transistor can act as a good current source despite low supply voltage. Saturation is due to said supply. But this isn’t a PN diode. So to get a super sharp diode cut off, we feed back the delayed output to the pull up transistor. This way it pulls hard to follow an edge, but stops hard for the voltage.
    Hmm, series of exp(). No problem.
    I still feel like some level shift and inverter may be needed.
    TTL then mixes everything up with a Darlington circuit and push pull as if we want a power transistor…
    Ah, now I am back at CMOS. It is just the best technology to limit the voltage to both sides all the time, all nodes and wires ( within every gate ). The thinner the gate oxide, the more it wins. I don't even care about zero leakage through the gate ( see DRAM, or ultra low power CMOS). The advantage is that CMOS allows us to build totem poles of 4-NAND where the threshold voltage does not add up ( see CCD) . In contrast, bipolar transistors have a hard time to get rid of the diode voltage drop.
    Now that I think of this: diode drops don’t add. Complementary bipolar is possible. The GIS look like Ads. Anyway, CPUs have a pipeline design and matched gate latency. So they could even accept a voltage drop from stage to stage. Then shift back up like in a tube computer. Maybe that’s what they call a charge pump? Disconnect the SRAM cell from the power rails, rely on „gate charge“, float up to the other rails, connect there.

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  8 месяцев назад

      A lot to respond to here. I did build a transistor amplifier circuit to display sound waves on an oscilloscope. It is a simple circuit that can even output the signal to have a computer record the audio. Hopefully I make a video about that at some point. Your other points have me a bit confused. If you have not, check out my 4-bit computer build. This shows how I implemented many different types of gates in a larger circuit using TTL logic. Sure CMOS is better when using billions of transistors for power savings and faster switching time. The voltage of a neuron is around -70 mv. A transistor voltage drop is about 10 times that magnitude. So if you were trying to mimic that exact voltage the entire circuit would need some type of bias. It most cases though I do not think we will need operate at the exact voltage. We can discuss this at greater length once I show my artificial neuron video.

    • @ArneChristianRosenfeldt
      @ArneChristianRosenfeldt 8 месяцев назад

      @@GlobalScienceNetwork yeah I have seen a bit of your playlist. My problem is that I try to fill gaps after I have seen a lot in life. It is only possible to keep the signal at 70 mV ( at 20 K maybe ). Bipolar needs bias. One gap is : why did early ICs had a different type of MOSFETS and needed 3 rails, but today we cannot buy any of this? I feel like market dictates the threshold in a MOSFET. Now bipolar does not have this degree of freedom. It only has the bandgap of the material.
      Ah, so bipolar NPN will eventually saturate at the rails? But for speed the rails will need to have twice the voltage drop across them.
      When NPN saturated due to the output current is quite low. With any kind of load this will not happen. Maybe to be sure, limiting diodes with their own rails (for us to tune) are the way to go.
      NPN has a NP diode between input and internal signal in TTL. So we place a second diode in parallel. This diode has a lower bandwidth ( artificially created as a schotky diode ). Ah I get it now. This Schotky trick doesn’t work for transistors.
      Amplification is linear ( eats a lot of power ). Levels can be shifted using a resistor network. Even if we use the voltage drop across a diode, this draws constant power to keep the gap open.
      Seems like any way to speed up beyond CMOS just draws too much power even at low voltage signals. Parallel operation of CMOS wins in ICs (ARM2). Breadboards don’t show this beauty.

  • @Janellle620
    @Janellle620 Месяц назад +2

    I have a stem fair project 👍

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  Месяц назад

      Nice! I think it would be a great project. Try and build the 4-bit calculator and you will win! The full computer would likely be too much.

  • @yeaboi726
    @yeaboi726 2 месяца назад

    Is BC547 suitable for this application

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  2 месяца назад

      It should but the 2N2222 pinout is emitter, base, collector and the pinout on the BC547 is collector, base, emitter. So you basically have to have the transistor flipped 180 degrees and the circuits should work.

  • @seabiscuitthechallenger6899
    @seabiscuitthechallenger6899 Год назад +1

    👍

  • @jj74qformerlyjailbreak3
    @jj74qformerlyjailbreak3 Год назад

    Video Hack
    Hanging out in the comment section, learns you more than just the video shows.

  • @Lemonator32
    @Lemonator32 8 месяцев назад +1

    "I'm gonna teach how to build a 4-bit calculator, ... and we'll work our way towards creating non-biological human consciousnesses"
    Well that escalated quickly

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  8 месяцев назад

      Ha ha yeah this is true. My main goal is to build artificial neurons and artificial life. It seems like a good idea to start with the basics though.

  • @Shiznit304
    @Shiznit304 3 месяца назад

    your XNOR circuit doesn't work in practice. Turning A on and leaving B off still leaves the LED on. Neither does the XOR gate

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  3 месяца назад

      Did you try building it and have the circuit not work? It worked in my example video for all the cases. Reasons yours could not work are the wrong wiring, wrong resistor values, wrong transistor type, a bad transistor, or a transistor in backward. If I can not see the circuit I can not say for certain but that is what I would check.

    • @Shiznit304
      @Shiznit304 3 месяца назад +1

      @@GlobalScienceNetwork you're powering two transistors with a single resistor. In my application, i had to give the transistor its own resistor in between itself and the switch.

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  3 месяца назад

      @@Shiznit304 O alright well maybe you could make the XNOR the way it is shown and then add a buffer and make the modifications after the buffer?

  • @valuemastery
    @valuemastery 8 часов назад

    You lost me when you said you would create consciousness. All the other stuff is great.

  • @33v4.
    @33v4. 25 дней назад +1

    it looks so much like he’s desperately trying to sell me something that i feel compelled to stay and buy
    or watch

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  25 дней назад

      Ha ha yeah I am trying to get more people interested in building circuits so we can build more advanced projects together!

  • @williammorris1763
    @williammorris1763 Год назад +2

    I'm here for the next Ben Eater rise to fame.

    • @GlobalScienceNetwork
      @GlobalScienceNetwork  Год назад

      Somehow this was a duplicate Comment. I responded to the other comment. I and just responding here cause I try and respond to all my comments. Thanks for watching!