How many different BCD numbers can be stored in 12 switches? (Assume two position or on-off switches)
Explanation: In Binary Coded Decimal (BCD) encoding scheme each of the decimal numbers(0-9) is represented by its equivalent binary pattern (which is generally of 4-bits).
A switch can store 1 bit, either 0 (off) or 1 (on) and each digit of BCD representation takes 4 bits, so there will be 12/4 = 3 BCD digits. A BCD digit can be from 0 to 9 (total 10 possibility).
Therefore, diffrent possible BCD numbers in 12 switches are:
= 10 * 10 * 10 = 1000 = 103
So, option (D) is correct.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.