Binary data
Binary data is information represented as sequences of bytes rather than character-oriented text.
Learn Haskell by Example
Binary encoding represents data using sequences of bits and bytes rather than textual character representations.
- How it is used
- Explains how image parsers read compact PNM bitmap, graymap, and pixmap representations.
- How deep it goes
- Descends from format distinctions to byte width, bit order, 16-bit assembly, and parser implementations.
- Examples
- Uses P4 bitmap bytes, P5 graymap values, P6 RGB values, and two-byte 16-bit samples.
- What you can do after
- Build binary PNM parsers that extract bitmap bits and read eight-bit or sixteen-bit pixel values.
The Quick Python Book, Fourth Edition
Binary data is information represented as encoded bytes rather than directly as human-readable text characters.
- How it is used
- Handles file formats and byte-oriented data when text files cannot represent the required information or interoperability needs.
- How deep it goes
- Explains bytes, binary modes, pathlib methods, and structured packing, while recommending higher-level object storage for many custom formats.
- Examples
- Uses pathlib byte I/O, encoded accented text, and C-compatible records containing an integer, float, and character sequence.
- What you can do after
- Apply it via pathlib or struct to write, read, pack, and unpack binary files.
Read how The Quick Python Book, Fourth Edition explains binary data →
Data Without Labels
Binary data has exactly two mutually exclusive possible categories or values.
- How it is used
- Classifies categorical observations whose possible outcomes are limited to two exclusive classes.
- How deep it goes
- Defines two-class categorical data and distinguishes it from nominal, ordinal, discrete, and continuous data.
- Examples
- Uses yes/no, dry/wet, hard/soft, good/bad, and true/false as paired class examples.
Modern C
Binary data is data represented as uninterpreted byte sequences rather than text characters.
- How it is used
- Uses binary streams to preserve C object bytes when reading or writing files and devices.
- How deep it goes
- Explains translation hazards, binary mode, byte counts, file positions, and error detection, but defers detailed error case analysis.
- Examples
- Demonstrates newline translation changing binary structure and identifies fread, fwrite, ftell, and fseek as the relevant interfaces.
- What you can do after
- Apply via C library interfaces to transfer binary bytes, navigate file positions, and detect incomplete operations.
Related concepts
- Base64used by · Base64 is a binary-to-text encoding scheme that represents arbitrary bytes using a fixed 64-character alphabet and provides no confidentiality.
- struct moduleused by · The struct module is a Python standard-library module for converting between Python values and packed binary data using format specifications.
- plain textincludes · Plain text is character data represented without rich formatting, markup, layout instructions, or presentation metadata.
- fwriteuses · fwrite is a C standard-library function that writes a specified number of fixed-size objects from memory to a stream.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



