# Conversion decimal to binary

**URL:** <https://forum.knime.com/t/conversion-decimal-to-binary/61537>\
**Category:** KNIME Analytics Platform\
**Created:** [February 11, 2023, 9:35am UTC](https://forum.knime.com/t/conversion-decimal-to-binary/61537 "2023-02-11T09:35:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris12345](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/c/f0a364/32.png) [@Chris12345](https://forum.knime.com/u/Chris12345)\
**Post date:** [February 11, 2023, 9:35am UTC](https://forum.knime.com/t/conversion-decimal-to-binary/61537/1 "2023-02-11T09:35:14Z")

</div>

Hello,  
I’m looking for a solution to convert decimal values into binary in knime.

I found this thread:

> [@How to convert decimal to binary?](https://forum.knime.com/t/how-to-convert-decimal-to-binary/14685):
>
> Hello any idea how to convert a decimal value to binary? example: in Excel DEC2BIN(156) = 10011100 How to do it with KNIME? Thank you

, which is something like half way for me, as i would like to convert doubles into binary, which is not working with the Java “Integer” input.

Is there somebody how could help me please, so solve this issue?

Thanks a lot  
Chris

---

<div class="post-metadata">

**Author:** ![HansS](https://forum-cdn.knime.com/user_avatar/forum.knime.com/hanss/32/6979_2.png) [@HansS](https://forum.knime.com/u/HansS)\
**Post date:** [February 12, 2023, 9:56am UTC](https://forum.knime.com/t/conversion-decimal-to-binary/61537/2 "2023-02-12T09:56:41Z")

</div>

Hi @Chris12345

This was nice challenge 🙂 I posted my workflow on the hub.  
Because it loops every record, it is not that fast… But I think it works. I checked the resutls on this website [https://www.rapidtables.com/convert/number/decimal-to-binary.html](https://www.rapidtables.com/convert/number/decimal-to-binary.html) . But better see for yourself as well.  
 ![Schermafdruk van 2023-02-12 10-55-57](https://forum-cdn.knime.com/uploads/default/original/3X/8/e/8ea0c844081f00cc2b105d2669e17ec7f13befe6.png)

 ![Schermafdruk van 2023-02-12 10-44-20](https://forum-cdn.knime.com/uploads/default/original/3X/e/e/ee5b4be3b7dcee64ca0b48e397103c3950691490.png)

> **[convert (decimal) to binary – hanss](https://hub.knime.com/hanss/spaces/Public/latest/forum_flows/Convert%20to%20(Decimal)%20Binary~hrHFgcyvlE4DkDOF)**
>
> This worklfow takes a double as input and converts it to a binary representation

gr. Hans

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [February 12, 2023, 7:32pm UTC](https://forum.knime.com/t/conversion-decimal-to-binary/61537/3 "2023-02-12T19:32:56Z")

</div>

@Chris12345 you can try and employ a Python node to convert doubles into binaries (following “IEEE 754 binary representation of floating-point numbers”) - I have employed ChatGPT which took some loops and changes but now the results seem to be good.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/f/a/faa745aa2367d3e92437f24422add30729100c0f.jpeg)

> **[Conversion decimal to binary - using Python nodes and IEEE 754 binary...](https://hub.knime.com/mlauber71/spaces/Forum/latest/2023/kn_forum_61537_decimal_to_binary_conversion_python~Vu6qMHc5iENQ0JVL)**
>
> Conversion decimal to binary - using Python nodes and IEEE 754 binary representation of floating-point numbers

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [February 19, 2023, 7:33pm UTC](https://forum.knime.com/t/conversion-decimal-to-binary/61537/4 "2023-02-19T19:33:49Z")

</div>

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