# S7 2 integers to Dint

**URL:** https://discourse.nodered.org/t/s7-2-integers-to-dint/68047
**Category:** Industrial
**Created:** [21 September 2022 20:03 UTC](https://discourse.nodered.org/t/s7-2-integers-to-dint/68047 "2022-09-21T20:03:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![KarolisL](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@KarolisL](https://discourse.nodered.org/u/KarolisL)
#### Post date: [21 September 2022 20:03 UTC](https://discourse.nodered.org/t/s7-2-integers-to-dint/68047/1 "2022-09-21T20:03:24Z")

</div>

Hello,

I'm trying to understand how S7 node reads variables.  
I read 2 signed integers and try to merge them back to DINT.

Results I get:  
DINT1011103: INT0 15, INT2 28063. 15\*2^16 + 28063 = 1011103 - Looks OK.  
DINT1021103: INT0 15, INT2 -27473.

Based on [https://support.industry.siemens.com/cs/mdm/109054417?c=63679745547&lc=en-CO](https://support.industry.siemens.com/cs/mdm/109054417?c=63679745547&lc=en-CO)  
if I read signed integer 15th bit is reserved for a sign.

1021103 = 983040 + 38063 (In binary 1001 0100 1010 1111)  
Why doesn't S7 node return -5295?

If I read both variables as unsigned integers I receive correct numbers

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [20 November 2022 20:03 UTC](https://discourse.nodered.org/t/s7-2-integers-to-dint/68047/2 "2022-11-20T20:03:40Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
