Bytes
Bytes are an ordered sequence of byte values, typically eight-bit units, used to represent binary data.
Learn Rust in a Month of Lunches
A byte is a fixed-size unit of digital information consisting of eight bits in conventional modern systems.
- How it is used
- Uses bytes to explain integer sizes and string lengths in Rust.
- How deep it goes
- Explains eight-bit binary values and their contribution to a u8 maximum.
- Examples
- Compares i8 and i64 sizes, calculates the u8 maximum, and measures strings containing different characters.
- What you can do after
- Evaluate byte counts for integer types and distinguish string byte length from character count.
API Design Patterns
Byte data is binary content represented as a sequence of bytes.
- How it is used
- Uses bytes to reason about storage bounds and database representations for identifiers.
- How deep it goes
- Explains allocation units and storage alternatives, stopping short of detailed binary encoding algorithms.
- Examples
- Uses UTF-32 sizing, MySQL BINARY fields, and 32- or 64-bit integer representations as concrete examples.
- What you can do after
- Evaluate identifier storage formats and configure raw-byte fields with uniqueness constraints and indexes.
The Well-Grounded Rubyist, Fourth Edition
A byte is a unit of digital data consisting of eight bits and serving as a basic unit of file storage and input.
- How it is used
- Uses bytes to process strings, files, and IO streams at a level below character-oriented operations.
- How deep it goes
- Explains integer representation, encoding differences, stream operations, and a worked XOR transformation without covering binary storage internals.
- Examples
- Uses ASCII-valued characters, repeated-key XOR, each_byte, getbyte, getc, and IO#write examples.
- What you can do after
- Apply byte-wise enumeration, file reading, and reversible XOR transformations in Ruby.
Read how The Well-Grounded Rubyist, Fourth Edition explains bytes →
100 Go Mistakes and How to Avoid Them
A byte is Go's alias for the unsigned 8-bit integer type uint8 and commonly represents one raw byte of data.
- How it is used
- Uses bytes to explain string storage, indexing, iteration mistakes, and direct []byte processing.
- How deep it goes
- Explains byte storage and UTF-8 indexing through runnable output, then stops short of broader byte-level APIs.
- Examples
- Uses ĥ-free hês? No: uses "hêllo", byte indexes, corrupted à output, rune slices, and UTF-8 rune counting.
- What you can do after
- Diagnose string iteration bugs by distinguishing byte indexes, byte values, rune values, and rune counts.
Read how 100 Go Mistakes and How to Avoid Them explains bytes →
Classic Game Programming on the NES: Make your own retro video game
A byte is a unit of digital information consisting of eight bits and commonly used to represent a small integer or character.
- How it is used
- Represents game state, graphics, coordinates, and flags as addressable 8-bit memory values.
- How deep it goes
- Defines byte structure, bit numbering, numeric ranges, binary conversion, hexadecimal notation, and nibbles; defers combining bytes for larger numbers.
- Examples
- Uses %10101010 as decimal 170 and $AF as decimal 175, alongside sprite coordinates, tile pixels, and flags.
- What you can do after
- Apply it via 6502 assembler to express byte values in decimal, binary, or hexadecimal.
Read how Classic Game Programming on the NES: Make your own retro video game explains bytes →
Modern C, Third Edition
A byte is the C memory unit corresponding to the storage occupied by one char object and used as the basic unit of object representation.
- How it is used
- Explains how C accounts for, views, and inspects the storage representation of objects.
- How deep it goes
- Defines byte size and object representation, then works through union-based inspection and implementation-defined byte order.
- Examples
- Uses an unsigned value 0xAABBCCDD, an unsigned-char union member, and printed byte values to demonstrate representation order.
- What you can do after
- Evaluate object representations with sizeof and inspect individual bytes through an unsigned-char overlay.
Rust in Action: Systems programming concepts and techniques
A byte is a unit of digital information consisting of eight binary bits.
- How it is used
- Represents instruction components in an emulator and arbitrary raw values in a key-value store.
- How deep it goes
- Explains byte composition through nibbles and demonstrates masking, shifting, and [u8] storage without broader binary representation details.
- Examples
- Uses CHIP-8 opcode fields, u8 registers, country-capital records, and Rust byte literals.
- What you can do after
- Apply it via Rust to decode opcode fields and represent arbitrary-length stored data as byte sequences.
Read how Rust in Action: Systems programming concepts and techniques explains bytes →
Also covered in
- Acing the CCNA Exam: Volume 1 Fundamentals and Protocols
- Tiny Python Projects: Learn coding and testing with puzzles and games
- Python Concurrency with asyncio
- Apache Kafka in Action
- How Computers Make Books
- The Quick Python Book, Fourth Edition
- Grokking Web Application Security
- High Performance Unity Game DevelopmentIn early access (MEAP)
- Kafka for Architects
- Python Workout, Second Edition
- Elixir in Action, Third Edition
- Server-Side WebAssembly
What to know first
- ASCIIASCII is a 7-bit character-encoding standard that assigns numeric codes to 128 basic Latin characters, symbols, punctuation marks, digits, and control characters.
- integerAn integer is a whole-number mathematical value, including negative numbers, zero, and positive numbers, with no fractional part.
- listA list is an ordered collection of elements arranged in a sequence.
- characterA character is a unit of text treated as a single symbol or element in a character sequence, independent of its underlying encoding.
Related concepts
- bithas part · A bit is a binary digit and unit of digital information that represents one of two distinguishable values, conventionally 0 or 1.
- serializationproduced by · Serialization is the conversion of structured data or in-memory values into a representation suitable for storage or transmission and possible later reconstruction.
- data representationused by · A data representation is a form or encoding that structures information for interpretation, processing, storage, or exchange.
- serializerproduced by · A serializer is a software component that converts structured in-memory data into a representation suitable for storage or transmission, typically bytes.
- stringcontrasts with · A string is a programming-language value representing textual data as an ordered sequence of characters or encoded units.
Questions about bytes
What is bytes?
Bytes are an ordered sequence of byte values, typically eight-bit units, used to represent binary data.
Which Manning books explain bytes?
Learn Rust in a Month of Lunches, API Design Patterns, The Well-Grounded Rubyist, Fourth Edition, 100 Go Mistakes and How to Avoid Them, Classic Game Programming on the NES: Make your own retro video game, Modern C, Third Edition and Rust in Action: Systems programming concepts and techniques.
What should I know before learning bytes?
Manning books that teach bytes usually introduce ASCII, integer, list and character first.
What is the difference between bytes and string?
Bytes are an ordered sequence of byte values, typically eight-bit units, used to represent binary data. A string is a programming-language value representing textual data as an ordered sequence of characters or encoded units.
What are the parts of bytes?
Bytes includes bit and nibble.
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.






