B&B Electronics 232SDD16 manual Decimal to Hexadecimal Conversion

Page 19

Hexadecimal to Decimal Conversion: Decimal = (1st Hex digit x 4096) + (2nd Hex digit x 256) +

(3rd Hex digit x 16) + (4th Hex digit)

Each "Hex digit" is the decimal equivalent value of the hexadecimal symbol.

Example: Convert 10FC hexadecimal to decimal.

1

x

4096

=

4096

0

x

256

=

0

15

x

16

=

240

12

x

1

=

12

 

 

 

 

4348

10FC hex equals 4348 decimal.

Decimal to Hexadecimal Conversion:

Example: Convert 4348 decimal to hexadecimal.

4096

4348

=

1

=

1

(1st Hex digit)

 

4096

 

 

 

 

 

256

252

=

0

=

0

(2nd Hex digit)

 

0

 

 

 

 

 

16

252

=

15

=

F

(3rd Hex digit)

 

240

 

 

 

 

 

1

12

=

12

=

C

(4th Hex digit)

 

12

 

 

 

 

 

0

4348 decimal equals 10FC hexadecimal.

232SDD16-1005 Manual

Appendix B

B-3

B-4

Appendix B

232SDD16-1005 Manual

B&B Electronics -- PO Box 1040 -- Ottawa, IL 61350

B&B Electronics -- PO Box 1040 -- Ottawa, IL 61350

PH (815) 433-5100 -- FAX (815) 433-5104

PH (815) 433-5100 -- FAX (815) 433-5104

Image 19
Contents Designed and Manufactured Ottawa, Illinois Electronics Mfg. Co. IncInternet Table of Contents Introduction 232SDD16 Features232SDD16-1005 Manual Communications 232SDD16 SpecificationsSize Serial Port Connections ConnectionsDigital I/O Connections 232SDD16 I/O Port Pinout232SDD16 To DCE Connections RS-232 Connector PinoutPower Supply Connections 232SDD16 To DTE ConnectionsSyntax Commands232SDD16 Commands Equivalent ValuesSet Output Lines Command Read I/O Lines CommandBit Assignments for I/O Lines Set Power-up States Command Define I/O Lines CommandRead Configuration Command Bin. Example !0RC01010101010000010101000001000000 Digital Inputs InterfacingIsolated Solid State Input Programming Techniques SoftwareDigital I/O Mask Values MSstates = MSstates or mask LSstates = LSstates or mask Set Output States CommandMSdefs = MSdefs and mask LSdefs = LSdefs and mask MSpups = MSpups and mask LSpups = LSpups and maskMSdefs = MSdefs and NOTmask LSdefs = LSdefs and NOTmask Define I/O Lines CommandSet Power-up States Command MSdefs = MSdefs or mask LSdefs = LSdefs or maskRunning Demonstration Program Demonstration ProgramAppendix a Appendix B Decimal to Hexadecimal Conversion 232SDD16-1005 Manual Appendix C Figure C.1 DTB25 Outline DrawingTable C.2 DBM16 I/O Connections Table C.1 DTB25 ConnectionsDBM16 Interfacing Figure C.2 DBM16 Outline DrawingFigure C.6 Isolated Solid State Input Inputs DBM16 Specifications LinesOutputs 232SDD16-1005 Manual Appendix C Comp = not x and &HFF #0RDMsb~ I/O msbI/O lsb ~ I/O lsb 00FF01FE232SDD16-1005 Manual Appendix D Table D-1 Extended Commands