# Is it possible to use an Expression to combine 4 bytes to a float?

**URL:** <https://forum.inductiveautomation.com/t/is-it-possible-to-use-an-expression-to-combine-4-bytes-to-a-float/69197>\
**Category:** Ignition\
**Created:** [January 31, 2023, 6:52am UTC](https://forum.inductiveautomation.com/t/is-it-possible-to-use-an-expression-to-combine-4-bytes-to-a-float/69197 "2023-01-31T06:52:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![framebuilder](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@framebuilder](https://forum.inductiveautomation.com/u/framebuilder)\
**Post date:** [January 31, 2023, 6:52am UTC](https://forum.inductiveautomation.com/t/is-it-possible-to-use-an-expression-to-combine-4-bytes-to-a-float/69197/1 "2023-01-31T06:52:30Z")

</div>

Is it possible to use expression language to combine 4 bytes to a float? I realized IEEE 754 won't allow bit shifting and ORing like we do with combining multiple bytes to an integer so I've been using the script below but would really like to have an expression if possible. Anyone have any ideas?

```auto
data = [66, -107, 23, -112]
b = struct.pack('4b', *data)
import struct
num = struct.unpack('f', b)
print num[0]

```

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 31, 2023, 3:35pm UTC](https://forum.inductiveautomation.com/t/is-it-possible-to-use-an-expression-to-combine-4-bytes-to-a-float/69197/2 "2023-01-31T15:35:57Z")

</div>

I think you best you can do is the runScript expression function.
