---
title: "G-Code Mnemonics and Memory Tricks That Stick"
description: "A working collection of G-code memory hooks: zero-cutting G00, the off-follows-on M-code families, Z follows the spindle, and the -30- end mark behind M30."
url: https://gcodepractice.com/journal/g-code-mnemonics-and-memory-tricks/
canonical: https://gcodepractice.com/journal/g-code-mnemonics-and-memory-tricks/
author: "Lawrence Arya"
authorUrl: https://www.linkedin.com/in/vibecoding/
published: 2026-06-04
updated: 2026-06-04
category: "Practice"
tags: ["mnemonics", "memorization", "g-code", "practice"]
lang: en
---

# G-Code Mnemonics and Memory Tricks That Stick

> **TL;DR** The codes that stick fastest come with hooks: G00 has the extra zero and does zero cutting, the off switch follows its on switches in both the spindle (M03/M04 to M05) and coolant (M07/M08 to M09) families, 2 comes before 3 like CW before CCW for the arcs, Z always follows the spindle, and M30 echoes the old newsroom -30- end mark. Mnemonics are scaffolding: they get a code into memory, and recall practice is what keeps it there.

G and M codes are assigned numbers, and assigned numbers are what memory drops first. A [mnemonic](https://en.wikipedia.org/wiki/Mnemonic) fixes that by giving the number a hook, and machining has accumulated a small folklore of good ones. Here is the working collection, organized by how much each hook carries, plus the practice step that makes hooks unnecessary.

## The single-code hooks

| Code | Hook | Why it lands |
| --- | --- | --- |
| `G00` | The extra zero does zero cutting | Rapid never touches the part |
| `G01` | The one that does the work | Feed move, the partner fact |
| `G91` | Ends in 1, adds one step at a time | Incremental positioning |
| `G21` | The bigger number, the smaller unit | 21 picks millimeters |
| `M30` | The newsroom -30- end mark | Journalists ended stories with it |

The `G00` hook is the one to teach first, because it anchors the most consequential beginner distinction, rapid versus feed, the pair fully unpacked in [G00 vs G01](/journal/g00-vs-g01/). The `M30` hook is the collection's best piece of trivia: reporters really did type -30- to end a story, and the program-end code happens to rhyme with it perfectly.

## The pattern hooks, which carry whole families

Single-code rhymes are retail; structural patterns are wholesale. Three patterns cover more codes than every rhyme combined. **The off switch follows its on switches:** `M03` and `M04` start the spindle and `M05` stops it; `M07` and `M08` start coolant and `M09` stops it, two ons then the off, twice in a row, the pattern detailed in [the coolant-code family](/journal/i-keep-forgetting-which-m-code-turns-off-the-coolant/). **Two before three, CW before CCW:** the arcs sort themselves because the numeric order matches the alphabetical order of clockwise and counterclockwise, the distinction drawn in [G02 vs G03](/journal/g02-vs-g03/). **Z follows the spindle:** on every machine type, vertical mill or lathe, the Z axis is the spindle centerline, the anchor that ends the [lathe X and Z confusion](/journal/how-to-stop-mixing-up-x-and-z-axis-on-a-lathe/).

## The contrast hooks, for look-alike pairs

Some codes are confusable precisely because they are neighbors, and the hook is the difference itself. `G41` versus `G42`: left before right, one before two, alphabetical again. `G90` versus `G91`: the zero sits still at the origin (absolute), the one steps forward (incremental). Drilling these as deliberate contrast pairs, side by side until each answers instantly, beats memorizing them separately, and it is the standard fix for transposition-prone readers described in [dyslexia and CNC programming](/journal/dyslexia-and-cnc-programming/).

## Why hooks alone are not enough

A mnemonic is an encoding device: it gets the code into memory through a side door. At the control you need retrieval speed, the answer arriving before the hook does, and that comes only from [active recall](https://en.wikipedia.org/wiki/Active_recall): self-testing, repeating misses, and letting [spaced repetition](https://en.wikipedia.org/wiki/Spaced_repetition) schedule the reviews. The healthy life cycle of a mnemonic is planned obsolescence: it carries the code for the first week, then retrieval practice wears a direct path and the hook quietly retires. If you still need the rhyme after a month, the code needs more drilling, not a better rhyme.

A concrete week: day one, learn the five single-code hooks; days two and three, add the three family patterns; the rest of the week, drill everything as recall questions, hooks allowed but not required. By the following Monday the everyday set answers itself, which was the goal the whole time, the same arc as [how to memorize G-code faster](/journal/how-to-memorize-g-code-faster/).

## Bottom line

The hooks that earn their keep: zero-cutting `G00`, off-follows-on in both M-code families, two-before-three for the arcs, Z follows the spindle, the stepping `G91`, and the newsroom `-30-` behind `M30`. Use them to encode, then drill to retrieve until the hooks go quiet. The drilling half runs free on the [G-code practice hub](/g-code-practice/), and it is the half that lasts.

## Sources

- [Wikipedia: Mnemonic](https://en.wikipedia.org/wiki/Mnemonic)
- [Wikipedia: Active recall](https://en.wikipedia.org/wiki/Active_recall)
- [Wikipedia: Spaced repetition](https://en.wikipedia.org/wiki/Spaced_repetition)

## Frequently asked questions

### What are good mnemonics for G-codes and M-codes?
Zero-cutting `G00`, the off-follows-on pattern in the spindle and coolant families, two-before-three for `G02`/`G03`, stepping `G91`, Z follows the spindle, and the newsroom `-30-` end mark behind `M30`.

### Do mnemonics actually work for learning CNC codes?
Yes, as encoding hooks that get arbitrary numbers into memory. Recall practice then converts hooked codes into instant, hook-free recognition.

### What is the easiest mnemonic to start with?
`G00`, zero cutting: the code with the extra zero never cuts. It anchors the rapid-versus-feed distinction and gives you `G01` for free.

### What is the best way to make G-code mnemonics permanent?
Drill them into retrieval. A free app like G-Code Sprint quizzes the codes and repeats whichever ones you miss until answers arrive before the hooks do.

*G-Code Sprint is a study and practice tool only. Always follow your instructor, employer, machine manual, and shop safety procedures.*

---

Source: https://gcodepractice.com/journal/g-code-mnemonics-and-memory-tricks/
Author: Lawrence Arya — https://www.linkedin.com/in/vibecoding/
