Encoding means
converting one form of data to another type.
Here we are converting decimal to binary. When the 1 button
is pushed, D1 is forward biased and the least significant bit goes high.
When the 2 button
is pushed, D2 conducts and takes the middle bit high.
When button 3 is pushed, D3 and D4 conduct and take the two lower bits high. With three lines you can have the binary numbers 000 to111 (decimal 0 to 7) encoded. |