Formula:
Binary-Coded Decimal (BCD) is a system where each decimal digit is represented by its own four-bit binary equivalent. It's not the same as converting a decimal number directly to binary. For example, the decimal number 12 in BCD would be 0001 0010 (1 is 0001, 2 is 0010), whereas in pure binary, 12 is 1100.
The conversion process involves taking each digit of the decimal number and representing it with its 4-bit binary code (from 0000 for 0 to 1001 for 9). These 4-bit codes are then concatenated to form the final BCD representation.