Appendix
G
Numbering
S
ystems
G--2
Numbering Systems
DL105 PLC User Manual, 3rd Edition
Introduction
As almost anyone who uses a computer is somewhat aware, the actual operations of
a computer are done with a binary number system. Traditionally, the two possible
states for a binary system are represented by the digits for ”zero” (0) and ”one” (1)
although ”off” and ”on” or sometimes ”no” and yes” are closer to what is actually
involved. Most of the time a typical PC user has no need to think about this aspect of
computers, but every now and then one gets confronted with the underlying nature
of the binary system.
A PLC user should be more aware of the binary system specifically the PLC
programmer. This appendix will provide an explanation of the numbering systems
most commonly used by a PLC.
Binary Numbering System
Computers, including PLCs, use the Base 2 numbering system, which is called
Binary or Boolean. Like in a computer there are only two valid digits in Base 2 a PLC
relies on, zero and one, or off and on respectively. You would think that it would be
hard to have a numbering system built on Base 2 with only two possible values, but
the secret is by encoding using several digits.
Each digit in the base 2 system when referenced by a computer is called a bit. When
four bits are grouped together, they form what is known as a nibble. Eight bits or two
nibbles would be a byte. Sixteen bits or two bytes would be a word as in. Thirty--two
bits or two words is a double word as in Table 1.
Double Word
Word
Word
Byte
Byte
Byte
Byte
Nibble
Nibble
Nibble
Nibble
Nibble
Nibble
Nibble
Nibble
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Table 1
Binary is not “natural“ for us to use since we have grown up using the base 10
system. Base 10 uses the numbers 0--9, as we are all well aware. From now on, the
different bases will be shown as a subscripted number following the number.
Example: 10 decimal would be 10
10
.
Table 2 shows how base 2 numbers relate to their decimal equivalents.
A nibble of 1001
2
would be equal to a decimal number 9 (1*2
3
+ 1*2
0
or 8
10
+ 1
10
). A
byte of 11010101
2
would be equal to 213 (1*2
7
+ 1*2
6
+1*2
4
+ 1*2
2
+1*2
0
or 128
10
+
64
10
+ 16
10
+ 4
10
+ 1
10
).
Table 2
Содержание DL105
Страница 2: ...DL105 PLC User Manual Manual Number D1 USER M...
Страница 308: ...1B DL105 Error Codes In This Appendix Error Code Table...
Страница 314: ...1C Instruction Execution Times In This Appendix Introduction Instruction Execution Times...
Страница 324: ...1D Special Relays In This Appendix DL105 PLC Special Relays...
Страница 327: ...1E PLC Memory In This Appendix DL105 PLC Memory...
Страница 329: ...1F European Union Directives CE In This Appendix European Union EU Directives Basic EMC Installation Guidelines...