# toUnsignedInt() and toUnsignedLong() extension functions for Byte and Int

**URL:** <https://discuss.kotlinlang.org/t/tounsignedint-and-tounsignedlong-extension-functions-for-byte-and-int/1356>\
**Category:** Libraries\
**Created:** [December 12, 2015, 3:23pm UTC](https://discuss.kotlinlang.org/t/tounsignedint-and-tounsignedlong-extension-functions-for-byte-and-int/1356 "2015-12-12T15:23:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![m.h.shams](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/m.h.shams/32/1482_2.png) [@m.h.shams](https://discuss.kotlinlang.org/u/m.h.shams)\
**Post date:** [December 12, 2015, 3:23pm UTC](https://discuss.kotlinlang.org/t/tounsignedint-and-tounsignedlong-extension-functions-for-byte-and-int/1356/1 "2015-12-12T15:23:19Z")

</div>

Hi,

```
Byte.toUnsignedInt()
Byte.toUnsignedLong()

Int.toUnsignedLong()

```

Above functions are available in java 8 and would be nice to see them in Kotlin too.  
They are quite handy when one wants to read the value without considering the sign byte.

---

<div class="post-metadata">

**Author:** ![ilya.gorbunov](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/ilya.gorbunov/32/1645_2.png) [@ilya.gorbunov](https://discuss.kotlinlang.org/u/ilya.gorbunov)\
**Post date:** [December 22, 2015, 6:33pm UTC](https://discuss.kotlinlang.org/t/tounsignedint-and-tounsignedlong-extension-functions-for-byte-and-int/1356/2 "2015-12-22T18:33:49Z")

</div>

Thank you for suggestion, I’ve filed an issue [https://youtrack.jetbrains.com/issue/KT-10477](https://youtrack.jetbrains.com/issue/KT-10477)
