Sunteți pe pagina 1din 5

SIEMENS

NUMBERING SYSTEM

SIEMENS
SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved

1/9

November 21, 2013

SIEMENS

Objectives

- Know The Different Numbering System. - Know The Integer, Double Integer, Real Formats & How It Is Used.

SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved

2/9

November 21, 2013

SIEMENS

The Numbering Systems


The Decimal Number System uses base 10. It includes the digits from 0 through 9. The Binary Number System uses base 2 includes only the digits 0 and 1. The Hexadecimal Number System uses base 16 includes only the digits 0 through 9 and the letters A, B, C, D, E, and F.

Name
Binary Decimal Hexadecimal

Base
Base 2 Base 10 Base 16

Binary Number Formats


The Bit: The smallest "unit" of data on a binary computer is a single bit. The Byte A byte contains eight bits, it can represent 2^8, or 256, different values. The Word A word contains exactly two bytes, or 16 bit, it can represent 2^16, or 65,536 different values. The Double Word A double word contains exactly two words, or 32 bit, it can represent 2^32, or 4,294,967,295, different values
SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved

Size

Name
Bit Byte Word Double Word

(bit s)

Example 1 0000 0101 0000 0000 0000 0101 0000 0000 0000 0000 0000 0000 0000 0101

1 8 16

32

3/9

November 21, 2013

SIEMENS

Data Type

Data Size

S7-Format

Min. No.

Max. No.

Bool

One Bit

2# Binary Format

2#0

2#1

Byte

8 Bit

B#16# Hex Format


B#16#

B#16#00

B#16#FF

Word

16 Bit

B#16#0000

B#16#FFFF

DWord

32 Bit

B#16#

B#16#0000_000 0 -32767

B#16#FFFF_FFF F +32768

INT

16 Bit

DINT

32 Bit

L#

L# -2147483647 1.175495e+38

L# +2147483648 3.402823e+38
November 21, 2013

Real
SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved

32 Bit

0.000000e+000
4/9

SIEMENS Integer (INT, 16-Bit Integer)

DEC: + 813
DEC: - 813
Value Range Arithmetic Operations

BIN.: 2# BIN.: 2#

0 0 0 0 0 0 1 1 0 0 1 0 1 1 0 1 1 1 1 1 1 1 0 0 1 1 0 1 0 0 1 1

-32768 to +32767 (without sign: 0 to 65535) such as + I, * I, <I, ==I

Double Integer (DINT, 32-Bit Integer) DEC: L# +302019 DEC: L# -302019


Value Range Arithmetic Operations:

BIN.: 2# BIN.: 2#

0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 1 0 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 0 0 1 0 0 0 0 1 1 1 1 0 1

L# -2147483648 to L#+2147483647(without sign: 0 to 4294967295) such as + D, * D, <D, ==D

REAL (Floating-point Number, 32 Bit)


Sign of Real No.
31 30 29

e = Exponent (8 Bit)
28 27 26 25 24 23 22 21 20 19 18 17 16 15

f = Mantissa (23 Bit)


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

0 0 1 1 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Value Range Arithmetic Operations: -1.175495e-38 to 3.402823e+38 such as + R, * R, <R, ==R ,sin, acos, ln, exp, SQR

SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved

5/9

November 21, 2013

S-ar putea să vă placă și