12.05.2014 Views

Automating Manufacturing Systems - Process Control and ...

Automating Manufacturing Systems - Process Control and ...

Automating Manufacturing Systems - Process Control and ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

plc numbers - 13.10<br />

13.2.2 Other Base Number <strong>Systems</strong><br />

Other number bases are typically converted to <strong>and</strong> from binary for storage <strong>and</strong><br />

mathematical operations. Hexadecimal numbers are popular for representing binary values<br />

because they are quite compact compared to binary. (Note: large binary numbers with<br />

a long string of 1s <strong>and</strong> 0s are next to impossible to read.) Octal numbers are also popular<br />

for inputs <strong>and</strong> outputs because they work in counts of eight; inputs <strong>and</strong> outputs are in<br />

counts of eight.<br />

An example of conversion to, <strong>and</strong> from, hexadecimal is shown in Figure 13.14 <strong>and</strong><br />

Figure 13.15. Note that both of these conversions are identical to the methods used for<br />

binary numbers, <strong>and</strong> the same techniques extend to octal numbers also.<br />

16 3 = 4096<br />

16 2 = 256<br />

16 1 = 16<br />

16 0 = 1<br />

f 8 a 3<br />

15(16 3 ) =<br />

8(16 2 ) =<br />

10(16 1 ) =<br />

3(16 0 ) =<br />

61440<br />

2048<br />

160<br />

3<br />

63651<br />

Figure 13.14<br />

Conversion of a Hexadecimal Number to a Decimal Number<br />

5724<br />

----------- = 357.75<br />

16(0.75) = 12 ’c’<br />

16<br />

357<br />

-------- = 22.3125<br />

16(0.3125) = 5<br />

16<br />

22<br />

----- = 1.375<br />

16(0.375) = 6<br />

16<br />

-----<br />

1<br />

= 0.0625<br />

16(0.0625) = 1<br />

16<br />

1 6 5 c<br />

Figure 13.15<br />

Conversion from Decimal to Hexadecimal<br />

www.PA<strong>Control</strong>.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!