---
title: Byte Order Utilities
framework: kernel
role: collectionGroup
role_heading: API Collection
path: kernel/libkern/byte_order_utilities
---

# Byte Order Utilities

Convert values between big-endian and little-endian formats.

## Topics

### Byte Order Utilities

- [OSHostByteOrder](kernel/1586855-oshostbyteorder.md)
- [NXHostByteOrder](kernel/1517899-nxhostbyteorder.md)

### Big Endian to Host

- [NXSwapBigDoubleToHost](kernel/1517910-nxswapbigdoubletohost.md)
- [NXSwapBigFloatToHost](kernel/1517904-nxswapbigfloattohost.md)
- [NXSwapBigIntToHost](kernel/1517887-nxswapbiginttohost.md)
- [NXSwapBigLongLongToHost](kernel/1517892-nxswapbiglonglongtohost.md)
- [NXSwapBigLongToHost](kernel/1517901-nxswapbiglongtohost.md)
- [NXSwapBigShortToHost](kernel/1517908-nxswapbigshorttohost.md)

### Host to Big Endian

- [NXSwapHostDoubleToBig](kernel/1517865-nxswaphostdoubletobig.md)
- [NXSwapHostFloatToBig](kernel/1517912-nxswaphostfloattobig.md)
- [NXSwapHostIntToBig](kernel/1517873-nxswaphostinttobig.md)
- [NXSwapHostLongLongToBig](kernel/1517900-nxswaphostlonglongtobig.md)
- [NXSwapHostLongToBig](kernel/1517889-nxswaphostlongtobig.md)
- [NXSwapHostShortToBig](kernel/1517913-nxswaphostshorttobig.md)

### Little Endian to Host

- [NXSwapLittleDoubleToHost](kernel/1517883-nxswaplittledoubletohost.md)
- [NXSwapLittleFloatToHost](kernel/1517860-nxswaplittlefloattohost.md)
- [NXSwapLittleIntToHost](kernel/1517909-nxswaplittleinttohost.md)
- [NXSwapLittleLongLongToHost](kernel/1517857-nxswaplittlelonglongtohost.md)
- [NXSwapLittleLongToHost](kernel/1517881-nxswaplittlelongtohost.md)
- [NXSwapLittleShortToHost](kernel/1517906-nxswaplittleshorttohost.md)

### Host to Little Endian

- [NXSwapHostDoubleToLittle](kernel/1517863-nxswaphostdoubletolittle.md)
- [NXSwapHostFloatToLittle](kernel/1517859-nxswaphostfloattolittle.md)
- [NXSwapHostIntToLittle](kernel/1517861-nxswaphostinttolittle.md)
- [NXSwapHostLongLongToLittle](kernel/1517895-nxswaphostlonglongtolittle.md)
- [NXSwapHostLongToLittle](kernel/1517890-nxswaphostlongtolittle.md)
- [NXSwapHostShortToLittle](kernel/1517891-nxswaphostshorttolittle.md)

### Swaps

- [OSReadSwapInt16](kernel/1390662-osreadswapint16.md)
- [OSReadSwapInt32](kernel/1390664-osreadswapint32.md)
- [OSReadSwapInt64](kernel/1390674-osreadswapint64.md)
- [OSWriteSwapInt16](kernel/1390668-oswriteswapint16.md)
- [OSWriteSwapInt32](kernel/1390672-oswriteswapint32.md)
- [OSWriteSwapInt64](kernel/1390666-oswriteswapint64.md)
- [NXConvertHostDoubleToSwapped](kernel/1517867-nxconverthostdoubletoswapped.md)
- [NXConvertHostFloatToSwapped](kernel/1517871-nxconverthostfloattoswapped.md)
- [NXConvertSwappedDoubleToHost](kernel/1517877-nxconvertswappeddoubletohost.md)
- [NXConvertSwappedFloatToHost](kernel/1517894-nxconvertswappedfloattohost.md)
- [NXSwapDouble](kernel/1517868-nxswapdouble.md)
- [NXSwapFloat](kernel/1517886-nxswapfloat.md)
- [NXSwapInt](kernel/1517897-nxswapint.md)
- [NXSwapLong](kernel/1517902-nxswaplong.md)
- [NXSwapLongLong](kernel/1517879-nxswaplonglong.md)
- [NXSwapShort](kernel/1517905-nxswapshort.md)

## See Also

### Fundamentals

- [Data Types](kernel/libkern/data_types.md)
- [Atomic Operations](kernel/libkern/atomic_operations.md)
