# I have a question regarding buffers

**URL:** https://discourse.nodered.org/t/i-have-a-question-regarding-buffers/80967
**Category:** General
**Tags:** function-node
**Created:** [1 September 2023 02:24 UTC](https://discourse.nodered.org/t/i-have-a-question-regarding-buffers/80967 "2023-09-01T02:24:14Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Athurian](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Athurian](https://discourse.nodered.org/u/Athurian)
#### Post date: [1 September 2023 02:24 UTC](https://discourse.nodered.org/t/i-have-a-question-regarding-buffers/80967/1 "2023-09-01T02:24:14Z")

</div>

I have a question regarding buffers.  
The buffer appears as shown in the current image.  
The problem arises when the buffer is only one digit.

For example, it comes out in the form of 0x7, but in the case of , it should come out in the form of 0x07.

As you can see in the picture, 0x42 0x7 should be combined to come out in the form of 0x4207, but in NordRed, if you combine the buffers, it comes out in the form of 0x427.

To summarize again:

1. Appears in the form of a 0x42 0x7 buffer
2. Combining the two buffers should result in 0x4207.
3. However, in NodeRed, when combining buffers, it comes out in the form of 0x427.

Is it possible to convert a single-digit buffer to a two-digit format?  
 ![11](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/3/43f5a2fb4c7731bca797028f84e388f672b26a7d.png)

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [1 September 2023 05:16 UTC](https://discourse.nodered.org/t/i-have-a-question-regarding-buffers/80967/2 "2023-09-01T05:16:52Z")

</div>

> [@Athurian](#):
>
> As you can see in the picture, 0x42 0x7 should be combined to come out in the form of 0x4207, but in NordRed, if you combine the buffers, it comes out in the form of 0x427

How did you do the combine?

Ps: are you creating a new contrib node? Or just using node-red? (This forum category is for creating new nodes - just checking)

---

<div class="post-metadata">

### Author: ![Athurian](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Athurian](https://discourse.nodered.org/u/Athurian)
#### Post date: [7 September 2023 05:52 UTC](https://discourse.nodered.org/t/i-have-a-question-regarding-buffers/80967/3 "2023-09-07T05:52:21Z")

</div>

Ah, it's solved. Adding ('hex') solved the problem.

---

<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: [6 November 2023 05:52 UTC](https://discourse.nodered.org/t/i-have-a-question-regarding-buffers/80967/4 "2023-11-06T05:52:54Z")

</div>

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