RFC 791 (1981) - the datagram format nearly everything rides on: a 20-byte header (up to 60 with options) in front of every packet the internet routes. Three fields are sub-byte - Version and IHL share the first byte, and the fragmentation Flags/Offset split a 16-bit word - so IPv4 reads best bit by bit. Its header checksum covers the header only and is recomputed at every hop (the TTL changes each time); IPv6 dropped the header checksum entirely and moved options into an extension-header chain. Hover a field to light its bits, click a field marked + for its lookup table.
A real minimal (no-options) IPv4 header for a TCP segment from 192.0.2.1 to 198.51.100.10 (RFC 5737 documentation addresses). Shown bit-by-bit because Version/IHL and the fragmentation word don't fall on byte boundaries.
The header checksum below is real: re-summing all ten 16-bit words with this value included folds to zero (verified).
The second byte was originally "Type of Service"; RFC 2474/3168 redefined it as 6 bits of Differentiated Services Code Point (which QoS class) plus 2 bits of Explicit Congestion Notification. Shown here set to EF (Expedited Forwarding) - the class voice traffic uses.
Identification, Flags, and Fragment Offset are how a datagram too big for a link's MTU gets split and reassembled. This is the middle fragment of a datagram: same Identification as its siblings, MF (more fragments) set, and an offset placing its payload at byte 1480 of the original.
When IHL is greater than 5, one or more 32-bit option words follow the base header. This one carries a single Router Alert option (RFC 2113): "every router on the path must inspect this packet, not just forward it" - used by protocols like RSVP and IGMP. Shown byte-by-byte since options are byte-structured.
IHL is now 6 (byte 0 = 0x46) and the checksum is recomputed over the larger header - verified to fold to zero.