Learn embedded bitwise tricks by writing real register code for a simulated CH32V003 — 24 levels, step-by-step visualizer, sandbox. Vibe-coded with Claude Code.
bit-dojo teaches one of the most intimidating corners of programming — bitwise register manipulation in embedded C — by letting you poke a simulated CH32V003 RISC-V microcontroller directly in the browser. You type real register code like `GPIOC->CFGLR |= (GPIO_Speed_10MHz | GPIO_CNF_OUT_PP) << (4*1);`, and the app runs it against a chip model, showing every bit before and after. When your code is actually right, an LED on pin PC1 lights up. That feedback loop — type bits, watch hardware respond — is worth a thousand textbook diagrams.
The curriculum is substantial: 24 levels across 5 chapters, from bits and hex through set/clear/toggle/test, multi-bit fields, real CH32V003 registers (RCC clock enables, GPIO configuration, BSHR set/reset), and finally a bug-hunt chapter where you fix classic embedded mistakes like clobbering a register with `=` instead of `|=`. Each level runs your code against randomized starting states, so solutions that only work for one lucky value fail. A step-by-step visualizer animates every operator in binary, and a sandbox mode lets you run live loops with `Delay_Ms()` against the whole simulated chip, button input included.
The README's build note is unusually transparent: "The C interpreter, the chip simulator, all 24 levels, the step-by-step visualizer, the tests, the logo and this README were written by Claude Code. @e-labInnovations directed it through conversation: the ideas, the feedback, and every 'that pin is wrong, look again'." A C-subset interpreter with correct precedence and undefined-behavior detection, plus a cycle-accurate-ish peripheral model, specified into existence through conversation — and the whole thing plays in your browser at bit-dojo.elabins.com.
Note: This project is curated by the VibeFix editors from public sources. All rights belong to the original creator.