OhmsCode.
CURRICULUM / ORIGINAL PRACTICE

Bits & registers

Practise masks, widths and register access without assuming every register behaves like RAM.

Change exactly the bits you intend.

Work through the assumptions, explain the mechanism, and connect it to a practical test. The questions below cover bits & registers within the junior embedded firmware role.

Start by writing what you expect, then identify what observation would prove you wrong. Keep target-specific behavior separate from portable C reasoning.

Try it before your sprint.

Public samples reveal deterministic explanations after you submit. Open-ended answers require a verified account to submit.

Explore six samples
Status#TitleTopicTypeDifficultyAcceptance
Not attempted1Clear one enable bitTODAY · FREEBits & registersMCQEasy—
Not attempted2A status register with a catchFREEBits & registersMCQEasy—
Not attempted14Extract an unsigned fieldBits & registersNumericEasy—
Not attempted20Count active flagsFREEBits & registersC codeMedium81%
Not attempted21Reverse a byteBits & registersC codeMedium—
Not attempted41Encode a little-endian register valueBits & registersC codeMedium—
Not attempted42Extract a field with checked boundariesBits & registersC codeMedium—
Not attempted61Acknowledging one flag cleared anotherBits & registersDebugMedium—
Not attempted62The field grew into its neighborBits & registersDebugMedium—
Not attempted63A debugger consumed the eventBits & registersDebugMedium—
Not attempted64GPIO updates clobber another taskBits & registersDebugMedium—
Not attempted65The mask worked until bit thirty-twoBits & registersDebugMedium—
Not attempted66A byte store did not acknowledge statusBits & registersDebugMedium—
Not attempted67The bit-field driver changed with compilerBits & registersDebugMedium—
Not attempted68A protected setting silently stayed unchangedBits & registersDebugMedium—
Not attempted136Testing whether all flags are presentBits & registersMCQEasy—
Not attempted137Choosing a shift countBits & registersMCQEasy—
Not attempted138Dedicated GPIO set registersBits & registersMCQEasy—
Not attempted139Read-clear status flagsBits & registersMCQEasy—
Not attempted140Reserved register fieldsBits & registersMCQEasy—
Not attempted141Bit-fields as a wire formatBits & registersMCQEasy—
Not attempted142A multi-bit field updateBits & registersMCQEasy—
Not attempted143Checking exactly one active bitBits & registersMCQEasy—
Not attempted144Writing a protected registerBits & registersMCQEasy—
Not attempted145Endian conversion without alignment assumptionsBits & registersMCQEasy—
Not attempted186Insert a mode without changing the upper byteBits & registersNumericEasy—
Not attempted187Count enabled pending sourcesBits & registersNumericEasy—
Not attempted188Align the next DMA descriptorBits & registersNumericEasy—
Not attempted189Decode a little-endian sampleBits & registersNumericEasy—
Not attempted190Decode a signed twelve-bit readingBits & registersNumericEasy—
Not attempted233A mixed-semantics status registerBits & registersExplainMedium—
Not attempted234Validating a configurable bit fieldBits & registersExplainMedium—
Not attempted235A register accessor's widthBits & registersExplainMedium—
Not attempted236Bit numbering versus wire orderBits & registersExplainMedium—
Not attempted237Reserved values inside a fieldBits & registersExplainMedium—
Not attempted238Checking a register writeBits & registersExplainMedium—
Not attempted239Monotonic counters and modulo subtractionBits & registersExplainMedium—
Not attempted240Representing a signed wire fieldBits & registersExplainMedium—
Not attempted343Read-modify-write hazardFREEBits & registersExplainEasy—
Not attempted364A latch pair is read in the wrong orderBits & registersDebugMedium—
Not attempted365A write-only command gets spurious bitsBits & registersDebugMedium—
Not attempted366A new chip revision picks an old workaroundBits & registersDebugMedium—
Not attempted367A descriptor doorbell arrives too earlyBits & registersDebugMedium—
Not attempted412A register reads differently from its write maskBits & registersMCQEasy—
Not attempted413Accessing a split low-high counterBits & registersMCQEasy—
Not attempted414Write-zero-to-clear flagsBits & registersMCQEasy—
Not attempted415A self-clearing request bitBits & registersMCQEasy—
Not attempted416Choosing a register address strideBits & registersMCQEasy—
Not attempted417Reading before the peripheral clock is enabledBits & registersMCQEasy—
Not attempted418Two bits represent a Gray sequenceBits & registersMCQEasy—
Not attempted419Unsigned mask normalizationBits & registersMCQEasy—
Not attempted492Sign extension of a twenty-bit sampleBits & registersNumericEasy—
Not attempted493Gray code to binary positionBits & registersNumericEasy—
Not attempted494A ring uses monotonically increasing indicesBits & registersNumericEasy—
Not attempted495Cache-line coverage of an unaligned rangeBits & registersNumericEasy—
Not attempted496A bitmap allocation overheadBits & registersNumericEasy—
Not attempted497Packing a three-byte unsigned valueBits & registersNumericEasy—
Not attempted522A coherent descriptor ownership bitBits & registersExplainMedium—
Not attempted523A read sequence with a latched status snapshotBits & registersExplainMedium—
Not attempted524A portable wire flag definitionBits & registersExplainMedium—
Not attempted525Reading a hardware identification field defensiblyBits & registersExplainMedium—