---
title: "Chapter 6: Operators"
description: "The 7 lessons of chapter 6: Operators, in teaching order."
url: "https://learnrust.net/chapter-6/"
last_updated: "2026-06-12"
---

# Chapter 6: Operators

- [6.1 Operator precedence and associativity](https://learnrust.net/chapter-6/operator-precedence-and-associativity.md): How Rust decides which operators apply first, why chained comparisons refuse to compile, and the one rule worth memorizing.
- [6.2 Arithmetic operators](https://learnrust.net/chapter-6/arithmetic-operators.md): Integer vs float division, the remainder operator, division by zero, and how Rust does exponents without an exponent operator.
- [6.3 Compound assignment: the missing ++](https://learnrust.net/chapter-6/compound-assignment.md): The += family of operators, and what Rust's deliberate lack of an increment operator says about the language's taste.
- [6.4 Comparison operators and float equality](https://learnrust.net/chapter-6/comparison-operators-and-float-equality.md): The six comparison operators in full, why == betrays floating-point values, and the epsilon technique professionals use instead.
- [6.5 Logical operators](https://learnrust.net/chapter-6/logical-operators.md): AND, OR, short-circuit evaluation, De Morgan's laws, and the classic mistake that Rust turns into a type error.
- [6.6 Bitwise operators (optional)](https://learnrust.net/chapter-6/bitwise-operators.md): AND, OR, XOR, NOT, and shifts on raw bits, plus the bit-flag idioms used in graphics, embedded, and systems code.
- [6.x Chapter 6 summary and quiz](https://learnrust.net/chapter-6/chapter-6-summary-and-quiz.md): Precedence, arithmetic, comparisons, and logic reviewed, plus a change-counting program that needs the whole chapter.

## Sitemap

See the full [sitemap](https://learnrust.net/sitemap.md) for all pages.
