# How do I convert a file to unsigned?

**URL:** <https://discourse.processing.org/t/how-do-i-convert-a-file-to-unsigned/18663>\
**Category:** Coding Questions\
**Created:** [March 14, 2020, 7:17pm UTC](https://discourse.processing.org/t/how-do-i-convert-a-file-to-unsigned/18663 "2020-03-14T19:17:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yes](https://avatars.discourse-cdn.com/v4/letter/y/ea5d25/32.png) [@yes](https://discourse.processing.org/u/yes)\
**Post date:** [March 14, 2020, 7:17pm UTC](https://discourse.processing.org/t/how-do-i-convert-a-file-to-unsigned/18663/1 "2020-03-14T19:17:16Z")

</div>

I am converting all file bytes to unsigned and put them in an array. How can I do this without errors?  
I have been getting errors when trying to do this.

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [March 15, 2020, 12:13am UTC](https://discourse.processing.org/t/how-do-i-convert-a-file-to-unsigned/18663/2 "2020-03-15T00:13:35Z")

</div>

Please provide more details and code that generates the error.

---

<div class="post-metadata">

**Author:** ![yes](https://avatars.discourse-cdn.com/v4/letter/y/ea5d25/32.png) [@yes](https://discourse.processing.org/u/yes)\
**Post date:** [March 21, 2020, 9:06am UTC](https://discourse.processing.org/t/how-do-i-convert-a-file-to-unsigned/18663/4 "2020-03-21T09:06:44Z")

</div>

I have figured it out myself. I will just use hexadecimal to never get negatives.
