Decoder
- A decoder takes input lines and produces output lines. — แต่อย่าง 7447 เป็นเหมือน Type พิเศษออกแค่ 7
- It converts binary or encoded data into a specific output, typically activating one output based on the input combination.
- Example: A BCD to 7-segment decoder (like the 7447) converts a 4-bit Binary-Coded Decimal (BCD) input into a signal that controls a 7-segment display.
ง่าย ๆ ก็คือ Decoder จะ Output มากกว่า Input
Encoder
- An encoder does the opposite: it takes ** input lines and produces output lines.
- It compresses or encodes multiple active inputs into a smaller set of binary outputs.
- Example: A priority encoder (like the 74147) takes multiple inputs (like 10 decimal digits) and converts the highest-priority active input into a 4-bit binary output.
ง่าย ๆ ก็คือ Encoder จะ Input มากกว่า Output