# Numérotation et ordre des bits

> Chaque bit d’une valeur avec son poids et son numéro en numérotation LSB 0, MSB 0 et base 1, le champ que vous désignez comme bits i à j, la valeur à bits inversés et dans l’ordre où une liaison l’envoie, une suite de bits affichée lue dans l’ordre de son affichage, et une adresse MAC sous forme canonique et à bits inversés, avec les bits I/G et U/L nommés. Structures pour l’état LACP, les indicateurs TCP, les indicateurs DNS, l’octet ToS et l’étiquette 802.1Q.

- Tool: https://ronutz.com/fr/tools/bit-numbering-and-order
- Family: Réseau

---

## Ce que fait l’outil

Chaque bit d’un nombre binaire a un poids, et les documents ne s’accordent pas sur le nom à donner à chacun. Le bit de poids faible (LSB, least significant bit) est celui qui vaut 1, le bit de poids fort (MSB, most significant bit) celui qui vaut le plus, et les trois numérotations en usage comptent depuis des extrémités différentes ou à partir d’un premier numéro différent. La page répond aux questions qui en découlent, en trois modes :

- **Valeur.** Un nombre et sa largeur : chaque bit avec son poids et son numéro en numérotation LSB 0, MSB 0 et base 1, les bits à 1 dans chaque numérotation, le nombre de bits à 1 et le bit de parité, le bit à 1 le plus bas et le plus haut, la lecture en complément à deux, la valeur avec ses bits inversés, octet par octet et en entier, les octets permutés, et l’ordre que prennent les bits sur une liaison qui envoie le bit de poids faible en premier et sur une liaison qui envoie le bit de poids fort en premier. En option, une structure connue nomme chaque champ, et « bits i à j » dans n’importe quelle numérotation donne le masque, le décalage et la valeur du champ.
- **Bits affichés.** Une suite de 0 et de 1 telle qu’un équipement l’a affichée, avec l’ordre dans lequel elle a été affichée : la valeur qu’elle représente, et la valeur que donne la même suite lue dans l’autre sens.
- **Adresse MAC.** Une adresse MAC (Media Access Control) de 48 bits écrite sous forme canonique ou à bits inversés : les deux formes, les bits I/G (individual/group, individuel/groupe) et U/L (universal/local, universel/local), le quadrant d’une adresse locale selon le Structured Local Address Plan (SLAP), et les 48 bits dans l’ordre où une liaison Ethernet les envoie.

Tout est calculé dans votre navigateur.

## Les trois numérotations

- **LSB 0** : le bit 0 est le bit de poids faible, et le bit k vaut donc 2 puissance k. Le manuel d’Intel le résume ainsi : « Bit positions are numbered from right to left. The numerical value of a set bit is equal to two raised to the power of the bit position » ([Intel SDM volume 1](https://cdrdv2-public.intel.com/825744/253665-sdm-vol-1.pdf), 1.3.1). Le noyau Linux écrit ses masques de la même façon, `BIT(nr)` comme `1 << nr` et `GENMASK(h, l)` comme « a contiguous bitmask starting at bit position @l and ending at position @h » ([include/linux/bits.h](https://raw.githubusercontent.com/torvalds/linux/master/include/linux/bits.h)).
- **MSB 0** : le bit 0 est le bit de poids fort. Tous les diagrammes des RFC (Request for Comments) l’emploient, « the bit labeled 0 is the most significant bit », si bien que l’octet dessiné `1 0 1 0 1 0 1 0` vaut 170 ([RFC 791](https://www.rfc-editor.org/rfc/rfc791.txt), annexe B). La z/Architecture d’IBM numérote aussi ses registres de cette façon : en mode d’adressage 24 bits, « bits 0-39 of the intermediate value are ignored » ([IBM SA22-7832-13](https://publibfi.dhe.ibm.com/epubs/pdf/a227832d.pdf)).
- **Base 1** : le bit 1 est le bit de poids faible. Le protocole SNMP (Simple Network Management Protocol) place une valeur BITS dans les « bits 8 (high order bit) to 1 (low order bit) » de chaque octet ([RFC 3417](https://www.rfc-editor.org/rfc/rfc3417.txt), section 8), et la commande `display eth-trunk` de Huawei documente son PortState LACP de Bit 1 à Bit 8 ([Huawei, Link Aggregation Commands](https://support.huawei.com/enterprise/en/doc/EDOC1100514211/54c5f31b/link-aggregation-commands)).

Sur une largeur de w bits, le bit k en LSB 0 est le bit w − 1 − k en MSB 0 et le bit k + 1 en base 1. La page affiche les trois numéros pour chaque bit : un numéro lu dans un document se retrouve ainsi dans un autre.

## Valeur : les entrées

- **Valeur** : en hexadécimal avec `0x` (`0x3D`), en binaire avec `0b` (`0b0011_1101`), ou en chiffres décimaux (`61`) ; des espaces simples ou des traits de soulignement peuvent séparer des groupes de chiffres. Un signe moins devant un nombre décimal donne ses bits en complément à deux. Une suite de chiffres hexadécimaux sans `0x` est refusée avec une indication : `10` n’est donc jamais lu en silence comme dix ou comme seize.
- **Largeur** : de 1 à 64 bits. Laissée vide, elle découle de l’entrée : quatre bits par chiffre hexadécimal et un par chiffre binaire, zéros de tête compris (`0x0800` fait donc 16 bits), ou la plus petite largeur parmi 8, 16, 32 et 64 qui contient une valeur décimale.
- **Structure** (facultative), pour une valeur de la largeur de la structure :
  - **État LACP** (8 bits) : l’octet Actor_State ou Partner_State du protocole LACP (Link Aggregation Control Protocol). La norme 802.1AX de l’IEEE (Institute of Electrical and Electronics Engineers) numérote les bits de 0 (LACP_Activity) à 7 (Expired) ([IEEE8023-LAG-MIB](https://www.ieee802.org/1/files/public/MIBs/IEEE8021-AX-MIB-202005290000Z.mib)), les masques du pilote Linux vont de `0x1` à `0x80` ([if_bonding.h](https://raw.githubusercontent.com/torvalds/linux/master/include/uapi/linux/if_bonding.h)), et Huawei affiche les mêmes bits de Bit 1 à Bit 8.
  - **Premier octet MAC** (8 bits) : le bit de poids faible du premier octet est le bit I/G et le bit immédiatement supérieur le bit U/L (« The least significant bit of Octet 0 (the I/G bit) » et « the second least significant bit of Octet 0 (the U/L bit) », [IEEE RA guidelines](https://standards-support.ieee.org/hc/en-us/articles/4888705676564-Guidelines-for-Use-of-Extended-Unique-Identifier-EUI-Organizationally-Unique-Identifier-OUI-and-Company-ID-CID)), avec les bits Y et Z que la [RFC 9542](https://www.rfc-editor.org/rfc/rfc9542.txt) dessine au-dessus (section 2.1).
  - **Indicateurs TCP** (8 bits) : le quatorzième octet de l’en-tête, CWR, ECE, URG, ACK, PSH, RST, SYN, FIN ([RFC 9293](https://www.rfc-editor.org/rfc/rfc9293.txt), section 3.1). L’IANA (Internet Assigned Numbers Authority) les numérote de 8 à 15 dans son registre TCP Header Flags ([IANA](https://www.iana.org/assignments/tcp-parameters/tcp-parameters.xml)), Linux de `BIT(7)` à `BIT(0)` ([include/net/tcp.h](https://raw.githubusercontent.com/torvalds/linux/master/include/net/tcp.h)).
  - **Indicateurs DNS** (16 bits) : le deuxième mot de l’en-tête DNS (Domain Name System), QR, Opcode, AA, TC, RD, RA, Z, AD, CD et RCODE tels que les dessinent la [RFC 1035](https://www.rfc-editor.org/rfc/rfc1035.txt) (section 4.1.1) et la [RFC 6895](https://www.rfc-editor.org/rfc/rfc6895.txt) (section 2) ; le registre DNS Header Flags de l’IANA numérote de AA, bit 5, à CD, bit 11 ([IANA](https://www.iana.org/assignments/dns-parameters/dns-parameters.xml)).
  - **ToS IPv4** (8 bits) : l’octet Type of Service, le champ Traffic Class d’IPv6 : le DSCP (differentiated services codepoint) dans les bits 0 à 5 ([RFC 2474](https://www.rfc-editor.org/rfc/rfc2474.txt), section 3) et l’ECN (Explicit Congestion Notification) dans les « Bits 6 and 7 » ([RFC 3168](https://www.rfc-editor.org/rfc/rfc3168.txt), section 5), avec le nom du codepoint ECN.
  - **TCI 802.1Q** (16 bits) : la priorité de l’étiquette, son DEI (Drop Eligible Indicator) et son identifiant de VLAN (virtual local area network, réseau local virtuel), avec les masques du noyau Linux `0xe000` (décalage 13), `0x1000` et `0x0fff` ([include/linux/if_vlan.h](https://raw.githubusercontent.com/torvalds/linux/master/include/linux/if_vlan.h)).
- **Bits i à j** (facultatif) : une numérotation et un ou deux numéros de bit. Le masque, le décalage et la valeur du champ, l’expression C `(v >> shift) & mask` et le `GENMASK(hi, lo)` du noyau (ou `BIT(n)` pour un seul bit), ainsi que les mêmes bits dans les deux autres numérotations.

## Valeur : les règles

- **Complément à deux.** La valeur lue comme un nombre signé est négative quand son bit le plus haut est à 1 ; pour 8, 16, 32 et 64 bits, la phrase d’Intel s’applique : « The sign bit is located in bit 7 in a byte integer, bit 15 in a word integer, bit 31 in a doubleword integer, and bit 63 in a quadword integer » (Intel SDM, 4.2.1.2).
- **Bit à 1 le plus bas et le plus haut.** En numérotation LSB 0, ce que renvoient les instructions BSF et BSR d’Intel : « the offset from the least significant bit (bit 0) in the bit string to the first set bit » (7.3.7.2).
- **Parité.** La parité paire ajoute le bit qui rend pair le nombre de uns logiques dans les données et le bit de parité (« an even number of logic 1s in the data and parity bits »), la parité impaire celui qui le rend impair ([TI TL16C550D](https://www.ti.com/lit/ds/symlink/tl16c550d.pdf), bit 4 du registre de contrôle de ligne).
- **Inversion.** « Tous les bits inversés » inverse l’ordre des bits sur toute la largeur ; « Bits inversés dans chaque octet » inverse chaque octet sur place, la permutation que la [RFC 2469](https://www.rfc-editor.org/rfc/rfc2469.txt) décrit entre adresses canoniques et adresses Token Ring ; « Octets permutés » relève de l’ordre des octets, qu’explique [Big-endian et little-endian](https://ronutz.com/fr/learn/big-endian-and-little-endian). Inverser toute la largeur revient à combiner les deux autres. Le CRC-32 du noyau Linux, un contrôle de redondance cyclique (CRC, cyclic redundancy check), illustre une inversion : le même polynôme s’écrit `0x04c11db7` bit de poids fort en premier et `0xedb88320` bit de poids faible en premier ([include/linux/crc32.h](https://raw.githubusercontent.com/torvalds/linux/master/include/linux/crc32.h)).
- **Sur le fil.** Pour des octets entiers, les bits dans l’ordre où une liaison les envoie, octet par octet, les octets dans l’ordre d’écriture (octet de poids fort en premier, comme l’ordre réseau transmet un nombre, RFC 791). Le bit de poids faible en premier est l’ordre d’Ethernet, l’inverse de ce que dessine l’IETF (Internet Engineering Task Force) : « the physical order of bit transmission within an octet on an IEEE [802.3] link is from the lowest order bit to the highest order bit (i.e., the reverse of the IETF's ordering) » (RFC 9542, section 1.1) ; un UART (universal asynchronous receiver-transmitter) fait de même, « Bit 0 is the least significant bit. It is the first bit serially transmitted or received » (TI TL16C550D), tout comme le protocole PPP (Point-to-Point Protocol) : « All octets are transmitted least significant bit first » ([RFC 1662](https://www.rfc-editor.org/rfc/rfc1662.txt), sections 4.5.2 et 5.5). Le bit de poids fort en premier est la règle d’un bus I2C, « Data is transferred with the Most Significant Bit (MSB) first » ([NXP UM10204](https://www.nxp.com/docs/en/user-guide/UM10204.pdf), 3.1.5), et le comportement par défaut d’un bus SPI (Serial Peripheral Interface), « the 'MSB first' default for each word in a transfer », qu’un périphérique peut modifier avec `SPI_LSB_FIRST` ([include/linux/spi/spi.h](https://raw.githubusercontent.com/torvalds/linux/master/include/linux/spi/spi.h)).

## Bits affichés

Saisissez les bits dans l’ordre où ils sont affichés et indiquez quelle extrémité vient en premier. **Bit de poids fort en premier** est l’ordre d’écriture habituel des nombres. **Bit de poids faible en premier** est la façon dont Huawei affiche un PortState LACP : sa référence de commandes décrit la variable d’état sur huit bits (« The status variable is eight bits, such as 10111100 ») comme allant de Bit 1 à Bit 8, dans l’ordre des bits 0 à 7 de 802.1AX ; son premier caractère est donc LACP_Activity, le bit de poids 1, et `10111100` est l’octet 0x3D (Huawei, tableau 5-17). Lue dans l’autre sens, la même suite vaudrait 0xBC, et la page affiche les deux, car un ordre mal lu change le nombre sans provoquer la moindre erreur. La lecture complète de la valeur suit, avec la structure État LACP si vous la choisissez.

## Adresse MAC

- **Forme canonique** : la façon dont la [RFC 2469](https://www.rfc-editor.org/rfc/rfc2469.txt) définit une adresse pour l’affichage, où le premier bit de chaque octet vu sur le LAN correspond au bit de poids faible, le plus à droite, de chaque octet en mémoire (« The first bit of each byte that appears on the LAN maps to the least significant (i.e., right-most) bit of each byte in memory »), ce qui place l’indicateur d’adresse de groupe dans le bit de poids faible du premier octet (« puts the group address indicator ... in the least significant bit of the first byte »). Le matériel Ethernet fonctionne ainsi.
- **Forme à bits inversés** (« MSB format », « non-canonical form ») : la façon dont Token Ring et certains adaptateurs FDDI (Fiber Distributed Data Interface) stockaient les adresses, chaque octet ayant ses bits inversés, si bien que 12-34-56-78-9A-BC se trouvait en mémoire sous la forme 48-2C-6A-1E-59-3D. Choisissez la forme dans laquelle l’adresse a été écrite ; la page donne l’autre.
- **I/G et U/L.** D’après le premier octet canonique : I/G vaut 0 pour une station, 1 pour un groupe (multicast ou diffusion) ; U/L vaut 0 pour une adresse sous un préfixe attribué par l’IEEE, 1 pour une adresse locale (IEEE RA guidelines ; RFC 9542). Le noyau Linux les teste avec `0x01 & addr[0]` et `0x02 & addr[0]` ([include/linux/etherdevice.h](https://raw.githubusercontent.com/torvalds/linux/master/include/linux/etherdevice.h)).
- **Quadrant SLAP.** Pour une adresse locale, les bits Y et Z désignent l’un des quatre quadrants : Administratively Assigned (Y 0, Z 0), Extended Local (Y 0, Z 1), Reserved (Y 1, Z 0) et Standard Assigned (Y 1, Z 1) (RFC 9542, section 2.1.1, tableau 2) ; le plan est facultatif.
- **Sur le fil.** Les 48 bits octet par octet, chacun bit de poids faible en premier : le premier bit envoyé est donc le bit I/G.
- **La ligne de lecture erronée** montre ce que conclurait sur I/G et U/L une personne qui prendrait la forme à bits inversés pour la forme canonique. La RFC 2469 en consigne la conséquence pratique : les ponts entre Token Ring et Ethernet devaient inverser les bits des adresses contenues dans les paquets ARP (Address Resolution Protocol), « perform bit swaps of the addresses in the address fields of ARP packets » (section 3.2).

## Ce que l’outil refuse, et pourquoi

Un champ de plus de 80 caractères ; un champ vide ; de l’hexadécimal sans `0x` (avec une indication), un préfixe qui n’est pas suivi de ses chiffres, de l’octal, une adresse MAC en mode valeur (l’outil renvoie vers le mode MAC) ; une valeur de plus de 64 bits ; une largeur hors de l’intervalle 1 à 64 ou une valeur qui ne tient pas dans sa largeur (avec le nombre de bits nécessaires), et un décimal négatif hors de la plage du complément à deux de cette largeur ; une structure, une numérotation, un ordre d’affichage ou une forme MAC inconnus ; une structure d’une autre largeur que la valeur (avec la largeur à régler) ; un numéro de bit qui n’est pas un entier ou qui n’existe pas dans la largeur pour la numérotation choisie (avec la plage) ; un dernier bit sans premier bit ; une suite affichée contenant autre chose que des 0, des 1 et des séparateurs simples ; et une adresse MAC qui ne compte pas six octets sous l’une des quatre formes.

## Exemples commentés

- **Les indicateurs de réponse DNS 0x81A0** (l’Exemple, tiré de l’article de la rubrique Apprendre sur l’en-tête DNS) : lus comme indicateurs DNS, QR, RD, RA et AD sont à 1. QR est le bit 0 en MSB 0 et le bit 15 en LSB 0 ; RD, que l’IANA numérote bit 7, est le bit 8 en LSB 0.
- **Le PortState Huawei 10111100** (l’Exemple du mode bits affichés), bit de poids faible en premier : 0x3D, LACP_Activity, Aggregation, Synchronization, Collecting et Distributing à 1 ; lu à tort bit de poids fort en premier, il vaut 0xBC. Les échantillons 10100000 et 10110000 valent 0x05 et 0x0D.
- **Le « 0111101 (binary) » de Cisco** : le document de dépannage EtherChannel de Cisco indique « The expected value for LACP flags is 0x3D (hex) or 0111101 (binary) » ([Cisco, document 220367](https://www.cisco.com/c/en/us/support/docs/switches/catalyst-9300-series-switches/220367-troubleshoot-etherchannels-on-catalyst-9.html)). Saisis sous la forme `0b0111101`, ces sept chiffres forment une valeur de 7 bits, que la structure LACP de 8 bits refuse ; avec la largeur réglée à 8, le zéro de tête omis réapparaît et la valeur est 0x3D, le même octet que Huawei affiche 10111100.
- **L’adresse de la RFC 2469** (l’Exemple du mode MAC) : 12-34-56-78-9A-BC est locale (U/L 1) et individuelle, Administratively Assigned selon le SLAP, et s’écrit 48-2C-6A-1E-59-3D à bits inversés ; lue comme canonique, cette forme inversée paraîtrait universelle.
- **Le DSCP d’un ToS 0xB8** : les bits 0 à 5 en MSB 0 sont les bits 7 à 2 en LSB 0, `GENMASK(7, 2)`, masque 0xFC, décalage 2, valeur 46.
- **Le polynôme CRC-32 0x04C11DB7**, bits inversés, donne 0xEDB88320, les deux formes du même polynôme dans le noyau ; la constante FCS-16 0x8408 de la RFC 1662, inversée, donne 0x1021.

## Ce que l’outil ne fait pas

Il lit les valeurs et les adresses que vous saisissez ; il ne capture pas de trafic et ne communique avec aucun équipement. Il ne calcule ni sommes de contrôle ni CRC, ne convertit pas l’ordre des octets au-delà de l’affichage des octets permutés, ne décode pas d’en-têtes complets (le [décodeur d’étiquettes 802.1Q](https://ronutz.com/fr/tools/vlan-tag-and-trunk-calculator), le [lecteur des liens membres et de l’état LACP](https://ronutz.com/fr/tools/lacp-hash-and-state-reader) et les outils DNS s’en chargent) et ne donne pas le constructeur d’une adresse MAC (la [recherche d’OUI](https://ronutz.com/fr/tools/oui-lookup) s’en charge).

## Partage des résultats

Sous l’intitulé du résultat, le bouton **Partager les résultats** crée, seulement quand vous appuyez dessus, un lien vers cette page qui contient, après le `#`, le champ tel que saisi et les réglages propres au mode : toujours `input` et `mode` (`value`, `printed` ou `mac`) ; en mode valeur, `width` si elle est saisie, `layout` si une structure est choisie, et `numbering`, `from` et `to` (s’ils sont saisis) pour un champ ; en mode bits affichés, `order`, `layout` et le champ comme en mode valeur ; en mode MAC, `form`. Les réglages des autres modes ne sont pas transmis.

La [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986.txt) (section 3.5, consultée le 08/11/2026) précise que le fragment est séparé du reste de l’URI avant tout déréférencement (« separated from the rest of the URI prior to a dereference ») : ces valeurs ne sont donc pas envoyées au serveur à l’ouverture du lien ; elles restent dans la barre d’adresse et l’historique de la personne qui l’ouvre, et quiconque possède le lien peut les lire.

- **Longueur.** Un lien contient au plus 16 384 caractères, la limite que le site applique à toute valeur placée après le `#` ; ces champs sont bien plus courts.
- **Ouverture d’un lien.** Le mode et ses réglages sont appliqués comme le ferait une saisie, les autres modes conservent leurs valeurs, et la page calcule. Un lien est ignoré s’il comporte un mode, une structure, un ordre, une forme ou une numérotation inconnus, un réglage d’un autre mode, une largeur ou un numéro de bit qui n’a pas un à trois chiffres, un `to` sans `from`, une numérotation sans `from`, ou un champ de plus d’une ligne ou de plus de 80 caractères. Que le lien soit accepté ou non, les valeurs quittent ensuite aussitôt l’adresse de la page elle-même, sans aucune requête : un rechargement, un favori ou le bouton Partager de la page n’emporte donc rien que vous n’ayez choisi de partager.

## Provenance

Le moteur se limite à une arithmétique de bits fixe sur des valeurs BigInt, sans horloge, sans réseau et sans aléa. Ses vecteurs de référence (golden vectors, ensemble `bit-numbering-and-order-golden-2026-11-08`) fixent les 256 octets en mode valeur et en bits affichés bit de poids faible en premier, les largeurs de 1 à 64 (tous les bits à 1, puis le bit le plus haut seul), la déduction de la largeur à partir de l’hexadécimal, du binaire et du décimal, les décimaux négatifs, chaque structure sur plusieurs valeurs, des champs dans les trois numérotations, dont l’exemple `GENMASK_ULL(39, 21)` du noyau lui-même, des suites affichées dans les deux ordres avec séparateurs, des adresses MAC sous toutes les formes et dans tous les quadrants SLAP, les Exemples et les échantillons, les phrases qui portent les règles, les textes de l’API et les refus. Chaque valeur attendue a été calculée par un modèle Python distinct, écrit à partir des documents (bits sous forme de texte, positions comme indices de chaîne, inversion par inversion du texte, octets par `int.to_bytes`), et non en exécutant ce moteur.

## API

Le même moteur répond à `/api/v1/bit-numbering-and-order` sur l’API HTTP du site ; le contrat figure sur la [page API](https://ronutz.com/fr/api), qui indique aussi si ce site sert l’API.

- **Requête.** Un objet JSON. Valeur : `{"mode": "value", "input": "0x81A0", "width": 16, "layout": "dns-flags", "numbering": "msb0", "from": 1, "to": 4}` ; `width`, `layout`, `numbering`, `from` et `to` sont facultatifs. Bits affichés : `{"mode": "printed", "input": "10111100", "order": "lsb-first", "layout": "lacp"}` ; `order` (`msb-first` par défaut) et le reste sont facultatifs. MAC : `{"mode": "mac", "input": "48-2C-6A-1E-59-3D", "form": "reversed"}` ; `form` (`canonical` par défaut) est facultatif.
- **Réponse, valeur et bits affichés.** `mode`, `width`, `widthInferred`, `hex`, `decimal`, `signed`, `binary`, `binaryLsbFirst`, `octets`, `bits` (chacun avec `lsb0`, `msb0`, `one`, `weight`, `set`), `setBits` (`lsb0`, `msb0`, `one`), `ones`, `parityEven`, `parityOdd`, `lowestSet`, `highestSet`, `reversed`, `reversedPerOctet`, `byteSwapped`, `wire` (`lsbFirst`, `msbFirst`), `printed` (`order`, `typed`, `otherHex`, `otherDecimal`, ou null), `layout` (`id`, `width`, `fields`, `numberingNote`, ou null), `field` (`numbering`, `from`, `to`, `lsb0Hi`, `lsb0Lo`, `msb0From`, `msb0To`, `oneHi`, `oneLo`, `span`, `mask`, `shift`, `value`, `valueHex`, `bits`, `expression`, `kernel`, ou null) et `notes`.
- **Réponse, MAC.** `mode`, `form`, `formDefault`, `canonical`, `canonicalColon`, `reversed`, `firstOctetBits`, `group`, `local`, `broadcast`, `slap` (`y`, `z`, `quadrant`, `name`, ou null), `wire`, `firstBitOnWire`, `reversedMisread` (`group`, `local`) et `notes`.
- **Erreurs.** HTTP 400, `invalid_input`, avec le message du moteur, par exemple `"3D" looks hexadecimal: write it with 0x in front (0x3D), so it is not read as decimal.`.

## Sources

- [Intel 64 and IA-32 Architectures Software Developer's Manual, volume 1, 253665-084US, juin 2024](https://cdrdv2-public.intel.com/825744/253665-sdm-vol-1.pdf) (consulté le 08/11/2026) : 1.3.1, 4.2.1.2, 7.3.7
- [IBM z/Architecture Principles of Operation, SA22-7832-13, mai 2022](https://publibfi.dhe.ibm.com/epubs/pdf/a227832d.pdf) (consulté le 08/11/2026) : chapitre 3
- [RFC 791, Internet Protocol](https://www.rfc-editor.org/rfc/rfc791.txt) (STD 5, consultée le 08/11/2026) : annexe B
- [RFC 1035, Domain Names: Implementation and Specification](https://www.rfc-editor.org/rfc/rfc1035.txt) (STD 13, consultée le 08/11/2026) : sections 2.3.2 et 4.1.1 ; [RFC 6895](https://www.rfc-editor.org/rfc/rfc6895.txt) (BCP 42, consultée le 08/11/2026) : section 2 ; [IANA, DNS Header Flags](https://www.iana.org/assignments/dns-parameters/dns-parameters.xml) (mis à jour le 16/10/2026, consulté le 08/11/2026)
- [RFC 3417, Transport Mappings for SNMP](https://www.rfc-editor.org/rfc/rfc3417.txt) (STD 62, consultée le 08/11/2026) : section 8
- [Huawei, S5700 and S6700 V200R025C00 Command Reference, Link Aggregation Commands](https://support.huawei.com/enterprise/en/doc/EDOC1100514211/54c5f31b/link-aggregation-commands) (consulté dans un navigateur le 08/11/2026, car le site refuse les lectures automatisées) : display eth-trunk, tableau 5-17
- [Cisco, Troubleshoot EtherChannels on Catalyst 9000 Switches, document 220367](https://www.cisco.com/c/en/us/support/docs/switches/catalyst-9300-series-switches/220367-troubleshoot-etherchannels-on-catalyst-9.html) (mis à jour le 8 août 2024 ; consulté dans un navigateur le 08/11/2026, car le site refuse les lectures automatisées) : les indicateurs LACP attendus
- [IEEE8023-LAG-MIB for IEEE 802.1AX-2020](https://www.ieee802.org/1/files/public/MIBs/IEEE8021-AX-MIB-202005290000Z.mib) (consulté le 08/11/2026) et le fichier [include/uapi/linux/if_bonding.h](https://raw.githubusercontent.com/torvalds/linux/master/include/uapi/linux/if_bonding.h) du noyau Linux (consulté le 08/11/2026)
- [RFC 9542, IANA Considerations and IETF Protocol and Documentation Usage for IEEE 802 Parameters](https://www.rfc-editor.org/rfc/rfc9542.txt) (BCP 141, consultée le 08/11/2026) : sections 1.1, 2.1, 2.1.1, 2.1.4 et 2.3.1
- [RFC 2469, A Caution On The Canonical Ordering Of Link-Layer Addresses](https://www.rfc-editor.org/rfc/rfc2469.txt) (Informational, consultée le 08/11/2026) : sections 2 et 3
- [IEEE Registration Authority, Guidelines for Use of EUI, OUI and CID](https://standards-support.ieee.org/hc/en-us/articles/4888705676564-Guidelines-for-Use-of-Extended-Unique-Identifier-EUI-Organizationally-Unique-Identifier-OUI-and-Company-ID-CID) (mis à jour le 1er avril 2022, consulté le 08/11/2026)
- [RFC 1662, PPP in HDLC-like Framing](https://www.rfc-editor.org/rfc/rfc1662.txt) (STD 51, consultée le 08/11/2026) : sections 3.1, 4.5.2, 5.5 et annexe C.1
- [Texas Instruments, TL16C550D](https://www.ti.com/lit/ds/symlink/tl16c550d.pdf) (SLLS597E, consulté le 08/11/2026)
- [NXP Semiconductors, UM10204 I2C-bus specification and user manual, Rev. 7.0, 1er octobre 2021](https://www.nxp.com/docs/en/user-guide/UM10204.pdf) (consulté dans un navigateur le 08/11/2026, car le site refuse les lectures automatisées) : 3.1.5 Byte format, figure 10
- Le code source du noyau Linux, torvalds/linux master (consulté le 08/11/2026) : [include/linux/spi/spi.h](https://raw.githubusercontent.com/torvalds/linux/master/include/linux/spi/spi.h), [include/linux/bits.h](https://raw.githubusercontent.com/torvalds/linux/master/include/linux/bits.h), [include/linux/crc32.h](https://raw.githubusercontent.com/torvalds/linux/master/include/linux/crc32.h), [include/linux/etherdevice.h](https://raw.githubusercontent.com/torvalds/linux/master/include/linux/etherdevice.h), [include/net/tcp.h](https://raw.githubusercontent.com/torvalds/linux/master/include/net/tcp.h) et [include/linux/if_vlan.h](https://raw.githubusercontent.com/torvalds/linux/master/include/linux/if_vlan.h)
- [IANA, TCP Header Flags](https://www.iana.org/assignments/tcp-parameters/tcp-parameters.xml) (mis à jour le 22/10/2026, consulté le 08/11/2026) et [RFC 9293, Transmission Control Protocol](https://www.rfc-editor.org/rfc/rfc9293.txt) (STD 7, consultée le 08/11/2026) : section 3.1
- [RFC 2474, the DS Field](https://www.rfc-editor.org/rfc/rfc2474.txt) (consultée le 08/11/2026) : section 3 ; [RFC 3168, ECN](https://www.rfc-editor.org/rfc/rfc3168.txt) (consultée le 08/11/2026) : section 5
- [RFC 3986, Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986.txt) (STD 66, consultée le 08/11/2026) : section 3.5
- [RFC Editor, RFC index](https://www.rfc-editor.org/rfc-index.xml) (consulté le 08/11/2026) : le statut de chacune des RFC ci-dessus

## Standards and references

- [Intel 64 and IA-32 Architectures Software Developer's Manual, volume 1, 253665-084US, June 2024: 1.3.1 Bit and Byte Order, 4.2.1.2 Signed Integers, 7.3.7 bit test and bit scan instructions](https://cdrdv2-public.intel.com/825744/253665-sdm-vol-1.pdf) - LSB 0: "Bit positions are numbered from right to left. The numerical value of a set bit is equal to two raised to the power of the bit position"; the sign bit in bit 7, 15, 31 or 63; BSF and BSR give "the offset from the least significant bit (bit 0)"
- [IBM z/Architecture Principles of Operation, SA22-7832-13, fourteenth edition, May 2022: chapter 3, information formats and operand addresses](https://publibfi.dhe.ibm.com/epubs/pdf/a227832d.pdf) - MSB 0 in a processor manual: "bits are numbered in a left-to-right sequence", an address's "bits are numbered 0-63", and in 24-bit mode "bits 0-39 of the intermediate value are ignored"
- [RFC 791, Internet Protocol, September 1981 (STD 5): Appendix B, Data Transmission Order](https://www.rfc-editor.org/rfc/rfc791.txt) - "the bit labeled 0 is the most significant bit"; the octet drawn 1 0 1 0 1 0 1 0 is 170; the most significant octet of a multi-octet quantity is transmitted first
- [RFC 1035, Domain Names: Implementation and Specification, November 1987 (STD 13): sections 2.3.2 and 4.1.1](https://www.rfc-editor.org/rfc/rfc1035.txt) - the same transmission-order rule; the header's flags word QR, Opcode, AA, TC, RD, RA, Z and RCODE as drawn
- [RFC 6895, Domain Name System (DNS) IANA Considerations, April 2013 (BCP 42): section 2](https://www.rfc-editor.org/rfc/rfc6895.txt) - the header drawing with AD and CD in the place of RFC 1035's Z bits
- [IANA, Domain Name System (DNS) Parameters, DNS Header Flags (registry updated 2026-10-16)](https://www.iana.org/assignments/dns-parameters/dns-parameters.xml) - AA bit 5, TC bit 6, RD bit 7, RA bit 8, bit 9 reserved, AD bit 10, CD bit 11 of the second 16-bit word (MSB 0)
- [RFC 3417, Transport Mappings for the Simple Network Management Protocol (SNMP), December 2002 (STD 62): section 8](https://www.rfc-editor.org/rfc/rfc3417.txt) - a BITS value is placed in "bits 8 (high order bit) to 1 (low order bit)" of each octet, first named bit first: 1-based numbering from the least significant bit
- [Huawei, S5700 and S6700 V200R025C00 Command Reference, Link Aggregation Commands: display eth-trunk and Table 5-17 PortState (read in a browser on 2026-11-08: the site refuses automated reads)](https://support.huawei.com/enterprise/en/doc/EDOC1100514211/54c5f31b/link-aggregation-commands) - "The status variable is eight bits, such as 10111100", described as Bit 1 to Bit 8 in the order of 802.1AX's bits 0 to 7; the example rows 10111100, 10100000 and 10110000
- [Cisco, Troubleshoot EtherChannels on Catalyst 9000 Switches, document 220367, updated 8 August 2024 (read in a browser on 2026-11-08: the site refuses automated reads)](https://www.cisco.com/c/en/us/support/docs/switches/catalyst-9300-series-switches/220367-troubleshoot-etherchannels-on-catalyst-9.html) - "The expected value for LACP flags is 0x3D (hex) or 0111101 (binary)", seven binary digits as printed (0x3D is 00111101 in 8 bits); its state table labels Expired the most significant bit and LACP Activity the least
- [IEEE 802.1 Working Group, IEEE8023-LAG-MIB (IEEE 802.1AX-2020), revision 2020-05-29: LacpState and dot3adAggPortActorAdminState](https://www.ieee802.org/1/files/public/MIBs/IEEE8021-AX-MIB-202005290000Z.mib) - LacpState BITS lacpActivity(0) to expired(7); "The first bit corresponds to bit 0 of the Actor_State (LACP_Activity)"
- [The Linux kernel source, include/uapi/linux/if_bonding.h (torvalds/linux master): LACP_STATE_* masks](https://raw.githubusercontent.com/torvalds/linux/master/include/uapi/linux/if_bonding.h) - LACP_STATE_LACP_ACTIVITY 0x1 to LACP_STATE_EXPIRED 0x80: 802.1AX's bit k is the bit of weight 2^k
- [RFC 9542, IANA Considerations and IETF Protocol and Documentation Usage for IEEE 802 Parameters, April 2024 (BCP 141): sections 1.1, 2.1, 2.1.1, 2.1.4 and 2.3.1](https://www.rfc-editor.org/rfc/rfc9542.txt) - bit transmission within an octet on an IEEE 802.3 link "from the lowest order bit to the highest order bit (i.e., the reverse of the IETF's ordering)"; the M, X, Y and Z bits of the first octet; the four SLAP quadrants; the documentation and 33-33 addresses of the samples
- [RFC 2469, A Caution On The Canonical Ordering Of Link-Layer Addresses, December 1998 (Informational): sections 2 and 3](https://www.rfc-editor.org/rfc/rfc2469.txt) - canonical form ("LSB format") against Token Ring's "MSB format"; 12-34-56-78-9A-BC held as 48-2C-6A-1E-59-3D; bridges that "perform bit swaps of the addresses" in ARP packets
- [IEEE Registration Authority, Guidelines for Use of Extended Unique Identifier (EUI), Organizationally Unique Identifier (OUI), and Company ID (CID), updated 1 April 2022](https://standards-support.ieee.org/hc/en-us/articles/4888705676564-Guidelines-for-Use-of-Extended-Unique-Identifier-EUI-Organizationally-Unique-Identifier-OUI-and-Company-ID-CID) - "The least significant bit of Octet 0 (the I/G bit)" and "the second least significant bit of Octet 0 (the U/L bit)"; EUI bit ordering, which "applications and protocols must unambiguously specify"
- [The Linux kernel source, include/linux/etherdevice.h (torvalds/linux master): is_multicast_ether_addr and is_local_ether_addr](https://raw.githubusercontent.com/torvalds/linux/master/include/linux/etherdevice.h) - the group test 0x01 & addr[0] and the local test 0x02 & addr[0] on the canonical address in memory
- [RFC 1662, PPP in HDLC-like Framing, July 1994 (STD 51): sections 3.1, 4.5.2, 5.5 and appendix C.1](https://www.rfc-editor.org/rfc/rfc1662.txt) - "All octets are transmitted least significant bit first"; binary numbers written most significant bit first, "contrary to standard ISO and CCITT practice which orders bits as transmitted"; the FCS-16 polynomial constant 0x8408
- [Texas Instruments, TL16C550D Asynchronous Communications Element with Autoflow Control, SLLS597E, revised December 2008](https://www.ti.com/lit/ds/symlink/tl16c550d.pdf) - "Bit 0 is the least significant bit. It is the first bit serially transmitted or received"; even parity is "an even number of logic 1s in the data and parity bits"
- [NXP Semiconductors, UM10204 I2C-bus specification and user manual, Rev. 7.0, 1 October 2021: 3.1.5 Byte format and Figure 10 (read in a browser on 2026-11-08: the site refuses automated reads)](https://www.nxp.com/docs/en/user-guide/UM10204.pdf) - "Data is transferred with the Most Significant Bit (MSB) first"; the first byte after START carries the target address from its most significant bit with the R/W bit as its least significant
- [The Linux kernel source, include/linux/spi/spi.h and include/uapi/linux/spi/spi.h (torvalds/linux master): spi_device mode, SPI_LSB_FIRST](https://raw.githubusercontent.com/torvalds/linux/master/include/linux/spi/spi.h) - the "MSB first" default for each word in a transfer, overridden by SPI_LSB_FIRST ("per-word bits-on-wire")
- [The Linux kernel source, include/vdso/bits.h and include/linux/bits.h (torvalds/linux master): BIT and GENMASK](https://raw.githubusercontent.com/torvalds/linux/master/include/linux/bits.h) - BIT(nr) is (1 << nr); GENMASK(h, l) is "a contiguous bitmask starting at bit position @l and ending at position @h", and GENMASK_ULL(39, 21) is 0x000000ffffe00000
- [The Linux kernel source, include/linux/crc32.h (torvalds/linux master): crc32_le and crc32_be](https://raw.githubusercontent.com/torvalds/linux/master/include/linux/crc32.h) - the same CRC-32 polynomial least-significant-bit-first as 0xedb88320 and most-significant-bit-first as 0x04c11db7: one is the other bit-reversed
- [IANA, Transmission Control Protocol (TCP) Parameters, TCP Header Flags (registry updated 2026-10-22)](https://www.iana.org/assignments/tcp-parameters/tcp-parameters.xml) - AE bit 7, CWR bit 8, ECE 9, URG 10, ACK 11, PSH 12, RST 13, SYN 14, FIN 15
- [The Linux kernel source, include/net/tcp.h (torvalds/linux master): TCPHDR_* flags](https://raw.githubusercontent.com/torvalds/linux/master/include/net/tcp.h) - TCPHDR_FIN BIT(0) to TCPHDR_CWR BIT(7), TCPHDR_AE BIT(8)
- [RFC 9293, Transmission Control Protocol (TCP), August 2022 (STD 7): section 3.1, header format](https://www.rfc-editor.org/rfc/rfc9293.txt) - the control bits CWR, ECE, URG, ACK, PSH, RST, SYN and FIN in that order after the Data Offset and the reserved bits
- [RFC 2474, Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers, December 1998 (Proposed Standard, updated by RFC 3168, 3260 and 8436): section 3](https://www.rfc-editor.org/rfc/rfc2474.txt) - the DSCP in bits 0 to 5 of the DS field, "the left-most bit signifies bit 0"
- [RFC 3168, The Addition of Explicit Congestion Notification (ECN) to IP, September 2001 (Proposed Standard): section 5](https://www.rfc-editor.org/rfc/rfc3168.txt) - "Bits 6 and 7 in the IPv4 TOS octet are designated as the ECN field"; the codepoints Not-ECT, ECT(1), ECT(0) and CE
- [The Linux kernel source, include/linux/if_vlan.h (torvalds/linux master): VLAN_PRIO_MASK, VLAN_CFI_MASK and VLAN_VID_MASK](https://raw.githubusercontent.com/torvalds/linux/master/include/linux/if_vlan.h) - 0xe000 with shift 13 for the priority, 0x1000 "Canonical Format Indicator / Drop Eligible Indicator", 0x0fff for the VLAN ID
- [RFC 3986, Uniform Resource Identifier (URI): Generic Syntax, January 2005 (STD 66): section 3.5](https://www.rfc-editor.org/rfc/rfc3986.txt) - the fragment is "separated from the rest of the URI prior to a dereference": a Share results link's values are not sent to the server
- [RFC Editor, RFC index (XML): the current status of every RFC cited](https://www.rfc-editor.org/rfc-index.xml) - RFC 791, 1035, 1662, 3417, 9293 and 3986 are Internet Standards; RFC 9542 and 6895 are BCPs; RFC 2474 and 3168 Proposed Standards; RFC 2469 Informational; none obsoleted

## Related reading

- [Badges and cards: RFID, NFC, the Proxmark and MIFARE](https://ronutz.com/en/learn/badges-and-cards-rfid-nfc-the-proxmark-and-mifare.md): An office badge, a transit card and a car key's transponder are radio devices with no battery that answer whatever reader powers them. The cheap ones at 125 kHz answer with a bare number anyone can copy; the 13.56 MHz MIFARE Classic, the most deployed card of its kind, hid a weak cipher until researchers in Berlin and Nijmegen took it apart in 2007 and 2008, and its manufacturer lost a court bid to stop the publication. After reading, you can explain how passive cards are powered and which standards govern them, decode a 26-bit badge number, follow the Proxmark from Jonathan Westhues's bench to the Proxmark 5, read a MIFARE Classic authentication trace, date every major break from the car-key transponders of 2005 to the 2024 backdoor in compatible chips, see where Brazil's Bilhete Único and Brazilian law fit, and name the migrations and reader settings that actually defend a door.
- [Big-endian and little-endian: byte order explained](https://ronutz.com/en/learn/big-endian-and-little-endian.md): A number wider than one byte has to be laid out over several addresses, and machines disagree about which end goes first. What big-endian and little-endian mean, one 32-bit value byte by byte in both orders, where Danny Cohen found the names in 1980, why byte order is not bit order, network byte order in the RFCs and in POSIX, which processors are little-endian, big-endian or both, the instructions that swap bytes, the file formats and protocols that fix an order, what each order really costs, the bugs it causes, how to tell what a machine is, and three cases on this site: the LACP hash, the BIG-IP cookie and UTF-16.
- [Hiding in images: LSB, JPEG and adaptive steganography](https://ronutz.com/en/learn/hiding-in-images-lsb-jpeg-and-adaptive-steganography.md): Digital images became the favourite carrier for hidden messages because every pixel and every compressed coefficient is a number with a little noise in it. This part follows the techniques from the first least-significant-bit tools of the 1990s through palette tricks, JPEG coefficient embedding (JSteg, OutGuess, F5 and matrix embedding) to the content-adaptive schemes of the 2010s (HUGO, WOW, UNIWARD) and the syndrome-trellis codes that drive them. After reading, you can embed one byte into eight pixels by hand, explain why JPEG hiding works on quantized DCT coefficients, compute how matrix embedding saves changes, read a payload in bits per pixel critically, and name the open tools from their own documentation.
- [Least and most significant bit: bit numbering and bit order](https://ronutz.com/en/learn/least-and-most-significant-bit.md): Every bit of a binary number has a weight, and the least significant bit is worth 1 while the most significant bit is worth the most and, in two's complement, carries the sign. What significance means, why LSB and MSB sometimes mean bytes, the three ways documents number bits (LSB 0, MSB 0 and 1-based) and the same field read all three ways, the order bits travel on Ethernet, a UART, PPP, I2C and SPI, canonical and bit-reversed MAC addresses, masks, shifts, parity and reflected CRCs, the bugs a wrong order causes, and three cases on this site: Huawei's PortState printed bit 1 first, the I/G and U/L bits of a MAC address, and the DNS header flags.
- [Link aggregation and LACP: several links that act as one, and the protocol that keeps them honest](https://ronutz.com/en/learn/link-aggregation-and-lacp.md): A link aggregation group bundles parallel Ethernet links into one logical link for more bandwidth and for resilience. Where the standard came from (802.3ad, then 802.1AX), how LACP lets both ends agree before a single frame is sent, the fast and slow timers, why static bundles are risky, why one flow never goes faster than one member link, the rules members must follow, multi-chassis bundles, and the Linux bonding modes.
- [The DNS Header: Opcode, Status, and Flags](https://ronutz.com/en/learn/dns-message-header-and-flags.md): Every DNS message opens with the same 12-byte header: a 16-bit ID, a flags word that holds the opcode, seven named flags, a reserved bit and the response code, and four section counts, which dig prints as its header and flags lines. After reading, you can decode a header from its hexadecimal bytes, say what each flag, opcode and status tells a diagnosis, recognize a truncated answer and test the TCP retry it needs, and explain why the ID and the source port must be unpredictable.
- [The Ethernet frame, field by field: preamble to FCS, the 802.1Q tag, and the sizes that matter](https://ronutz.com/en/learn/the-ethernet-frame-field-by-field.md): Every Ethernet frame is the same short sequence of fields: a preamble to wake the receiver, two addresses, one field that is either a length or a type, the payload, and a checksum. What each field holds, why the minimum is 64 octets and the maximum 1518, where the 802.1Q tag goes and what it carries, and why jumbo frames are not in the standard.
- [The hardware hacker's bench: Bus Pirate, JTAG, UART and ChipWhisperer](https://ronutz.com/en/learn/the-hardware-hackers-bench-bus-pirate-jtag-uart-and-chipwhisperer.md): Every circuit board is built with doors for its makers: a serial console that prints the boot log, a Joint Test Action Group (JTAG) port defined by IEEE 1149.1 for testing and debugging, Arm's two-wire Serial Wire Debug, and the SPI and I2C buses where firmware and secrets are stored. This part explains what each interface is for and how it works, the tools that speak to them (the Bus Pirate, the JTAGulator, Saleae and sigrok logic analysers, Great Scott Gadgets' GreatFET, the Tigard, the Shikra and NewAE's ChipWhisperer), what power analysis and fault injection are, and how manufacturers lock the doors. After reading, you can read a UART settings line and a debug-header pin-out, decode a JTAG IDCODE down to the manufacturer, explain side-channel and glitch attacks in principle, retell four documented cases from their sources, and say which controls (readout protection, debug lockout, secure boot, tamper response) a product-security team should test.
- [What Is an OUI, and How MAC Addresses Are Assigned](https://ronutz.com/en/learn/what-is-an-oui.md): How a MAC address is structured, what the OUI (the manufacturer prefix) is and who hands it out, the difference between universally and locally administered addresses, and why a randomized Wi-Fi MAC has no vendor at all.
