# How the Dec to hex? And the node can show warn or errer information?

**URL:** <https://discourse.nodered.org/t/how-the-dec-to-hex-and-the-node-can-show-warn-or-errer-information/47739>\
**Category:** General\
**Created:** [28 June 2021 09:56 UTC](https://discourse.nodered.org/t/how-the-dec-to-hex-and-the-node-can-show-warn-or-errer-information/47739 "2021-06-28T09:56:39Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 June 2021 08:09 UTC](https://discourse.nodered.org/t/how-the-dec-to-hex-and-the-node-can-show-warn-or-errer-information/47739/21 "2021-06-30T08:09:11Z")

</div>

> [@jlian168](#):
>
> 5000(Dec)=1388(Hex)
> 
> Now is ["1388","13","88"]  
> I hope is [1388,13,88]

What do you want to see in your array for the input 4990?

---

<div class="post-metadata">

**Author:** ![jlian168](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jlian168/32/43737_2.png) [@jlian168](https://discourse.nodered.org/u/jlian168)\
**Post date:** [30 June 2021 08:18 UTC](https://discourse.nodered.org/t/how-the-dec-to-hex-and-the-node-can-show-warn-or-errer-information/47739/22 "2021-06-30T08:18:48Z")

</div>

Dear Colin :

Yeah, sorry All.

Hex is ["1388","13","88"]  
Dec is [5000, 19, 136]

I hope is 5000=[50, 00] in array.  
its one 16bits to two 8bits...  
So what kind of suggest is better?

Thank u.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [30 June 2021 08:33 UTC](https://discourse.nodered.org/t/how-the-dec-to-hex-and-the-node-can-show-warn-or-errer-information/47739/23 "2021-06-30T08:33:32Z")

</div>

Just for info  
`msg.payload = Number("0x"+"138a");`

if you add "0x" to the hex string it can be converted back to a number

---

<div class="post-metadata">

**Author:** ![jlian168](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jlian168/32/43737_2.png) [@jlian168](https://discourse.nodered.org/u/jlian168)\
**Post date:** [30 June 2021 09:01 UTC](https://discourse.nodered.org/t/how-the-dec-to-hex-and-the-node-can-show-warn-or-errer-information/47739/25 "2021-06-30T09:01:34Z")

</div>

Dear E1cid :

ok,

Thank u.

---

<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:** [29 August 2021 09:01 UTC](https://discourse.nodered.org/t/how-the-dec-to-hex-and-the-node-can-show-warn-or-errer-information/47739/26 "2021-08-29T09:01:54Z")

</div>

Closed on 29 August 2021 09:01 UTC

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

[Previous page](https://discourse.nodered.org/t/how-the-dec-to-hex-and-the-node-can-show-warn-or-errer-information/47739.md?page=1)
