Just imagine you are in a workshop. A workshop on electronic hardware components. You are learning how to make RC cars and trying to make do new projects with them.
But before starting the individual projects yourself, you’ve decided to attend a workshop to improve your skills. The organizer intends to make all of the attendees do the same project in order to introduce you to the instruments and working mechanisms.
Since, it is a Remote Controlled(wireless) project, that you are trying to build, you will have to send the information from one end to the other wirelessly. But since nearly every component works on 0’s and 1’s, you will need an encoder(to covert your instructions to binary) and a decoder( on the receiving end).
There are a lot of participants in the workshop and they are using the same instruments to build the project, there might be some problems. Since all of the participants are using the same radio frequency to transmit their information to the RC car, one car might receive the information intended for another car and so on, which might lead to some problems while testing the project or even while using it.
So, what can you do to remove the plausible defects? You can send the instructions with a specific address encoded with it so that when the other end receives a wide range of signals, the decoder can tally the receiver address and the sender address to determine whether to follow the information or not.
So, you can encode your address with the instructions sent. You can encode your n-digit address to avoid the problem. But, remember, every instruction you wish to send must be in binary 0’s and 1’s. So, you could just use a ‘n’ bit DIP Switch( use to set an address of your start point and end point in the circuit).
Just by looking at the number of bits that you can encode in the DIP Switch, you can find the maximum total number of similar projects that are being made. For example, if there is just 1 bit that can be stored in the address, then the possible address values are 0 and 1.
If there are just 2 bits that can be stored as the address, the possible ways to assign the address is by:
00
01
10
11
Here, 0 represents the ‘off’ state in the switch, and 1 represents the ‘on’ state in the switch.
Maybe, you have already found the pattern here, the total possible ways of assigning the address for a ‘n’ bit DIP Switch is 2^n. Why?
Because for every bit of address that you can store, you have 2 possible values that can be stored( 1 or a 0). So, if there are n places where you can assign such values, then, by counting principle, you have 2*2*2*2*….*2 (multiplied n times).
=2^n possible permutations.
If for some reason, each student is not making a single project but is rather working in a group to do so, then the organizer can plan the most cost-efficient DIP switch to buy for the workshop? How?
Let’s just look at it.
For example, if you wish to have 5 students in a group and expect a total of 200 participants, then you will have 40 different groups made. Since you want the addresses of all those group projects to be different, then you will have to have enough DIP Switches to encode the unique addresses to each and every group. But as we have seen before, the only possible permutations of addresses that you get in a switch come in the order of 2^n, the closest power of 2 that is greater than 40 is either 32 or 64. But if you use the switch with only 5 encodable address points( 32 unique addresses), then the information sent by the rest of the 8 groups may interfere with the signals of other groups( due to the lack of unique addresses of all groups). However, if you chose to buy the switch with 6 encodable address points, you can generate 64 unique addresses. And the signals from one remote will not interfere with the receiver of another car.
By doing this simple calculation, you will not spend unnecessary money on higher-bit DIP Switches. So, if someday, you plan on organising some workshop on electronic hardware, you can use a little bit of permutation to minimize the cost of organizing the workshop.
Leave a Reply