Digital Electronics/Mathematic and Logic Operations/Digital Encoder

Digital Encoder
Digital Encoder is a Digital Device that use binary number of certain bits to reprepresent information.

Example 1
Using two bit binary number we have 4 2 bits binary numbers
 * 00
 * 01
 * 10
 * 11

Let
 * 00 --- 0
 * 01 --- 1
 * 10 --- 2
 * 11 --- 3

Then decimal number from 0 to 3 can be coded as 2 bit binary number.

Example 2
Similarly, with 4 bit binary number can be used to code decimal numbers from 0 to 15 as shown below
 * 0000 --- 0
 * 0001 --- 1
 * 0010 --- 2
 * 0011 --- 3
 * 0100 --- 4
 * 0101 --- 5
 * 0110 --- 6
 * 0111 --- 7
 * 1000 --- 8
 * 1001 --- 9
 * 1010 --- 10
 * 1011 --- 11
 * 1100 --- 12
 * 1101 --- 13
 * 1110 --- 14
 * 1111 --- 15

4 bit binary coded decimal
4 bit binary coded decimal (BCD) is a digital device that use 4 bit binary numbers to represent decimal number from 0 to 15

7 bit binary coded decimal
7 bit binary coded decimal (ASCII) is a digital device that use 7 bit binary numbers to represent decimal number from 0 to 9 alphabets a to z, A to Z