| |
MODULE V - FUNDAMENTALS OF ELECTRONICS
DIGITAL BASICS (Final Page)
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 Decimal
To 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.
|
Binary Coded Decimal
- BCD
8
|
4
|
2
|
1
|
| 0 |
0 | 0 | 0
|
0 | 0 | 0
|
0 | 1 | 1 |
0 | 0 | 1 |
0
|
2
|
0
|
0
|
1
|
1
|
3
|
0
|
1
|
0
|
0
|
4
|
0
|
1
|
0
|
1
|
5
|
0
|
1
|
1
|
0
|
6
|
0
|
1
|
1
|
1
|
7
|
1
|
0
|
0
|
0
|
8
|
1
|
0
|
0
|
1
|
9
|
1
|
0
|
1
|
0
|
A
|
1
|
0
|
1
|
1
|
B
|
1
|
1
|
0
|
0
|
C
|
1
|
1
|
0
|
1
|
D
|
1
|
1
|
1
|
0
|
E
|
1
|
1
|
1
|
1
|
F
|
|
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 =?
Of course the answer was seven. Try it with any number you like. Alright what's this A to F stuff? Look at a digit on a digital clock or watch for example. For those numbers to be represented in digital format requires four switches but now we will start using the correct terms. The word is "bits", heard that before? Now we're right into digital basics.
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.
Digital Basics of Computers
Early computer programmers needed the digital basics to some way represent the human recognised numbers 10 to 15 under the decimal system in a way which still represented one decade. They conveniently chose A - F the first six letters of the alphabet and six in latin is "HEX". Hex-Decimal was born, six alphabetical characters with ten decimal numbers comprising a set of sixteen unique settings of bits all told. The first home computers such as my old personal favourite, the Apple II, had an eight bit "data bus" which dealt in "bytes" and had a sixteen bit (65,536 or 64K) "address bus".
The only changes since the 1970's has been the ever increasing speed of the digital logic blocks contained within microprocessors, repeated doubling of the number of switches, (er sorry bits!) reduced power consumption for efficiency, and expanded on board "instruction sets" of micro-code for sharp programmers to use. Dead simple really.
By the way, computers and other digital devices can NOT multiply or divide, they can only add and subtract or shift a sequence of bits left or right. When a computer ostensibly multiplies 3 X 4 it actually deep down in the nitty gritty department of all those basic logic blocks shown in figure 3 above, which are buried deep within your IBM or Mac microprocessor, takes the number four, adds four again and; finally adds four again to get twelve. Anyone who tells you otherwise reveals a deep ignorance of digital basics, trust me.
Want more proof? Take the word "proof". In ASCII format the word "proof" in lower case is five letters of the alphabet represented as a sequence of hex-decimal bytes as follows -
70 72 6F 6F 66
in decimal format that would be
112 114 111 111 102
A computer looks at those sequence of bytes to "interpret" the word "proof". To achieve that colour change to red I used the html instruction <font color="#FF0000"> which of course is a six byte instruction in hex-decimal. As an exercise for yourself see if you can see how the conversion from hex-decimal to decimal equivalent for the word "proof" occurs. O.K. it's just digital basics.
Digital Simulator
Digital Works 3.04
Digital Works 3.04 is a graphical design tool that enables you to construct digital logic circuits and to analyse their behaviour through real time simulation. Its intuitive, easy to use interface makes it the ideal choice for learning or teaching digital electronics. You can even prototype simple digital electronic circuits before you actually build them.
You can download a free, fully functional evaluation copy of Digital Works for Windows 95, 98 and NT 4
Download Digital Works 3.04 - 1659 Kb
|