Bit I/O & Universal Codes Checkpoint

Worked scenarios: trace state, diagnose mistakes, and apply the module contract.


Get every question correct to pass this checkpoint. You can review feedback, revise your answers, and submit again.

1. WriteBits(6,3) then WriteBits(9,4), MSB first. Give the single padded byte as two hex digits.
2. Bytes() is called after writing three bits, then two more bits are written. What must the second snapshot contain?

Select one answer.

3. How many meaningful bits are in gamma(19)?
4. A reader is given one byte 0x80 containing padded gamma(1). After reading its leading one, how can the remaining zeros be identified as padding?

Select one answer.

5. A delta decoder obtains bit length 65 while returning uint64 values. What is correct?

Select one answer.

6. For n=8, delta writes gamma(4) then suffix 000. Give the resulting padded byte in hex.
Join Discord