Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • Reading Path
  • CDC/RDC Glossary
  • CDC/RDC Metrics Reference
  • CDC/RDC Interview Prep
  • CDC/RDC Signoff Cheatsheet
  • Clock Domains and Failure Modes8
  • Metastability and Synchronizers16
  • CDC Protocols and Handshakes16
  • Reconvergence and Gray Coding16
    • Gray Code Crossing
      • The One-Bit-Change Rule
      • Gray Counters
      • Where Gray Fails
      • Non-Power-of-Two Depths
    • Reconvergence Analysis
    • Multi-bit Crossing Strategies
    • Reconvergence Debug
  • Reset Domain Crossing16
  • Architecture and Design Rules16
  • CDC Signoff Methodology24
  • RDC Signoff16
  • Debug and Case Studies11
  • CDC and RDC Interview Prep30
  • Capstone: Sign Off a Multi-clock Peripheral4
Loading lesson

‹Reconvergence and Gray Coding
  1. Topics
  2. CDC & RDC
  3. Reconvergence and Gray Coding
  4. Gray Code Crossing

Part 4 · Reconvergence and Gray Coding · All levels

Gray Code Crossing

Why Gray coding makes a counter safe to sample across a clock boundary, and where the argument stops holding.

  • 4topics
  • 4lessons

Counters and pointers cross clock domains constantly, and a binary counter changes several bits at once. Gray coding changes one bit per step, so a sample taken mid-change is at worst the old or the new value, never a mixture. These four lessons state that rule exactly, build a Gray counter, list where Gray fails, and cover non-power-of-two depths.

Lesson

After it you can...

One-Bit-Change Rule

State exactly when a Gray sample is safe and what stale means.

Gray Counters

Build a registered Gray counter and prove its steps exhaustively.

Where Gray Fails

Spot jumps, skips and post-conversion logic that break the rule.

Non-Power-of-Two Depths

Say why odd depths can never cycle and what to do instead.

Study in order: the rule, then the counter, then the failure modes, then the depth limits.

Check yourself A 4-bit binary counter goes 0111 to 1000 while the other domain samples it. What can the sample show, and what would a Gray counter show instead?

The binary sample can show any mixture of old and new bits, a value that never existed. A Gray counter changes one bit per step, so the sample shows the old or the new value only.

Related topics

  • Start: the one-bit-change rule

  • Design: async FIFO

PreviousNext: The One-Bit-Change Rule

Up next

Up nextThe One-Bit-Change Rule

Sign in to save progress

Practice this lessonReport an error

See also

  • Reconvergence Analysis
  • Multi-bit Crossing Strategies
  • Reconvergence Debug