Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual ยท part 51 of 59

Mini-PLC-2/02, 2/16, 2/17 Processor (cat. no. 1772-LZ, LZP, LX, LXP, LW, LWP) User Manual: C - Number Systems

Pages 414 to 419 of 490, from Mini-PLC-2/02, 2/16, 2/17 Processor (cat. no. 1772-LZ, LZP, LX, LXP, LW, LWP) User Manual

The original document is the PDF (2.4 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Allen-Bradley 1772-LW /LWD, Allen-Bradley 1772-LWP, Allen-Bradley 1772-LX / LXP and Allen-Bradley 1772-LZP

Page 414

Appendix

C

Number Systems

Objectives

This appendix describes the four numbering systems the processor uses: decimal octal binary hexadecimal These numbering systems differ by their number sets and place values.

Decimal Numbering System

Timers, counters and math operations word values use the decimal numbering system. This is a numbering system made up of ten digits: the numbers 0 through 9 (Table C.A). All decimal numbers are composed of these digits. The value of a decimal number depends on the digits used and the place value of each digit. Table C.A Numbering System Conversion Chart Hexadecimal

Binary

Decimal

Octal

0 1 2 3 4 5 6 7 8 9 A B C D E F

0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

000 001 002 003 004 005 006 007 010 011 012 013 014 015 016 017

Each place value in a decimal number represents a power of ten starting with ten raised to the zero power (100=1) (Figure C.1). You can compute the decimal value of a number by multiplying each digit by its corresponding place value and adding these numbers together.

C-1

Page 415

Appendix C Number Systems

Figure C.1 Decimal Numbering System 2 x 101 = 20010

200

3 x 101 = 3010

30

9 x 100 = 9

2

3

9

10

9 23910

10 10404-I

Octal Numbering System

Byte word values use the octal numbering system. This is a numbering system made up eight digits: the numbers 0 through 7 (Table C.A). All octal numbers are composed of theses digits. The value of an octal number depends on the digits used and the place value of each digit. Each place value in an octal number represents a power of eight starting with eight raised to the zero power (80=1) (Figure C.2). You can compute the decimal value of an octal number by multiplying each octal digit by its corresponding place value and adding these numbers together. Figure C.2 Octal Numbering System 3 x 82 = 192

192

5 x 81 = 40

40

7 x 70 = 7

3

5

7

8

7 23910

23910 = 3578 10404-I

C-2

Page 416

Appendix C Number Systems

Binary Numbering System

Binary numbering is used in all digital systems to store and manipulate data. This is a numbering system made up of two numbers: 0 and 1 (Table C.A). All binary numbers are composed of these digits. Information in memory is stored as an arrangement of 1 and 0. The value of binary number depends on the digits used and the place value of each digit. Each place value in a binary number represents a power of two starting with two raised to the zero power (20=1) (Figure C.3). You can compute the decimal value of a binary number by multiplying each binary digit by its corresponding place value and adding these numbers together. Figure C.3 Binary Numbering System 1 x 27 = 128 1 x 26 = 64 1 x 25 = 32 0 x 24 = 0

128

1 x 23 = 8

64 32 8 4 2 1___ 23910

1 x 22 = 4 1 x 21 = 2 1 x 20 = 1 1

1

1

0

1

1

1

1

111011112 = 23910 10406-I

Binary Coded Decimal System The binary coded decimal (BCD) format expresses a decimal value as an arrangement of binary digits. Each group of 4 binary digits is used to represent a decimal number from 0 to 9. All BCD numbers are composed of these digits. The value of BCD number depends on the digits used and the place value of these digits. Each place value in a BCD number represents a power of two starting with two raised to the zero power (20=1) (Figure C.4). You can compute the decimal value of a binary number by multiplying each binary digit by its corresponding place value and adding these numbers together.

C-3

Page 417

Appendix C Number Systems

Figure C.4 Binary Coded Decimal 0 x 23 = 0 0 x 22 = 0

2

1 x 21 21 = 0 0 x 20 = 0 0 x 23 = 0 0 x 22 = 0

3

1 x 21 = 2 1 x 20 = 1 1 x 23 = 8 0 x 22 = 0 0 x 21 = 0

910

1 x 20 = 1

0

0

1

2

0

0

0

1

3

1

1

0

0

1

9 10407-I

C-4

Page 418

Appendix C Number Systems

Binary Coded Octal System The binary coded octal (BCO) format expresses an octal value as an arrangement of binary digits (eight bits or one byte). The 8 bits are broken down into three groups: 2 bits, 3 bits, and 3 bits. The first group of binary digits is used to represent an octal number from 0 to 3; the other two groups represent an octal number from 0 to 7. All BCO numbers are composed of these digits. Each place value in a BCO number represents a power of two starting with two raised to the zero power (20=1) (Figure C.5). You can compute the octal number for each group of bits by multiplying the binary digit by its corresponding place value and adding these numbers together. Figure C.5 Binary Coded Octal

21

20

22

21

20

22

21

20

1

1

1

0

1

1

1

1

3

Hexadecimal Numbering System

5

78

10408-I

Get and Put word values use the hexadecimal numbering system. This is a numbering system made up of 16 digits: the number 0-9 and the A-F. The letter A-F represent the decimal numbers 10-15, respectively. Four binary digits represent each hexadecimal character, you can convert from hexadecimal to binary by writing out the patterns for each hexadecimal character or group of four binary digits (Figure C.6). Each place value in a hexadecimal character represents a power of 16 starting with 16 raised to the zero power (160=1) (Figure C.6). You can compute a decimal number for each group of hexadecimal characters by multiplying the decimal digit equivalent of each hexadecimal character by its corresponding place value and adding these number together.

C-5

Page 419

Appendix C Number Systems

Figure C.6 Hexadecimal to Decimal Conversion 0 x 163 = 0 1 x 162 = 256 10 x 161 = 160 7 x 160 = 7 0

C-6

1

A

7

256 160 __7___ 42310 = 01A716 10409-I