Convert bits to and from pits and lands
Closed this issue · 2 comments
saxbophone commented
Feature: Convert bits to and from pits and lands
In order to produce distinct visible shades on the CD program area
the Program that produces disc images should be able to
convert between patterns of pits and lands and patterns of bits
Scenario: Convert bits to pits/lands
Given a sequence of bits
When the bits are passed into the pit/land encoder
Then the encoder should return a corresponding sequence of pits and lands
Scenario: Convert pits/lands to bits
Given a sequence of pits and lands
When the pits/lands are passed into the pit/land decoder
Then the decoder should return a corresponding sequence of bits
saxbophone commented
Note: previously-seen combinations of pits and lands affect the next combination, because bits encode into pits/lands using Non-Return-to-Zero-Inverted (NRZI) encoding, which means that 1 bits trigger the transition from pit/land to land/pit and 0 bits keep the current state.
saxbophone commented
Too tempting to use templates for this, to not use templates for this.