8-4-2-1BCD code converted to decimal


  
Results:

BCD code uses 4 binary digits to represent a decimal number. Usually 8421 code is used (there are others such as 2421 code and remainder 3 code).

Here, let's use 8421 code to explain.

Four-digit binary system. Corresponding to the numbers 8, 4, 2, and 1.

For example: 1010, then the corresponding number is 8 0 2 1, adding together is eleven

For example: 0101, then the corresponding number is 0 4 0 1, adding together is five

The same reason

2421 code corresponds to the four numbers 2, 4, 2, and 1

Does remainder 3 code use 8421, but after using it, you need to subtract 3.