What are the digital basics?
Digital circuits work on the basis of a transistor being used as a switch. Consider a light switch, a transistor can be considered almost the same and in some circuits transistors are used to control large amounts of power with very little input power being used.Look at figure 1 below. Here are two crude transistor switch circuits. In the first circuit if there is no voltage applied to the base of Q1 then it is not switched "on" and accordingly the + 5V passing through the 10K load resistor from our + 5V supply appears at both the collector of the transistor and also at output 1.
If we apply + 5V to the base of Q1 then because it is greater than 0.7 V than the grounded emitter, see the topic "transistors" for much greater detail on that operation, Q1 will switch on just like a light switch causing the + 5V from our supply to drop entirely across the 10K load resistor. This load could also be replaced by a small light bulb, relay or LED in conjunction with a resistor of suitable value. In any event the bulb or led would light or the relay would close.
Figure 1. - transistors as digital switches in digital basics
The output is always the opposite to the input and in digital basics terms this is called an "inverter" a very important property. Now looking at Q2 and Q3 to the right of the schematic we simply have two inverters chained one after the other. Here if you think it through the final output 2 from Q3 will always follow the input given to Q2. This in digital basics is your basic transistor switch.
Logic Blocks in Digital Basics
Depending upon how these "switches" and "inverters" are arranged in integrated circuits we are able to obtain "logic blocks" to perform various tasks. In figure 2 we look at some of the most basic logic blocks.Figure 2. - digital switches in digital basics
In the second set of switches A, B, and C they are arranged in "parallel" so that for any input to reach the output any one of the switches may be closed. This may be considered an "OR-GATE".
These are considered the basic building blocks in digital logic. If we added "inverters" to either of those blocks, called "gates", then we achieve a "NAND-GATE" and a "NOR-GATE" respectively.
Here in figure 3 we examine the digital basics in schematic form.
Figure 3. - digital basics in schematic form
Several interesting points emerge here. Of interest to the next section on binary numbers is the pattern of all the inputs for each logic block. Not only are they identical but, for only two inputs A and B there are four possible output situations which are called "states". These are digital basics. There actually can be many numbers of inputs. An eight input NAND-GATE is a common and quite useful digital logic block.
Next of particular interest is if you study them very carefully, that for the very identical inputs, each of these logic blocks gives us a totally different output result. Compare them.
Finally for the same inputs the NOR-GATE outputs are the direct opposite to the AND-GATE outputs while the OR-GATE outputs are the direct opposite to the NAND-GATE outputs.
Binary Numbers and Hex-Decimal in Digital Basics
If you have a single switch or input you can have two possible input states, it is either on or off. With two switches or inputs you have four possible input states as shown above. If you go to three inputs you have eight possible states and four inputs give you sixteen states. Again digital basics.By adding another input you double the previous number of states. Doubling the inputs gives you the square of the states.
We say four inputs gives sixteen states so doubling that gives us eight inputs so the number of states should be 16 X 16 or 256.
Consider this. If I offered you a job and I made you two alternative offers for monthly payment - Offer No. 1 is to pay you a most generous $10,000.00 for the month. Offer No. 2 is to pay you one cent for the first day you work for me, two cents the next day and doubling each day thereafter for the whole 30 day month. Which offer would you accept? Answer at the very bottom of this page.
Binary Coded DecimalTo the right we have provided a table of BCD data which is all based upon the old "1's" and "0's".If at first it looks a bit intimidating don't worry you will very quickly get the hang of it. Notice first of all we have in the extreme right hand column the numbers 0 - 9 and the letters A to F. The first four columns are headed 8 - 4 -2 - 1 We explained earlier by adding switches you double the previous capacity for numbering in binary. Notice the pattern of our 0's and 1's. Under the column 1 we get a succession of 0, 1, 0, 1..... Under the column 2 we get a succession of 0, 0, 1, 1..... etc. In fact under every column heading you have exactly an equal number of zeros first followed by the same number of ones. Look at column 8 for example. Eight zeros followed by eight ones. Now look at the far right column and look up number seven, follow that row reading across right to left and you will see the sequence 0 - 1 - 1 - 1. Okay if a one means a turned on switch with the value of that column what does 4 + 2 + 1 =? |
|
Four bits are called "a nibble" and guess what?, eight bits are called "a byte". Bet you've heard that one for sure unless you live under a rock.
You should know by now that four switches (OK bits right!) can represent sixteen states and with a digital clock you only go 0 to 9 and don't need anything else so that was called BCD or Binary Coded Decimal. The last word is because we humans count in decimal format or decades. Digital devices including computers DON'T, they can't. All they see are ones and zeros, nothing else.
0 comments:
Post a Comment