Chapter 4 Number Systems
Objectives Identify the commonly used number systems used in PLCs. Convert binary data to decimal. Examine how data is stored in PLC data tables. Describe how BCD field devices interface.
Why Do I Need to Understand How Data Is Represented? In order to install, program, maintain, and troubleshoot today’s PLCs, you must understand the different methods by which internal data is represented.
Number Systems Typically Used with PLCs
We Use Words to Represent Information Our words are groups of characters grouped together to represent something. The words we use are of different lengths. Controller The Monday
We Use Symbols Called Numbers to Represent Data Everyday numbers are decimal. 12,345
Computers Do Not Understand Computers do not understand the words and numbers humans use. Computers have their own language called binary.
Binary Language Binary information is also represented in groups of characters. A group of binary digits called bits can be organized into words. Binary bits consist of only two characters. 1 and 0
Binary Words 16 bits grouped together is called a word. A binary word might look like: 1010 1010 1010 1010 1010
Decimal Numbers Ten digits Base or radix Weights 0,1,2,3,4,5,6,7,8,9 10 Weights 1, 10, 100, 1000 …..
Decimal Number System
Sixteen-Bit Binary Word Bit Weighting
Comparison of Decimal to Binary Numbers
Decimal Place Value Equivalent
Comparison of Decimal to Binary Numbers Powers of two 24 23 22 21 20 Place value 16 8 4 2 1 A: Decimal 1= B: Decimal 2= C: Decimal 3= D: Decimal 4= E: Decimal 5= F: Decimal 6= G: Decimal 7= H: Decimal 8= I: Decimal 21=
Four-Digit BCD Thumb-Wheel
Comparison of BCD to Decimal and Binary Numbers
Single-Digit BCD Thumb-Wheel Interfaced to a PLC
Binary-Coded Decimal Number Bit Patterns
Two-Digit BCD Thumb-Wheel Interface
BCD Invalid Codes
Thumb-Wheel Dialed to 11
Thumb-Wheel Dialed to 743
Output Module Connected to Seven-Segment Display
Decimal 0 through 7 Represented with Binary Bits
Octal Number System Place Values
Decimal, Hexadecimal, and BCD Comparisons
Place Values of Hexadecimal