Visual RFC.
ALL RFCs / RFC 8949
Read the RFC ↗
RFC 8949 / MECHANISM GUIDE

Initial byte and arguments

01

The first byte carries a three-bit major type and five-bit additional information.

RFC 8949 · § 3.1EXAMPLE
3 / 3
03
Interpret the type

Type 1 with argument 499 represents −500.

Initial byte and argumentsThe first byte carries a three-bit major type and five-bit additional information.Initial byte and arguments3901F3major 1 · −1 − 499 = −500Initial byte: 3 type bits + 5 additional-info bits

Key idea: Small arguments 0–23 are inline; larger values use following bytes.

Terms

Look up a term in the glossary ↗

Rules & examples
  • Small arguments 0–23 are inline; larger values use following bytes.
  • Major types distinguish integers, strings, containers, tags, and simple/float values.
  • Negative integers use value −1 minus the unsigned argument.

Examples are illustrative. Consult the linked RFC and its errata for implementation details.

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

First, agree how to read the message.

An encoding tells a reader how to interpret bytes. A format tells it how values fit together. Correctly reading a value does not make that value trustworthy.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

What changed
RFC 7049RFC 8949 Appendix G

The new specification keeps full format compatibility, corrects errata, and clarifies deterministic encoding. It explicitly does not create a new CBOR format version.

Read the updated RFC section ↗

All chapters in RFC 8949

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗