50

Disclaimer: there was this question, it was deleted before I managed to post an answer. Since I put effort in creating my answer and I don't want it to go down the drain, I re-post the question here.


Original question:

I am searching the Net but not exactly getting the references. I have also read https://en.wikipedia.org/wiki/CD-RW

I know the very basic difference between Quick Erase & Full Erase when it comes to Rewritable CDs (CD-RW).

However what I want to know is that:

  1. Does full erase create all 0s or all 1s on the media?
  2. During Full Erase (Preferably on Windows) is there any way I can specify if it should be all 0 or all 1 the CD-RW?
0

1 Answer 1

69

Does full erase create all 0s or all 1s on the media?

Neither.

In a CD there are spots called pits and spots called lands. The important thing is they reflect light differently and thus allow information to be encoded in sequences of pits and lands. Full erase of a CD-RW removes all pits (see this video from Technology Connections).

Basically 0s are encoded as "no transition" (a long pit or a long land encodes one or more 0s), 1s are encoded as "transition" (where a pit is followed by a land or where a land is followed by a pit). You may think that a CD-RW with all pits removed is therefore all 0s, but this is more complicated.

When creating a digital audio CD, each 24 bytes of audio data are encoded, so there is error correction and this forms a 33-byte frame. Then each 8-bit word (byte) is replaced with a corresponding 14-bit word designed to reduce the number of transitions between 0 and 1. This reduces the density of physical pits on the disc and provides an additional degree of error tolerance. Then there are additional bits for disambiguation and synchronization. This way 192 bits (24 bytes) of music get encoded as 588 bits of "lands and pits" and these bits cannot all be 0s, so there must be lands and pits.

On top of that, when creating a data CD, each 2048-byte "logical" sector of data is embedded in a 2352-byte sector along with metadata for synchronization, error detection and error correction. There are modes that put more than 2048 bytes of useful data into these 2352 bytes (at the cost of error correction), still some sync patterns and addresses need to be there, so even then the bits of this 2352-byte sector cannot all be 0s. But this doesn't really matter because these 2352 bytes are treated as 98 24-byte chunks of "audio" and encoded as described in the previous paragraph. This way each 2048-byte "logical" sector of data is encoded as 57624 bits of "lands and pits" and (as above) these bits cannot all be 0s, so there must be lands and pits.

Additionally there must be lead-in before data (or audio) and lead-out after. The former must contain the Table of Contents of the disk, encoded properly; this also requires lands and pits. (Side note: quick erase just destroys the Table of Contents.)

This means a CD-RW with all pits erased (after a full erase) does not correspond to any sequence of 0s and 1s. It just cannot be decoded to be treated as a block device with 2048-byte sectors. (It cannot be decoded to be treated as audio either.)


During Full Erase (Preferably on Windows) is there any way I can specify if it should be all 0 or all 1 the CD-RW?

No. You can get "all land" (and this is what you actually get); and I guess in principle it's possible to get "all pit" (but you may need to alter the firmware of the burner for this). It makes no difference because the latter state cannot be decoded, just like the former.

Technically you can write all 0s or all 1s to a CD-RW, so if you read it as a block device you will get these 0s or 1s back; but each of these states requires lands and pits (in fact any data you can burn requires lands and pits). This is not what full erase does.

4
  • 5
    This is true for basically all media formats. Too many zeroes or ones in a row can cause read/write desynchronization, so it's typical to see periodic transition states to keep the clock accurate.
    – phyrfox
    Commented Aug 13 at 0:30
  • 1
    @phyrfox Right. The difference is: in majority of cases this lower level is totally transparent to us. I mean e.g. we cannot easily erase it, so the question if this is equivalent to 0s or 1s on the higher level we can access does not appear. Commented Aug 13 at 7:48
  • @phyrfox: Many media also require a certain number of non-transition bits between transitions. An MFM floppy requires at least one zero between 1 bits, and never writes more than three.
    – supercat
    Commented Aug 13 at 15:36
  • 2
    @phyrfox except some flash memory and SSD, which can store one bit per cell. However, these days it is usually three or even four bits per cell, encoded as a voltage level, and usually with disk-like redundant encoding since the individual cell voltages are not quite so reliable as pure binary.
    – nigel222
    Commented Aug 14 at 11:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .