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

preview_player
Показать описание

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

▶ 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:

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

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

#RealPars #BCD #Automation
Рекомендации по теме
Комментарии
Автор

Thank you Realpars for everything. Regards from Cancun Mexico...

IngDzib
Автор

Thank you for helping people who work out in the field

johnlansing
Автор

BCD is used extensively in the OMRON CP and CJ series PLCs as well, in fact many of the instructions in CX-Programmer have a BCD and Binary version. Their more modern NJ/NX series use tag based data types that obscure the binary coding.

sjholmesbrown
Автор

This is really awesome! It is an easy topic, but because we sometimes mix up between decimal to BCD conversions and Decimal to Binary conversions, it seems challenging! This video really cleared it up. Thanks Real Pars

aadilferoze
Автор

Good work and keep going you are doing great work...

theuv
Автор

Thank you real Pars always with good knowledge

shubhamdubey
Автор

Thanks, RealPars. Your information is really good for the user. Keep it up; the best contribution is information!

Greetings from Nicaragua.

rafaelgarachecalix
Автор

thank you realpars team for informative videos, how 2421 and reflective codes usded in real time

shashikalas
Автор

Can we get something on CNC in automation? Sinumerik 840D sl etc.

Siddhartha
Автор

Hi!


We know that analog input is first converted to binary.
which function on the PLC will process Analog Inputs.

salamhassan
Автор

Is it possible to have access to all videos by subscribing on the website or app? Because on the website, there are packs of videos with their specific price labels and it confuses me.
I'm not sure whether I should pay for packs or just subscribe.

elmirelmir
Автор

thanks, it helped. Greetings from Pakistan

nomanmalik
Автор

Thanks sir, ,
Please upload brief video on PID gain and PID controller.

safdarjamal
Автор

This is really awesome explanation which graphics.👌👍

devanandkumar
Автор

Thanks RealPars, great video


Is there a chance to teach us system architecture drawing?

MM-vikh
Автор

Please make video on integer and D int. Boolean and real value and used where and which types signal in plc software. And thanks for this video from INDIA.

SanskaariLadka
Автор

Please guys, do videos about simotion, profinet, profibus dp and pa...

dekunet
Автор

do you have videos on omron CP2E tutorials thanks

georgealbo
Автор

Do you have a special website to lean this form of computing? Thank you 🙏

PatrickTengmusic
Автор

Any video to show how to copy the programming file from PLC

edwinso