Data encoding and addressing chapter 6 – Rockwell Automation 1770-KF2 Data Highway or Highway Plus Interface Module User Manual User Manual
Page 139
Data Encoding and Addressing
Chapter 6
6-2
Binary
The binary number system is probably the simplest to use for computer
and PC applications because it is the most natural way to represent data
bits. However, since the binary system uses only the digits 0 and 1, it is
cumbersome to show values in binary format.
Each digit in a binary number has a certain place value expressed as a
power of 2. You can calculate the decimal equivalent of a binary number
by multiplying each binary digit by its corresponding place value and then
adding the results of the multiplications. Figure 6.1 shows the binary
representation of the decimal number 239.
Figure 6.1
Binary Numbers
1
1
1
0
1
1
1
1
10240
128
64
32
8
4
2
1
1 x 2
7
= 128
1 x 2
6
= 64
1 x 2
5
= 32
0 x 2
4
= 0
1 x 2
3
= 8
1 x 2
2
= 4
1 x 2
1
= 2
1 x 2
0
= 1
239
10
11101111
2
= 239
10
2