Programmable Logic Controllers (PLC) are the same as computers. They only understand two conditions; on and off. (1 or 0 / Hi or Low/ etc.) This is known as binary. The PLC will only understand binary, but we must display, understand and use other numbering systems to make things work. Let’s look at the following standard numbering systems.
Binary has a base of two (2). Base means the number of symbols used. In binary, the characters are 1 or 0. Each binary mark can be referred to as a bit. Putting multiple bits together will give you something like this: 100101112. The 2 represents the number of symbols/binary notation. Locations of the bits will indicate the weight of the number. The importance of the number is just the number to the power of the position. Positions always start at 0. The right-hand bit is the ‘least significant bit,’ and the left-hand bit is the ‘most significant bit.’
Let’s look back at our example to determine what the value of the binary number is:
100101112 =
We start with the least significant bit and work our way to the most significant bit.
1 x 20 = 1 x 1 = 1
1 x 21 = 1 x 2 = 2
5 x 101 = 5 x 10 = 50
1 x 102 = 1 x 10 x 10 = 100
15110 = 1 + 50 + 100
151 = 151
Hexadecimal has a base of sixteen (16). The symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. Hexadecimal represents binary numbers. F16 = 11112
Every bit of binary represents one hexadecimal digit.
In our original binary number, we can now convert this to hexadecimal.
100101112
The least significant four bits are:
01112 =
1 x 20 = 1 x 1 = 1
1 x 21 = 1 x 2 = 2
0 x 23 = 0 x 2 x 2 x 2 = 0
1 x 23 = 1 x 2 x 2 x 2 = 8
Therefore:
100101112 = 9716
We can now convert this hexadecimal number back into decimal
9716 =
9716 = 7 + 144 = 151
The following chart will show all combinations for 4 bits (nibble) of binary. It shows the Binary, Decimal, and Hexadecimal (Hex) values. It is interesting not that Hex is used because you still have only one digit (Place Holder) to represent the nibble of information.
Binary | Decimal | Hexadecimal | Binary | Decimal | Hexadecimal |
0000 | 00 | 0 | 1000 | 08 | 8 |
0001 | 01 | 1 | 1001 | 09 | 9 |
0010 | 02 | 2 | 1010 | 10 | A |
0011 | 03 | 3 | 1011 | 11 | B |
0100 | 04 | 4 | 1100 | 12 | C |
0101 | 05 | 5 | 1101 | 13 | D |
0110 | 06 | 6 | 1110 | 14 | E |
0111 | 07 | 7 | 1111 | 15 | F |
Thank you,
Garry
If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLCs are not challenging to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimals, Hexadecimal, ASCII, and Floating Points.
To get this free article, subscribe to my free email newsletter.
Use the information to inform other people how numbering systems work. Sign up now.
The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.
do you mind if we can download the plc software that is discussed so that we can immediately understand it and run it thanks
Hi Supriadi,
Here is some information on the Do-More Designer Software.
https://www.automationdirect.com/adc/overview/catalog/software_products/programmable_controller_software/do-more_plc_programming_software
This is a free programming package that includes a simulator that I have used several times on the website. Here is the download link:
https://support.automationdirect.com/products/domore.html
This series will take you through learning the software.
https://www.youtube.com/playlist?list=PL3y71jAPOdZB5LJMMotZP36LvzfdgkgzW
I hope this helps you out.
Regards,
Garry