toUInt

Converts this Byte value to UInt.

inline fun Byte.toUInt(): UInt(source)
val byteValue: Byte = -5          // example Byte value
val unsignedInt: UInt = byteValue.toUInt()  // convert to UInt

println("Byte: $byteValue  ->  UInt: $unsignedInt")  // prints: Byte: -5  ->  UInt: 4294967291

Source