Data encoding and addressing chapter 6 – Rockwell Automation 1770-KF2 Data Highway or Highway Plus Interface Module User Manual User Manual

Page 142

Advertising
background image

Data Encoding and Addressing

Chapter 6

6-5

Figure 6.4
Hexadecimal Numbers

0

0

0

0

0

0

0

1

1

0

1

0

0

1

1

1

11335

0 x 2

3

= 0

0 x 2

2

= 0

0 x 2

1

= 0

0 x 2

0

= 0

0 x 2

3

= 0

0 x 2

2

= 0

0 x 2

1

= 0

1 x 2

0

= 1

1 x 2

3

= 8

0 x 2

2

= 0

1 x 2

1

= 2

0 x 2

0

= 0

0 x 2

3

= 0

1 x 2

2

= 4

1 x 2

1

= 2

1 x 2

0

= 1

0

16

1

16

A

16

7

16

0 x 16

3

= 0

1 x 16

2

= 256

10 x 16

1

= 160

7 x 16

0

= 7

01A7

16

= 423

10

Octal

The octal number system is also a relatively easy way to represent binary
data. This system uses the eight digits 0 through 7.

Each group of three data bits represents one octal digit between 0 and 7.
This factor presents a slight conversion problem because bytes and words
usually contain an even number of bits. Thus, an 8-bit byte can have an
octal value between 0 and 377, while a 16-bit word can have an octal
value between 0 and 177,777.

Each digit of an octal number has a place value that is a multiple of 8. To
convert from octal to decimal, multiply each octal digit by its

Advertising