How Binary Logic Works, Tech Tips Tuesday

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

This was very enlightening for me, thanks.

👍︎︎ 2 👤︎︎ u/junkfood66 📅︎︎ Feb 03 2016 🗫︎ replies
Captions
hi there and welcome to another tech tips Tuesday today we're going to take a look at how binary works within your electronic equipment it really is quite simple so let's get started this is a pretty standard looking logic diagram this is for the CD for 0 to 8 which is this IC right here we also make this in a surface mount version which is quite a bit smaller than this so this entire logic diagram is for this little IC now any of you that are Nixie tube people would probably recognize this number right away this is a BCD to decimal decoder BCD stands for binary coded decimal to decimal decoder so the D the C the be in the a columns are the BCD or binary coded decimal columns and the 0 to 9 is the decimal portion so BCD to decimal decoder now any of you that are looking at this you know passed up for the first time probably saying to yourself now that looks a little bit confusing and well you're correct and the electronics industry loves to make things confusing and they don't even include the proper information this is actually missing very crucial information to use this list in so many of them do this so you see here one equals high zero equals low well 1 which equals high basically means positive and 0 equals low which equals negative so if this IC was to be running at 5 volts DC 1 would equal 5 volts zero would equal ground or very close to so these here DC B and a are actually pins a sign on this IC and we'll take a look at the pin assignment here quite shortly and these are the outputs on the actual IC so if we give it a certain string of binary it will illuminate the number one or the number two or the number three so picture these as being light bulbs so we have 10 light bulbs here each light bulb has a number on it zero through nine all right if we were to put these say we'll just take this for example this code here on the input pins which are the D the C to be in the a it would light up number four lightbulb number four with light if we were to remove that and put this code on zero one one zero we would get number six to light up so now you're saying to yourself well how does DC BNA work out to this like zero one one zero you know how does that equal this you know or this or how does anything work on this chart well it's because they haven't included the most important stuff the most crucial information these are numbers D is 8 C is 4 B is 2 and a is 1 and whenever you see this DC BA in any order on an IC like this a is always 1 B is 2 C is 4 D is 8 and if you had more of these it would be 1 2 4 8 16 32 64 and so on and so on so we're only dealing with 4 here so we'll just keep this simple all right so just say we wanted to light up the number 7 all right well the number 7 is 4 5 6 7 so that would be 0 1 1 1 we need to add all these together to make a number and of course we don't need the number 8 so it just stays at zero or low all right so we take a look at the number 7 0 1 1 1 so just say we wanted to light up the number 5 ok so we would need to have 0 1 0 1 because 4 plus 1 is 5 and you leave the other two at ground so we take a look at number 5 0 1 0 1 this is absolutely crucial to have on this list but they don't put it there I guess they just expect people to know this so now if we look at the pin assignment for this I see alright these are the numbers that would actually light up so say number four was hooked to a light bulb here and number two was up to a light bulb here and these would all just hook the ground all right say number nine is the light bulb all of these would be hooked to either LEDs or light bulbs as current limiting resistors or whatever these are the pin numbers these are the actual numbers of the lights that would light up if you give this the correct binary code so in order to use this properly we obviously want to write this in a is 1 B is 2 C is 4 and D is 8 all right so say I wanted to light up the number 9 so this would be 0 0 1 1 that would be the way it goes so these would be at ground and these two would be at 5 volts and that would be our code to light up number 9 if I wanted to light up number 2 it would be 1 0 0 0 and that's how number 2 would light up and that's really how this works so let's take a look at this on an actual breadboard I have a CD for 0 to 8 plugged into the breadboard here and it soaked up to all these LEDs these LEDs represent 0 through 9 so this is 0 1 2 3 4 5 and all the way up to 9 here on the input of the CD 402 8 I've got 4 10k resistors going to ground now if you look here you'll see a DC b and the 4 10k resistors to ground now the reason I have this here is because you just can't let these float because this is a really high impedance input and static or in just any kind of floating voltages on here can cause an erroneous reading so you have to bring these down to ground now since this is such a high impedance input having a 10k resistor on the input just makes the IC think that they're grounded out now the nice thing about a 10k resistor is I can apply 5 volts to this point and bring this high and 5 volts through a 10k resistor you know is very low current to the supply so if I want to make this go one zero zero zero I would have the number two lit up so this one here would go high and so on and so forth so by having these 10k resistors here all I really have to do is put combinations of positive voltages here to get 0 through 9 and I'll display that here right now so what I'm going to do is hook up the power here all right you'll see this little LED lighting up all right so this IC is facing this way just like this IC is here so if I want to light up the number 1 I'm going to have to make that high so it'll be 1 0 0 0 these all just be left alone because they're just thinking they're at ground so there are all zeros right now this is all zeros and that's why the zero LED is lighting up so in order to make this little red number one LED light up I have to make this high so I'll take a positive wire and touch it to pin number 10 here and you'll see the number 1 light up so this is a positive wire here just from the rail and I'll just touch this to the resistor and you can see the number 1 lights up so I'll remove that so just say I want to light up the number 8 well this would be zero one zero zero so I would touch that positive to pin number 11 I'll do that right now there we go number eight all right so just say I wanted to make oh the number six light up it would have to be one one zero zero because 4 plus 2 is 6 all right so I'll take two of these leads here put the first one in here and the second one in here and there's the number six lit up and that's just how this goes and other eye sees before this will do this at very very fast speeds depending on what is actually hooked up to this so if it was a frequency counter this would be done at extremely fast speeds or even a voltmeter anything like that I'm doing right now is just extremely slow just to show you how this is actually working so next we're going to take a look at a BCD to seven-segment decoder this IC is a binary coded decimal to seven-segment display driver or 7-segment decoder however you want to look at that so this IC which is a 74 HC high-speed c MOS 451 one has the ability to directly drive one LED 7-segment display so here's a block with two of the minute and two decimal places so this is one seven segment display so it takes seven segments to make up that number eight all right now each one of those segments has a letter that identifies it so this is a b c d e f and g now these letters right here are the letters that tell you to wire pin 13 to this segment here and then B would be wired to pin 12 and so on and so forth in order to make this display something logical now this IC has a whole bunch of nice little features it's got a lamp test that has a blanking and latch enable so latch enable is memory and basically what that is is that when you latch this it'll just hold that digit so in the old days when you looked at an old Oh Keith kit counter or something like that they had ICS and they called them memory well actually they're just latches that's all they are and this has that latching ability inside here so in order to make things even more confusing of course we have this silliness going on here again these are the BCD inputs but they've got d0 d1 d2 and d3 well they have numbers here why not just put the correct corresponding numbers so D 0 would be 1 all right D 1 would be 2 D 2 would be 4 and D 3 would be 8 so again we know the BCD the binary works on this side from what we just previously looked at so let's take a look at this seven segment decoder display driver on the breadboard this 74 HC four five one one right here which is this little IC is controlling the seven segment display this one here is completely unhooked so we can ignore that these 10k resistors are here for the exact same reason those 10k resistors are there the input impedance this IC is extremely high and if I didn't have them here I would start to get just false display would display just random weirdness most likely so well I can probably even display that I'll pull one of these open now you can see that it's still 0 but if I just touch the pins with my finger you can see that it just goes to craziness so I can make it read the number 4 so now the gate of the fat has got a charge on it it's somewhere between 5 volts and 0 and you know however long it would stay like that without starting to read something crazy who really knows you know digits will randomly start going missing and stuff here and there as it goes between the rail and zero volts so there's enough voltage on that right now for it to actually read a number but of course you can see that this would just cause major problems with this display right because anything else that we tried to run on this this for would be interfering with it because it wouldn't clear yeah there we go there's some random weirdness right now so what I'm going to do is put this 10k resistor back into the input pin here and that will bring it back to zero and make everything stable now you'll notice on on some really really large circuit boards you'll see tons and tons of these ICS not particularly this one but lots of ICS like this and they don't have any pulldown resistors and that's because the IC before it is actually pulling it low or making it go high when I say low taking it to ground or too high whatever the high is on that circuit board so you'll see you know huge circuit boards of massive arrays of these things with very few components may be a few 10 ohms or paralytic but really no resistors anywhere so what we're going to do is make this thing display like the actual decimal display that we had here but this one here will actually display a number for us instead of just lighting up a single bulb and it works pretty much the same way so in order to get the number two to light up I need to bring this to five volts and this would be zero zero zero so they'd be 1 0 0 0 would be the binary code for this right now so I'll take 5 volts and I'll put it on that pin and we'll get the number 2 just like that now if I wanted to make that say number 6 this would be 1 1 0 0 so I'll put 5 volts on d2 here and that will give us the number 6 and there we have the number 6 now this IC has a a neat feature it has memory or latch enable and if you look at some of the old Heathkit stuff or you know some of the old frequency counters they actually have ICS that are just you know dedicated latch and they call them memory and really what it is is it just makes this thing remember when you open up all the inputs and they just go to ground again so by making this latch high will cause this thing to hold the digit there so what I'll do is I'll bring the latch high which is this pin right here alright you can see we have the 6 now I'll just open these two alright and you can see it's holding memory right now so if I open this latch it'll just drop to 0 again it'll lose its memory so I'll just open this you can see it drops to 0 now another neat feature about this is that if I have this high it will hold this it's memory this is in its memory right now so just say I wanted to light up the number 2 again here so number 2 should light but it's waiting for the next pulse so if I was to open this and close this again it will store the 2 so I'll just open this and close this again and you can see the number two is in there and I can remove the number two and it will hold it so this is really handy for frequency counters or you know any kind of display whether it be a lot of flicker having that memory is the reason that the frequency counters and all that have that there or you you'd see you know a lot of digit movement it'd be really actually kind of aggravating so a handy little feature there and of course this IC has a bunch of other things it has you know blanking so it'll blank the display and it has lamp test so lamp test really what that does is it it lights up all the digits of the aid in the beginning so sometimes they have a timer on the lamp test pin and you know as soon as the unit comes on it has a you know shows the number eight and then it will you know go to the normal display there's a whole bunch of different ways of doing that but yeah just a pin that you can use or not use depending on what you're designing so this is exactly how this works and computers work pretty much exactly the same way except they use much larger strings of binary than what we're doing here this is really kind of small but this is the basement floor or their ground floor and this gives you the idea of exactly what the ones in the zeros are and now you can most likely decode some binary charts I hope you enjoyed this video on how binary works in your electronic devices if you did you can let me know by giving me a big thumbs up and hang around there'll be many more videos just like this in the near future so until next time bye for now you
Info
Channel: Mr Carlson's Lab
Views: 136,124
Rating: 4.9700065 out of 5
Keywords: creativedesigncomponents.com, Creative Design Components, Binary Logic Explained, binary code explained, logic gates, pull down resistrors, pull up resistors, 74HC, 74LS, 74S, 74 series logic, 74HCT, 74ALS, computer binary code, understand binary
Id: VwJ-fTEXw_M
Channel Id: undefined
Length: 17min 29sec (1049 seconds)
Published: Tue Feb 02 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.