---
title: Byte-Order Utilities
framework: corefoundation
role: collectionGroup
role_heading: API Collection
path: corefoundation/byte-order-utilities
---

# Byte-Order Utilities

## Overview

Overview When handling binary data transmitted or shared across platforms, you need be concerned with how each platform stores numerical values. A platform stores values either in big-endian or little-endian format. On big-endian machines, such as PowerPC machines, values are stored with the most-significant bytes first in memory; on little-endian machines, such as Pentium machines, values are stored with the least-significant bytes first. A multibyte value transmitted to a platform with a different format will be misinterpreted if it is not converted properly by one of the computers. You identify the native format of the current platform using the CFByteOrderGetCurrent() function. Use functions such as CFSwapInt32BigToHost(_:) and CFConvertFloat32HostToSwapped(_:) to convert values between different byte order formats.

## Topics

### Core Foundation Byte Order Utilities Miscellaneous Functions

- [CFByteOrderGetCurrent()](corefoundation/cfbyteordergetcurrent().md)
- [CFConvertDoubleHostToSwapped(_:)](corefoundation/cfconvertdoublehosttoswapped(_:).md)
- [CFConvertDoubleSwappedToHost(_:)](corefoundation/cfconvertdoubleswappedtohost(_:).md)
- [CFConvertFloat32HostToSwapped(_:)](corefoundation/cfconvertfloat32hosttoswapped(_:).md)
- [CFConvertFloat32SwappedToHost(_:)](corefoundation/cfconvertfloat32swappedtohost(_:).md)
- [CFConvertFloat64HostToSwapped(_:)](corefoundation/cfconvertfloat64hosttoswapped(_:).md)
- [CFConvertFloat64SwappedToHost(_:)](corefoundation/cfconvertfloat64swappedtohost(_:).md)
- [CFConvertFloatHostToSwapped(_:)](corefoundation/cfconvertfloathosttoswapped(_:).md)
- [CFConvertFloatSwappedToHost(_:)](corefoundation/cfconvertfloatswappedtohost(_:).md)
- [CFSwapInt16(_:)](corefoundation/cfswapint16(_:).md)
- [CFSwapInt16BigToHost(_:)](corefoundation/cfswapint16bigtohost(_:).md)
- [CFSwapInt16HostToBig(_:)](corefoundation/cfswapint16hosttobig(_:).md)
- [CFSwapInt16HostToLittle(_:)](corefoundation/cfswapint16hosttolittle(_:).md)
- [CFSwapInt16LittleToHost(_:)](corefoundation/cfswapint16littletohost(_:).md)
- [CFSwapInt32(_:)](corefoundation/cfswapint32(_:).md)
- [CFSwapInt32BigToHost(_:)](corefoundation/cfswapint32bigtohost(_:).md)
- [CFSwapInt32HostToBig(_:)](corefoundation/cfswapint32hosttobig(_:).md)
- [CFSwapInt32HostToLittle(_:)](corefoundation/cfswapint32hosttolittle(_:).md)
- [CFSwapInt32LittleToHost(_:)](corefoundation/cfswapint32littletohost(_:).md)
- [CFSwapInt64(_:)](corefoundation/cfswapint64(_:).md)
- [CFSwapInt64BigToHost(_:)](corefoundation/cfswapint64bigtohost(_:).md)
- [CFSwapInt64HostToBig(_:)](corefoundation/cfswapint64hosttobig(_:).md)
- [CFSwapInt64HostToLittle(_:)](corefoundation/cfswapint64hosttolittle(_:).md)
- [CFSwapInt64LittleToHost(_:)](corefoundation/cfswapint64littletohost(_:).md)

### Data Types

- [CFSwappedFloat32](corefoundation/cfswappedfloat32.md)
- [CFSwappedFloat64](corefoundation/cfswappedfloat64.md)

### Constants

- [CFByteOrder](corefoundation/cfbyteorder.md)

## See Also

### Related Documentation

- [Memory Management Programming Guide for Core Foundation](apple-archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt.md)

### Utilities

- [Base Utilities](corefoundation/base-utilities.md)
- [Core Foundation URL Access Utilities](corefoundation/core-foundation-url-access-utilities.md)
- [Preferences Utilities](corefoundation/preferences-utilities.md)
- [Socket Name Server Utilities](corefoundation/socket-name-server-utilities.md)
- [Time Utilities](corefoundation/time-utilities.md)
