Tutorials Community Calendar Diagrams Articles Downloads Links
 Register
 Username: Password:
Save Password Forgot your password?
 Menu - Active topics (0) - New Articles (0) - New Downloads (0) - Private messages - My Bookmarks - Site Statistics - PM Pager - Useful links Members: 39 Active Users: 0 Members and 11 Guests

 Top 5 Downloads Circuit Magic (Hits: 221)Symbolic circuits analysis software to simulate AC... TinyCAD (Hits: 175)TinyCAD is a program to help you draw circuit diag... Free PCB (Hits: 160)FreePCB is a free, open-source printed circuit boa... Electronics Assistant (Hits: 144)Electronics Assistant is a program that performs e... VisualSpice Schematic Editor and Mixed Mode Simulation (Hits: 95)VisualSpice is a completely integrated 32-bit anal...

The BCD Code

# BCD Code: Binary Coded Decimal

## The BCD Code

In order to share information, that is in digital format, it is common to use a binary or hex representations.

There are other methods to represent this information and one of them is the BCD code.

Using the BCD coding is easy to see the relationship between a decimal number (base 10) and the corresponding binary one (base 2)

The BCD code uses 4 binary digits (see the two examples below) to represent a decimal number (0 to 9).

When you make a normal convertion from a binary number to a decimal one there is no direct relationship between the decimal digit and the binary digit.

Example #1:

This is a direct normal convertion from a decimal number to a binary one.
8510 = 10101012

The representation of the same decimal number on BCD code is shown on the right side

Example # 2:

This is a direct normal convertion from a decimal number to a binary one.
56810 = 10001110002

The representation of the same decimal number on BCD code is shown on the right side

As you can see from the above two examples, the decimal equivalent number does not seem to be a good BCD representation.

To obtain the equivalent BCD code of each previous decimal number, we have to assign a "weight" or "value" to each digit according to its position.

This "weight" or "value" follows the following order: 8 - 4 - 2 - 1. (It is a weighted code)

The last example shows that the number 5 is represented as: 0 1 0 1.
the first "0" corresponds to 8,
the first "1" corresponds to 4,
the second "0" corresponds to 2, and ...
the second "1" corresponds to 1.

From the above: 0x8 + 1x4 + 0x2 + 1x1 = 5

The BCD code that has the "weights" or "values" described before is called: Natural BCD Code.

The BCD code counts like a normal binary number from 0 to 9, but numbers from ten (1010) to fifteen (1111) are not used because these numbers do not have an equivalent decimal number.

This code is used, among other applications, to represent decimal numbers on 7 segment displays.

Notes: The subscript 2 and 10, are used to represent, in the first case a binary number and in the second case a decimal number.

Related Links
- Logic Circuit
- The truth table
- Logic Levels
- Analog and Digital. What´s the difference?

Tutorials main page

 Poll Results: Poll has expired Question: Do you like this site? Yes: 35 (92%) No: 3 (8%) Total: 38 votes

 Privacy © 2008-9 ElectronicsArea.com All Rights Reserved MaxWebPortal Snitz Forums