<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/endianness-explained-s7ezx634w" -->

---
title: Endianness Explained | daily.dev
description: Using a story about a junior engineer confused by reversed bytes in a hex-dumped file, this explains endianness: how multi-byte values are ordered in memory....
canonical: https://daily.dev/posts/endianness-explained-s7ezx634w
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Endianness Explained | daily.dev
og:description: Using a story about a junior engineer confused by reversed bytes in a hex-dumped file, this explains endianness: how multi-byte values are ordered in memory....
og:url: https://daily.dev/posts/endianness-explained-s7ezx634w
og:image: https://api.daily.dev/og/posts/S7eZx634w.png
og:image:alt: Endianness Explained
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Endianness Explained

**[BitLemon](https://daily.dev/sources/bitlemon)** · 8 min read · 1 upvotes · 0 comments

## Summary

Using a story about a junior engineer confused by reversed bytes in a hex-dumped file, this explains endianness: how multi-byte values are ordered in memory. Little-endian (used by x86 and most ARM) stores the least significant byte first, which looks reversed to humans but has no real modern performance benefit beyond backward compatibility to 1970s microprocessors. Big-endian stores the most significant byte first and matches human left-to-right reading. Network protocols standardize on big-endian ('network byte order') so machines with different internal conventions can exchange data correctly, converting on send and receive.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=6g5pL1ilHgI>

## Questions this post answers

### Why do the bytes in a file look reversed when I view them in a hex editor compared to what my program produced?

Most desktop, laptop, and phone processors (x86 and most ARM chips) use little-endian byte order, storing the least significant byte at the lowest memory address. When you view raw bytes in a hex editor, they appear reversed from how humans normally write numbers left-to-right with the most significant digit first, even though the value itself is correct.

_daily.dev surfaces explainers like this for developers debugging byte-order mysteries in memory dumps or binary files._

### Why is little-endian still used by most modern processors if it has no real technical benefit?

Little-endian persists mainly due to backward compatibility dating back to early microprocessors from the 1970s. It offered minor benefits for narrowing conversions and low-level arithmetic on old hardware, but modern hardware and compilers gain virtually nothing from it, while it remains harder for engineers to read raw memory intuitively.

_Engineers weighing legacy conventions against modern tooling track deep dives like this via daily.dev._

### What byte order do network protocols use when sender and receiver machines have different endianness?

Network protocols use a single agreed-upon byte order called network byte order, which is always big-endian. The sending machine converts its data to big-endian before transmission, and the receiving machine converts it back to its own native endianness, ensuring correct interpretation regardless of each machine's internal convention.

_Developers debugging cross-machine data transfer issues rely on daily.dev to find clear technical breakdowns like this._

## Similar posts on daily.dev

- [Big-Endian Testing with QEMU](https://daily.dev/posts/big-endian-testing-with-qemu-roxl4rji9) · Hacker News · 0 upvotes · 0 comments
- [Converting Byte Array to Short Array and Vice-Versa in Java](https://daily.dev/posts/converting-byte-array-to-short-array-and-vice-versa-in-java-pnoicp6d2) · Baeldung · 2 upvotes · 0 comments
- [ntoh\*/hton\* is a bad API](https://daily.dev/posts/ntoh-hton-is-a-bad-api-kaurheq19) · Lobsters · 0 upvotes · 0 comments
- [Memory ordering in CPUs](https://daily.dev/posts/memory-ordering-in-cpus-ynhh3zoic) · Ryg blog · 0 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#networking](https://daily.dev/tags/networking)

[View this post on daily.dev](https://daily.dev/posts/endianness-explained-s7ezx634w)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Endianness Explained","url":"https://daily.dev/posts/endianness-explained-s7ezx634w","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/endianness-explained-s7ezx634w"},"datePublished":"2026-09-08T20:33:48.492Z","dateModified":"2026-09-14T09:00:28.057Z","description":"Using a story about a junior engineer confused by reversed bytes in a hex-dumped file, this explains endianness: how multi-byte values are ordered in memory....","image":"https://i.ytimg.com/vi/6g5pL1ilHgI/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/6g5pL1ilHgI/sddefault.jpg","isAccessibleForFree":true,"articleSection":"BitLemon","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"BitLemon","logo":"https://media.daily.dev/image/upload/s--JYeyktfa--/f_auto/v1739610417/logos/bitlemon","url":"https://daily.dev/sources/bitlemon"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/endianness-explained-s7ezx634w","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,networking","timeRequired":"PT8M","video":{"@type":"VideoObject","name":"Endianness Explained","description":"Using a story about a junior engineer confused by reversed bytes in a hex-dumped file, this explains endianness: how multi-byte values are ordered in memory....","thumbnailUrl":"https://i.ytimg.com/vi/6g5pL1ilHgI/sddefault.jpg","uploadDate":"2026-09-08T20:33:48.492Z","duration":"PT8M","url":"https://api.daily.dev/r/S7eZx634w","embedUrl":"https://www.youtube.com/embed/6g5pL1ilHgI"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"BitLemon","item":"https://daily.dev/sources/bitlemon"},{"@type":"ListItem","position":3,"name":"Endianness Explained"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/endianness-explained-s7ezx634w#faq","mainEntity":[{"@type":"Question","name":"Why do the bytes in a file look reversed when I view them in a hex editor compared to what my program produced?","acceptedAnswer":{"@type":"Answer","text":"Most desktop, laptop, and phone processors (x86 and most ARM chips) use little-endian byte order, storing the least significant byte at the lowest memory address. When you view raw bytes in a hex editor, they appear reversed from how humans normally write numbers left-to-right with the most significant digit first, even though the value itself is correct. daily.dev surfaces explainers like this for developers debugging byte-order mysteries in memory dumps or binary files."}},{"@type":"Question","name":"Why is little-endian still used by most modern processors if it has no real technical benefit?","acceptedAnswer":{"@type":"Answer","text":"Little-endian persists mainly due to backward compatibility dating back to early microprocessors from the 1970s. It offered minor benefits for narrowing conversions and low-level arithmetic on old hardware, but modern hardware and compilers gain virtually nothing from it, while it remains harder for engineers to read raw memory intuitively. Engineers weighing legacy conventions against modern tooling track deep dives like this via daily.dev."}},{"@type":"Question","name":"What byte order do network protocols use when sender and receiver machines have different endianness?","acceptedAnswer":{"@type":"Answer","text":"Network protocols use a single agreed-upon byte order called network byte order, which is always big-endian. The sending machine converts its data to big-endian before transmission, and the receiving machine converts it back to its own native endianness, ensuring correct interpretation regardless of each machine's internal convention. Developers debugging cross-machine data transfer issues rely on daily.dev to find clear technical breakdowns like this."}}]}
```

