Advertisement

What is Binary Coded Decimal (BCD) and How is it Used in Automation?

What is Binary Coded Decimal (BCD) and How is it Used in Automation? ▶ C'mon over to where you can learn PLC programming faster and easier than you ever thought possible!

=============================

▶ Check out the full blog post over at


=============================

As computers evolved from very early transistor-based models to the desktop personal computers, instruction registers were 8-bits in length with computing, having to adapt to the standard decimal-based system.

Specific instructions used by programmers early on were designed with 8-bits in length to facilitate all of computing. These instructions have been maintained throughout the years of computer development, and will most likely continue to be used in the future.

Within computers, each of the 8-bits has only two values for representing either a logic 1 (or True) and a logic 0 (or False). This is what is referred to as Boolean in computer science.

Boolean logic and expressions make the system of using binary numbers perfect for use in digital or electronic circuits and systems. And, the BCD system offers relative ease of conversion between machine-readable and human-readable numerals.

An advantage of the Binary Coded Decimal system is each decimal digit is denoted by a group of 4 binary digits and that it allows easy conversion between decimal a base-10 system and binary a base-2 system.

A disadvantage is BCD code does not use all the states between binary 1010 for the decimal 10 and binary 1111 for the decimal 15.

The binary numbering system used in computers is a Base-2 numbering system that follows the same set of rules used with base-10 numbering system or decimal.

Binary-coded decimal or BCD is a code using a series of binary digits or bits that when decoded represents a decimal digit. A decimal number contains 10 digits, zero to nine.

So, each decimal digit 0 through 9 is represented by a series of four binary bits where the numerical value when decoded is equivalent to a decimal digit. In BCD we will use binary numbers from 0000-1001, which are equivalent to decimal 0-9.

Using the decimal number 5 for example, 5 in BCD is represented by 0101 and 2 in BCD is represented by 0010 and 15 in BCD is represented by 0001 0101.

The decimal weight of each decimal digit to the left increases by a factor of 10. With the BCD number system, the binary weight of each digit increases by a factor of 2.

The first digit has a weight of 1, the second digit has a weight of 2, the third digit has a weight of 4, and the fourth digit has a weight of 8.

Keep in mind, Binary-coded decimal is not the same as binary to decimal conversion.
When we use a table to explain and expand out the weighted values, using 16 bits, we can convert the decimal numbers into their binary equivalents.

By adding together all the decimal number values from right to left from each of the bit positions that are represented by a 1 gives us the decimal equivalent.
However, for the same decimal number, the BCD form representation is not the same as binary to decimal conversion.

Electronic circuits and systems can be divided into two types of circuits, analog and digital.

Analog Circuits amplify varying voltage levels that can alternate between a positive and negative value over a period of time and Digital Circuits produce distinct positive or negative voltage levels representing either a logic level 1 or a logic level 0 state.

Voltages used in digital circuits could be any value, however, in digital and computer systems they are below 10 volts.

In digital circuits voltages are called logic levels and typically one voltage level will represent a HIGH state and a LOW state. A binary number system will use both of these two states.

Some PLCs for example, Siemens S7 standard timer, and counter data types use Binary Coded Decimal in their data structures because these structures go back to when engineers had to deal with things like these thumbwheels and 7 segment displays.

In fact, the S7 timer setpoints are still entered as S5T# 2S for a two-second setpoint. These timers use three BCD digits or 12 bits and two extra bits for the time base. This is true for counters in which they only count from 0 to +999.

=============================

Missed our most recent videos? Watch them here:







=============================

To stay up to date with our last videos and more lessons, make sure to subscribe to this YouTube channel:



=============================

TWEET THIS VIDEO

=============================

Like us on Facebook:

Follow us on Twitter:

Follow us on LinkedIn

Follow us on Instagram

#RealPars #BCD #Automation

Binary Coded Decimal,BCD,Automation,decimal-based,Boolean,Boolean logic,digital circuits,BCD system,binary digits,base-2 system,Base-2 numbering system,binary,binary weight,BCD truth table,decimal number,weighted BCD digit,BCD form representation,logic levels,binary number,Digital signals,alpha-numeric,BCD format,numerical interface,BCD type devices,PLC,Siemens S7,timer and counter data types,S7 timer,S7 timer setpoints,S5 PLC platform,

Post a Comment

0 Comments