Group coded recording was first used for magnetic-tape data storage on 9-trackreel-to-reel tape. The term was coined during the development of the IBM 3420 Model 4/6/8 Magnetic Tape Unit and the corresponding 3803 Model2 Tape Control Unit, both introduced in 1973. IBM referred to the error correcting code itself as "group coded recording". However, GCR has come to refer to the recording format of 6250bpi (250bits/mm) tape as a whole, and later to formats which use similar RLL codes without the error correction code.
In order to reliably read and write to magnetic tape, several constraints on the signal to be written must be followed. The first is that two adjacent flux reversals must be separated by a certain distance on the media, defined by the magnetic properties of the media itself. The second is that there must be a reversal often enough to keep the reader's clock in phase with the written signal; that is, the signal must be self-clocking and most importantly to keep the playback output high enough as this is proportional to the density of flux transitions. Prior to 6250bpi tapes, 1600bpi tapes satisfied these constraints using a technique called phase encoding (PE), which was only 50% efficient. For 6250bpi GCR tapes, a (0,2)RLL code is used, or more specifically a 4/5(0,2) block code sometimes also referred to as GCR (4B-5B) encoding. This code requires five bits to be written for every four bits of data. The code is structured so that no more than two zero bits (which are represented by lack of a flux reversal) can occur in a row, either within a code or between codes, no matter what the data was. This RLL code is applied independently to the data going to each of the nine tracks.
Of the 32 five-bit patterns, eight begin with two consecutive zero bits, six others end with two consecutive zero bits, and one more (10001) contains three consecutive zero bits. Removing the all-ones pattern (11111) from the remainder leaves 16 suitable code words.
The 6250bpi GCR RLL code:
4-bit value
GCR code
hex
bin
bin
hex
0x0
0000
1.1001
0x19
0x1
0001
1.1011
0x1B
0x2
0010
1.0010
0x12
0x3
0011
1.0011
0x13
0x4
0100
1.1101
0x1D
0x5
0101
1.0101
0x15
0x6
0110
1.0110
0x16
0x7
0111
1.0111
0x17
4-bit value
GCR code
hex
bin
bin
hex
0x8
1000
1.1010
0x1A
0x9
1001
0.1001
0x09
0xA
1010
0.1010
0x0A
0xB
1011
0.1011
0x0B
0xC
1100
1.1110
0x1E
0xD
1101
0.1101
0x0D
0xE
1110
0.1110
0x0E
0xF
1111
0.1111
0x0F
11 of the nibbles (other than xx00 and 0001) have their code formed by prepending the complement of the most significant bit; i.e. abcd is encoded as aabcd. The other five values are assigned codes beginning with 11. Nibbles of the form ab00 have codes 11baa, i.e. the bit reverse of the code for ab11. The code 0001 is assigned the remaining value 11011.
Because the all-ones code is not used in normal data, at most 8 one-bits can appear in a row. Sequences of 9 or more one-bits (in practice 14 all-ones codes, or 70 one-bits, were used) are used as a synchronization pattern.
Because of the extremely high density (for the time) of 6250bpi tape, the RLL code is not sufficient to ensure reliable data storage. On top of the RLL code, an error-correcting code called the Optimal Rectangular Code (ORC) is applied. This code is a combination of a parity track and polynomial code similar to a CRC, but structured for error correction rather than error detection. For every seven bytes written to the tape (before RLL encoding), an eighth check byte is calculated and written to the tape. When reading, the parity is calculated on each byte and exclusive-ORed with the contents of the parity track, and the polynomial check code calculated and exclusive-ORed with the received check code, resulting in two 8-bit syndrome words. If these are both zero, the data is error free. Otherwise, error-correction logic in the tape controller corrects the data before it is forwarded to the host. The error correcting code is able to correct any number of errors in any single track, or in any two tracks if the erroneous tracks can be identified by other means.
In newer IBM half-inch 18-track tape drives recording at 24000bpi, 4/5(0,2) GCR was replaced by a more efficient 8/9(0,3) modulation code, mapping eight bits to nine bits.
Like magnetic tape drives, floppy disk drives have physical limits on the spacing of flux reversals (also called transitions, represented by one-bits).
Micropolis
Offering GCR-compatible diskette drives and floppy disk controllers (like the 100163-51-8 and 100163-52-6), Micropolis endorsed data encoding with group coded recording on 5¼-inch 100 tpi 77-track diskette drives to store twelve 512-byte sectors per track since 1977 or 1978.
Micro Peripherals
Micro Peripherals, Inc. (MPI) marketed double-density 5¼-inch disk drives (like the single-sided B51 and double-sided B52 drives) and a controller solution implementing GCR since early 1978.
Durango
The Durango SystemsF-85 (introduced in September 1978) used single-sided 5¼-inch 100tpi diskette drives providing 480KB utilizing a proprietary high-density 4/5 group coded encoding. The machine was using a Western Digital FD1781 floppy disk controller, designed by a former Sperry ISS engineer, with 77-track Micropolis drives. In later models such as the Durango 800 series this was expanded to a double-sided option for 960KB (946KB formatted) per diskette.
Apple
For the Apple II floppy drive, Steve Wozniak invented a floppy controller which (along with the Disk II drive itself) imposed two constraints:
Between any two one bits, there may be a maximum of one zero bit.
Each 8-bit byte must start with a one bit.
The simplest scheme to ensure compliance with these limits is to record an extra "clock" transition before each data bit according to differential Manchester encoding or (digital) FM (frequency modulation). Known as 4-and-4 encoding, the resulting Apple implementation allowed only ten 256-byte sectors per track to be recorded on a single-density 5¼-inch floppy. It uses two bytes for each byte.
4-and-4 encoding table
Value
Code
hex
bin
bin
hex
0x00
0000.0000
1010.1010 1010.1010
0xAA 0xAA
0x01
0000.0001
1010.1010 1010.1011
0xAA 0xAB
0x02
0000.0010
1010.1011 1010.1010
0xAB 0xAA
0x03
0000.0011
1010.1011 1010.1011
0xAB 0xAB
0x04
0000.0100
1010.1010 1010.1110
0xAA 0xAE
0x05
0000.0101
1010.1010 1010.1111
0xAA 0xAF
0x06
0000.0110
1010.1011 1010.1110
0xAB 0xAE
0x07
0000.0111
1010.1011 1010.1111
0xAB 0xAF
0x08
0000.1000
1010.1110 1010.1010
0xAE 0xAA
0x09
0000.1001
1010.1110 1010.1011
0xAE 0xAB
0x0A
0000.1010
1010.1111 1010.1010
0xAF 0xAA
0x0B
0000.1011
1010.1111 1010.1011
0xAF 0xAB
0x0C
0000.1100
1010.1110 1010.1110
0xAE 0xAE
0x0D
0000.1101
1010.1110 1010.1111
0xAE 0xAF
0x0E
0000.1110
1010.1111 1010.1110
0xAF 0xAE
0x0F
0000.1111
1010.1111 1010.1111
0xAF 0xAF
0x10
0001.0000
1010.1010 1011.1010
0xAA 0xBA
0x11
0001.0001
1010.1010 1011.1011
0xAA 0xBB
0x12
0001.0010
1010.1011 1011.1010
0xAB 0xBA
0x13
0001.0011
1010.1011 1011.1011
0xAB 0xBB
0x14
0001.0100
1010.1010 1011.1110
0xAA 0xBE
0x15
0001.0101
1010.1010 1011.1111
0xAA 0xBF
0x16
0001.0110
1010.1011 1011.1110
0xAB 0xBE
0x17
0001.0111
1010.1011 1011.1111
0xAB 0xBF
0x18
0001.1000
1010.1110 1011.1010
0xAE 0xBA
0x19
0001.1001
1010.1110 1011.1011
0xAE 0xBB
0x1A
0001.1010
1010.1111 1011.1010
0xAF 0xBA
0x1B
0001.1011
1010.1111 1011.1011
0xAF 0xBB
0x1C
0001.1100
1010.1110 1011.1110
0xAE 0xBE
0x1D
0001.1101
1010.1110 1011.1111
0xAE 0xBF
0x1E
0001.1110
1010.1111 1011.1110
0xAF 0xBE
0x1F
0001.1111
1010.1111 1011.1111
0xAF 0xBF
0x20
0010.0000
1011.1010 1010.1010
0xBA 0xAA
0x21
0010.0001
1011.1010 1010.1011
0xBA 0xAB
0x22
0010.0010
1011.1011 1010.1010
0xBB 0xAA
0x23
0010.0011
1011.1011 1010.1011
0xBB 0xAB
0x24
0010.0100
1011.1010 1010.1110
0xBA 0xAE
0x25
0010.0101
1011.1010 1010.1111
0xBA 0xAF
0x26
0010.0110
1011.1011 1010.1110
0xBB 0xAE
0x27
0010.0111
1011.1011 1010.1111
0xBB 0xAF
0x28
0010.1000
1011.1110 1010.1010
0xBE 0xAA
0x29
0010.1001
1011.1110 1010.1011
0xBE 0xAB
0x2A
0010.1010
1011.1111 1010.1010
0xBF 0xAA
0x2B
0010.1011
1011.1111 1010.1011
0xBF 0xAB
0x2C
0010.1100
1011.1110 1010.1110
0xBE 0xAE
0x2D
0010.1101
1011.1110 1010.1111
0xBE 0xAF
0x2E
0010.1110
1011.1111 1010.1110
0xBF 0xAE
0x2F
0010.1111
1011.1111 1010.1111
0xBF 0xAF
0x30
0011.0000
1011.1010 1011.1010
0xBA 0xBA
0x31
0011.0001
1011.1010 1011.1011
0xBA 0xBB
0x32
0011.0010
1011.1011 1011.1010
0xBB 0xBA
0x33
0011.0011
1011.1011 1011.1011
0xBB 0xBB
0x34
0011.0100
1011.1010 1011.1110
0xBA 0xBE
0x35
0011.0101
1011.1010 1011.1111
0xBA 0xBF
0x36
0011.0110
1011.1011 1011.1110
0xBB 0xBE
0x37
0011.0111
1011.1011 1011.1111
0xBB 0xBF
0x38
0011.1000
1011.1110 1011.1010
0xBE 0xBA
0x39
0011.1001
1011.1110 1011.1011
0xBE 0xBB
0x3A
0011.1010
1011.1111 1011.1010
0xBF 0xBA
0x3B
0011.1011
1011.1111 1011.1011
0xBF 0xBB
0x3C
0011.1100
1011.1110 1011.1110
0xBE 0xBE
0x3D
0011.1101
1011.1110 1011.1111
0xBE 0xBF
0x3E
0011.1110
1011.1111 1011.1110
0xBF 0xBE
0x3F
0011.1111
1011.1111 1011.1111
0xBF 0xBF
Value
Code
hex
bin
bin
hex
0x40
0100.0000
1010.1010 1110.1010
0xAA 0xEA
0x41
0100.0001
1010.1010 1110.1011
0xAA 0xEB
0x42
0100.0010
1010.1011 1110.1010
0xAB 0xEA
0x43
0100.0011
1010.1011 1110.1011
0xAB 0xEB
0x44
0100.0100
1010.1010 1110.1110
0xAA 0xEE
0x45
0100.0101
1010.1010 1110.1111
0xAA 0xEF
0x46
0100.0110
1010.1011 1110.1110
0xAB 0xEE
0x47
0100.0111
1010.1011 1110.1111
0xAB 0xEF
0x48
0100.1000
1010.1110 1110.1010
0xAE 0xEA
0x49
0100.1001
1010.1110 1110.1011
0xAE 0xEB
0x4A
0100.1010
1010.1111 1110.1010
0xAF 0xEA
0x4B
0100.1011
1010.1111 1110.1011
0xAF 0xEB
0x4C
0100.1100
1010.1110 1110.1110
0xAE 0xEE
0x4D
0100.1101
1010.1110 1110.1111
0xAE 0xEF
0x4E
0100.1110
1010.1111 1110.1110
0xAF 0xEE
0x4F
0100.1111
1010.1111 1110.1111
0xAF 0xEF
0x50
0101.0000
1010.1010 1111.1010
0xAA 0xFA
0x51
0101.0001
1010.1010 1111.1011
0xAA 0xFB
0x52
0101.0010
1010.1011 1111.1010
0xAB 0xFA
0x53
0101.0011
1010.1011 1111.1011
0xAB 0xFB
0x54
0101.0100
1010.1010 1111.1110
0xAA 0xFE
0x55
0101.0101
1010.1010 1111.1111
0xAA 0xFF
0x56
0101.0110
1010.1011 1111.1110
0xAB 0xFE
0x57
0101.0111
1010.1011 1111.1111
0xAB 0xFF
0x58
0101.1000
1010.1110 1111.1010
0xAE 0xFA
0x59
0101.1001
1010.1110 1111.1011
0xAE 0xFB
0x5A
0101.1010
1010.1111 1111.1010
0xAF 0xFA
0x5B
0101.1011
1010.1111 1111.1011
0xAF 0xFB
0x5C
0101.1100
1010.1110 1111.1110
0xAE 0xFE
0x5D
0101.1101
1010.1110 1111.1111
0xAE 0xFF
0x5E
0101.1110
1010.1111 1111.1110
0xAF 0xFE
0x5F
0101.1111
1010.1111 1111.1111
0xAF 0xFF
0x60
0110.0000
1011.1010 1110.1010
0xBA 0xEA
0x61
0110.0001
1011.1010 1110.1011
0xBA 0xEB
0x62
0110.0010
1011.1011 1110.1010
0xBB 0xEA
0x63
0110.0011
1011.1011 1110.1011
0xBB 0xEB
0x64
0110.0100
1011.1010 1110.1110
0xBA 0xEE
0x65
0110.0101
1011.1010 1110.1111
0xBA 0xEF
0x66
0110.0110
1011.1011 1110.1110
0xBB 0xEE
0x67
0110.0111
1011.1011 1110.1111
0xBB 0xEF
0x68
0110.1000
1011.1110 1110.1010
0xBE 0xEA
0x69
0110.1001
1011.1110 1110.1011
0xBE 0xEB
0x6A
0110.1010
1011.1111 1110.1010
0xBF 0xEA
0x6B
0110.1011
1011.1111 1110.1011
0xBF 0xEB
0x6C
0110.1100
1011.1110 1110.1110
0xBE 0xEE
0x6D
0110.1101
1011.1110 1110.1111
0xBE 0xEF
0x6E
0110.1110
1011.1111 1110.1110
0xBF 0xEE
0x6F
0110.1111
1011.1111 1110.1111
0xBF 0xEF
0x70
0111.0000
1011.1010 1111.1010
0xBA 0xFA
0x71
0111.0001
1011.1010 1111.1011
0xBA 0xFB
0x72
0111.0010
1011.1011 1111.1010
0xBB 0xFA
0x73
0111.0011
1011.1011 1111.1011
0xBB 0xFB
0x74
0111.0100
1011.1010 1111.1110
0xBA 0xFE
0x75
0111.0101
1011.1010 1111.1111
0xBA 0xFF
0x76
0111.0110
1011.1011 1111.1110
0xBB 0xFE
0x77
0111.0111
1011.1011 1111.1111
0xBB 0xFF
0x78
0111.1000
1011.1110 1111.1010
0xBE 0xFA
0x79
0111.1001
1011.1110 1111.1011
0xBE 0xFB
0x7A
0111.1010
1011.1111 1111.1010
0xBF 0xFA
0x7B
0111.1011
1011.1111 1111.1011
0xBF 0xFB
0x7C
0111.1100
1011.1110 1111.1110
0xBE 0xFE
0x7D
0111.1101
1011.1110 1111.1111
0xBE 0xFF
0x7E
0111.1110
1011.1111 1111.1110
0xBF 0xFE
0x7F
0111.1111
1011.1111 1111.1111
0xBF 0xFF
Value
Code
hex
bin
bin
hex
0x80
1000.0000
1110.1010 1010.1010
0xEA 0xAA
0x81
1000.0001
1110.1010 1010.1011
0xEA 0xAB
0x82
1000.0010
1110.1011 1010.1010
0xEB 0xAA
0x83
1000.0011
1110.1011 1010.1011
0xEB 0xAB
0x84
1000.0100
1110.1010 1010.1110
0xEA 0xAE
0x85
1000.0101
1110.1010 1010.1111
0xEA 0xAF
0x86
1000.0110
1110.1011 1010.1110
0xEB 0xAE
0x87
1000.0111
1110.1011 1010.1111
0xEB 0xAF
0x88
1000.1000
1110.1110 1010.1010
0xEE 0xAA
0x89
1000.1001
1110.1110 1010.1011
0xEE 0xAB
0x8A
1000.1010
1110.1111 1010.1010
0xEF 0xAA
0x8B
1000.1011
1110.1111 1010.1011
0xEF 0xAB
0x8C
1000.1100
1110.1110 1010.1110
0xEE 0xAE
0x8D
1000.1101
1110.1110 1010.1111
0xEE 0xAF
0x8E
1000.1110
1110.1111 1010.1110
0xEF 0xAE
0x8F
1000.1111
1110.1111 1010.1111
0xEF 0xAF
0x90
1001.0000
1110.1010 1011.1010
0xEA 0xBA
0x91
1001.0001
1110.1010 1011.1011
0xEA 0xBB
0x92
1001.0010
1110.1011 1011.1010
0xEB 0xBA
0x93
1001.0011
1110.1011 1011.1011
0xEB 0xBB
0x94
1001.0100
1110.1010 1011.1110
0xEA 0xBE
0x95
1001.0101
1110.1010 1011.1111
0xEA 0xBF
0x96
1001.0110
1110.1011 1011.1110
0xEB 0xBE
0x97
1001.0111
1110.1011 1011.1111
0xEB 0xBF
0x98
1001.1000
1110.1110 1011.1010
0xEE 0xBA
0x99
1001.1001
1110.1110 1011.1011
0xEE 0xBB
0x9A
1001.1010
1110.1111 1011.1010
0xEF 0xBA
0x9B
1001.1011
1110.1111 1011.1011
0xEF 0xBB
0x9C
1001.1100
1110.1110 1011.1110
0xEE 0xBE
0x9D
1001.1101
1110.1110 1011.1111
0xEE 0xBF
0x9E
1001.1110
1110.1111 1011.1110
0xEF 0xBE
0x9F
1001.1111
1110.1111 1011.1111
0xEF 0xBF
0xA0
1010.0000
1111.1010 1010.1010
0xFA 0xAA
0xA1
1010.0001
1111.1010 1010.1011
0xFA 0xAB
0xA2
1010.0010
1111.1011 1010.1010
0xFB 0xAA
0xA3
1010.0011
1111.1011 1010.1011
0xFB 0xAB
0xA4
1010.0100
1111.1010 1010.1110
0xFA 0xAE
0xA5
1010.0101
1111.1010 1010.1111
0xFA 0xAF
0xA6
1010.0110
1111.1011 1010.1110
0xFB 0xAE
0xA7
1010.0111
1111.1011 1010.1111
0xFB 0xAF
0xA8
1010.1000
1111.1110 1010.1010
0xFE 0xAA
0xA9
1010.1001
1111.1110 1010.1011
0xFE 0xAB
0xAA
1010.1010
1111.1111 1010.1010
0xFF 0xAA
0xAB
1010.1011
1111.1111 1010.1011
0xFF 0xAB
0xAC
1010.1100
1111.1110 1010.1110
0xFE 0xAE
0xAD
1010.1101
1111.1110 1010.1111
0xFE 0xAF
0xAE
1010.1110
1111.1111 1010.1110
0xFF 0xAE
0xAF
1010.1111
1111.1111 1010.1111
0xFF 0xAF
0xB0
1011.0000
1111.1010 1011.1010
0xFA 0xBA
0xB1
1011.0001
1111.1010 1011.1011
0xFA 0xBB
0xB2
1011.0010
1111.1011 1011.1010
0xFB 0xBA
0xB3
1011.0011
1111.1011 1011.1011
0xFB 0xBB
0xB4
1011.0100
1111.1010 1011.1110
0xFA 0xBE
0xB5
1011.0101
1111.1010 1011.1111
0xFA 0xBF
0xB6
1011.0110
1111.1011 1011.1110
0xFB 0xBE
0xB7
1011.0111
1111.1011 1011.1111
0xFB 0xBF
0xB8
1011.1000
1111.1110 1011.1010
0xFE 0xBA
0xB9
1011.1001
1111.1110 1011.1011
0xFE 0xBB
0xBA
1011.1010
1111.1111 1011.1010
0xFF 0xBA
0xBB
1011.1011
1111.1111 1011.1011
0xFF 0xBB
0xBC
1011.1100
1111.1110 1011.1110
0xFE 0xBE
0xBD
1011.1101
1111.1110 1011.1111
0xFE 0xBF
0xBE
1011.1110
1111.1111 1011.1110
0xFF 0xBE
0xBF
1011.1111
1111.1111 1011.1111
0xFF 0xBF
Value
Code
hex
bin
bin
hex
0xC0
1100.0000
1110.1010 1110.1010
0xEA 0xEA
0xC1
1100.0001
1110.1010 1110.1011
0xEA 0xEB
0xC2
1100.0010
1110.1011 1110.1010
0xEB 0xEA
0xC3
1100.0011
1110.1011 1110.1011
0xEB 0xEB
0xC4
1100.0100
1110.1010 1110.1110
0xEA 0xEE
0xC5
1100.0101
1110.1010 1110.1111
0xEA 0xEF
0xC6
1100.0110
1110.1011 1110.1110
0xEB 0xEE
0xC7
1100.0111
1110.1011 1110.1111
0xEB 0xEF
0xC8
1100.1000
1110.1110 1110.1010
0xEE 0xEA
0xC9
1100.1001
1110.1110 1110.1011
0xEE 0xEB
0xCA
1100.1010
1110.1111 1110.1010
0xEF 0xEA
0xCB
1100.1011
1110.1111 1110.1011
0xEF 0xEB
0xCC
1100.1100
1110.1110 1110.1110
0xEE 0xEE
0xCD
1100.1101
1110.1110 1110.1111
0xEE 0xEF
0xCE
1100.1110
1110.1111 1110.1110
0xEF 0xEE
0xCF
1100.1111
1110.1111 1110.1111
0xEF 0xEF
0xD0
1101.0000
1110.1010 1111.1010
0xEA 0xFA
0xD1
1101.0001
1110.1010 1111.1011
0xEA 0xFB
0xD2
1101.0010
1110.1011 1111.1010
0xEB 0xFA
0xD3
1101.0011
1110.1011 1111.1011
0xEB 0xFB
0xD4
1101.0100
1110.1010 1111.1110
0xEA 0xFE
0xD5
1101.0101
1110.1010 1111.1111
0xEA 0xFF
0xD6
1101.0110
1110.1011 1111.1110
0xEB 0xFE
0xD7
1101.0111
1110.1011 1111.1111
0xEB 0xFF
0xD8
1101.1000
1110.1110 1111.1010
0xEE 0xFA
0xD9
1101.1001
1110.1110 1111.1011
0xEE 0xFB
0xDA
1101.1010
1110.1111 1111.1010
0xEF 0xFA
0xDB
1101.1011
1110.1111 1111.1011
0xEF 0xFB
0xDC
1101.1100
1110.1110 1111.1110
0xEE 0xFE
0xDD
1101.1101
1110.1110 1111.1111
0xEE 0xFF
0xDE
1101.1110
1110.1111 1111.1110
0xEF 0xFE
0xDF
1101.1111
1110.1111 1111.1111
0xEF 0xFF
0xE0
1110.0000
1111.1010 1110.1010
0xFA 0xEA
0xE1
1110.0001
1111.1010 1110.1011
0xFA 0xEB
0xE2
1110.0010
1111.1011 1110.1010
0xFB 0xEA
0xE3
1110.0011
1111.1011 1110.1011
0xFB 0xEB
0xE4
1110.0100
1111.1010 1110.1110
0xFA 0xEE
0xE5
1110.0101
1111.1010 1110.1111
0xFA 0xEF
0xE6
1110.0110
1111.1011 1110.1110
0xFB 0xEE
0xE7
1110.0111
1111.1011 1110.1111
0xFB 0xEF
0xE8
1110.1000
1111.1110 1110.1010
0xFE 0xEA
0xE9
1110.1001
1111.1110 1110.1011
0xFE 0xEB
0xEA
1110.1010
1111.1111 1110.1010
0xFF 0xEA
0xEB
1110.1011
1111.1111 1110.1011
0xFF 0xEB
0xEC
1110.1100
1111.1110 1110.1110
0xFE 0xEE
0xED
1110.1101
1111.1110 1110.1111
0xFE 0xEF
0xEE
1110.1110
1111.1111 1110.1110
0xFF 0xEE
0xEF
1110.1111
1111.1111 1110.1111
0xFF 0xEF
0xF0
1111.0000
1111.1010 1111.1010
0xFA 0xFA
0xF1
1111.0001
1111.1010 1111.1011
0xFA 0xFB
0xF2
1111.0010
1111.1011 1111.1010
0xFB 0xFA
0xF3
1111.0011
1111.1011 1111.1011
0xFB 0xFB
0xF4
1111.0100
1111.1010 1111.1110
0xFA 0xFE
0xF5
1111.0101
1111.1010 1111.1111
0xFA 0xFF
0xF6
1111.0110
1111.1011 1111.1110
0xFB 0xFE
0xF7
1111.0111
1111.1011 1111.1111
0xFB 0xFF
0xF8
1111.1000
1111.1110 1111.1010
0xFE 0xFA
0xF9
1111.1001
1111.1110 1111.1011
0xFE 0xFB
0xFA
1111.1010
1111.1111 1111.1010
0xFF 0xFA
0xFB
1111.1011
1111.1111 1111.1011
0xFF 0xFB
0xFC
1111.1100
1111.1110 1111.1110
0xFE 0xFE
0xFD
1111.1101
1111.1110 1111.1111
0xFE 0xFF
0xFE
1111.1110
1111.1111 1111.1110
0xFF 0xFE
0xFF
1111.1111
1111.1111 1111.1111
0xFF 0xFF
Close to a month prior to the shipment of the disk drive in spring 1978, Wozniak realized that a more complex encoding scheme would allow each eight-bit byte on disk to hold five bits of useful data rather than four bits. This is because there are 34 bytes which have the top bit set and no two zero bits in a row. This encoding scheme became known as 5-and-3 encoding, and allowed 13 sectors per track; it was used for Apple DOS 3.1, 3.2, and 3.2.1, as well as for the earliest version of Apple CP/M[de]:
5-and-3 encoding table
5-bit value
GCR code
hex
bin
bin
hex
0x00
0.0000
1010.1011
0xAB
0x01
0.0001
1010.1101
0xAD
0x02
0.0010
1010.1110
0xAE
0x03
0.0011
1010.1111
0xAF
0x04
0.0100
1011.0101
0xB5
0x05
0.0101
1011.0110
0xB6
0x06
0.0110
1011.0111
0xB7
0x07
0.0111
1011.1010
0xBA
0x08
0.1000
1011.1011
0xBB
0x09
0.1001
1011.1101
0xBD
0x0A
0.1010
1011.1110
0xBE
0x0B
0.1011
1011.1111
0xBF
0x0C
0.1100
1101.0110
0xD6
0x0D
0.1101
1101.0111
0xD7
0x0E
0.1110
1101.1010
0xDA
0x0F
0.1111
1101.1011
0xDB
5-bit value
GCR code
hex
bin
bin
hex
0x10
1.0000
1101.1101
0xDD
0x11
1.0001
1101.1110
0xDE
0x12
1.0010
1101.1111
0xDF
0x13
1.0011
1110.1010
0xEA
0x14
1.0100
1110.1011
0xEB
0x15
1.0101
1110.1101
0xED
0x16
1.0110
1110.1110
0xEE
0x17
1.0111
1110.1111
0xEF
0x18
1.1000
1111.0101
0xF5
0x19
1.1001
1111.0110
0xF6
0x1A
1.1010
1111.0111
0xF7
0x1B
1.1011
1111.1010
0xFA
0x1C
1.1100
1111.1011
0xFB
0x1D
1.1101
1111.1101
0xFD
0x1E
1.1110
1111.1110
0xFE
0x1F
1.1111
1111.1111
0xFF
Reserved GCR-codes: 0xAA and 0xD5.
Wozniak called the system "my most incredible experience at Apple and the finest job I did".
Later, the design of the floppy drive controller was modified to allow a byte on disk to contain up to one pair of zero bits in a row. This allowed each eight-bit byte to hold six bits of useful data, and allowed 16 sectors per track. This scheme is known as 6-and-2 encoding, and was used on Apple Pascal, Apple DOS 3.3 and ProDOS, and later with Apple FileWare drives in the Apple Lisa and the 400K and 800K 3½-inch disks on the Macintosh and Apple II. Apple did not originally call this scheme "GCR", but the term was later applied to it to distinguish it from IBM PC floppies which used the MFM encoding scheme.
6-and-2 encoding table
6-bit value
GCR code
hex
bin
bin
hex
0x00
00.0000
1001.0110
0x96
0x01
00.0001
1001.0111
0x97
0x02
00.0010
1001.1010
0x9A
0x03
00.0011
1001.1011
0x9B
0x04
00.0100
1001.1101
0x9D
0x05
00.0101
1001.1110
0x9E
0x06
00.0110
1001.1111
0x9F
0x07
00.0111
1010.0110
0xA6
0x08
00.1000
1010.0111
0xA7
0x09
00.1001
1010.1011
0xAB
0x0A
00.1010
1010.1100
0xAC
0x0B
00.1011
1010.1101
0xAD
0x0C
00.1100
1010.1110
0xAE
0x0D
00.1101
1010.1111
0xAF
0x0E
00.1110
1011.0010
0xB2
0x0F
00.1111
1011.0011
0xB3
6-bit value
GCR code
hex
bin
bin
hex
0x10
01.0000
1011.0100
0xB4
0x11
01.0001
1011.0101
0xB5
0x12
01.0010
1011.0110
0xB6
0x13
01.0011
1011.0111
0xB7
0x14
01.0100
1011.1001
0xB9
0x15
01.0101
1011.1010
0xBA
0x16
01.0110
1011.1011
0xBB
0x17
01.0111
1011.1100
0xBC
0x18
01.1000
1011.1101
0xBD
0x19
01.1001
1011.1110
0xBE
0x1A
01.1010
1011.1111
0xBF
0x1B
01.1011
1100.1011
0xCB
0x1C
01.1100
1100.1101
0xCD
0x1D
01.1101
1100.1110
0xCE
0x1E
01.1110
1100.1111
0xCF
0x1F
01.1111
1101.0011
0xD3
6-bit value
GCR code
hex
bin
bin
hex
0x20
10.0000
1101.0110
0xD6
0x21
10.0001
1101.0111
0xD7
0x22
10.0010
1101.1001
0xD9
0x23
10.0011
1101.1010
0xDA
0x24
10.0100
1101.1011
0xDB
0x25
10.0101
1101.1100
0xDC
0x26
10.0110
1101.1101
0xDD
0x27
10.0111
1101.1110
0xDE
0x28
10.1000
1101.1111
0xDF
0x29
10.1001
1110.0101
0xE5
0x2A
10.1010
1110.0110
0xE6
0x2B
10.1011
1110.0111
0xE7
0x2C
10.1100
1110.1001
0xE9
0x2D
10.1101
1110.1010
0xEA
0x2E
10.1110
1110.1011
0xEB
0x2F
10.1111
1110.1100
0xEC
6-bit value
GCR code
hex
bin
bin
hex
0x30
11.0000
1110.1101
0xED
0x31
11.0001
1110.1110
0xEE
0x32
11.0010
1110.1111
0xEF
0x33
11.0011
1111.0010
0xF2
0x34
11.0100
1111.0011
0xF3
0x35
11.0101
1111.0100
0xF4
0x36
11.0110
1111.0101
0xF5
0x37
11.0111
1111.0110
0xF6
0x38
11.1000
1111.0111
0xF7
0x39
11.1001
1111.1001
0xF9
0x3A
11.1010
1111.1010
0xFA
0x3B
11.1011
1111.1011
0xFB
0x3C
11.1100
1111.1100
0xFC
0x3D
11.1101
1111.1101
0xFD
0x3E
11.1110
1111.1110
0xFE
0x3F
11.1111
1111.1111
0xFF
Reserved GCR-codes: 0xAA and 0xD5.
Commodore
Independently, Commodore Business Machines (CBM) created a group coded recording scheme for their Commodore 2040 floppy disk drive (launched in the spring of 1979). The relevant constraints on the 2040 drive were that no more than two zero bits could occur in a row; the drive imposed no special constraint on the first bit in a byte. This allowed the use of a scheme similar to that used in 6250bpi tape drives. Every four bits of data are translated into five bits on disk, using the same 5-bit codes as IBM to ensure there are never more than two zero bits in a row, but in a different order:
4-bit value
GCR code
hex
bin
bin
hex
0x0
0000
0.1010
0x0A
0x1
0001
0.1011
0x0B
0x2
0010
1.0010
0x12
0x3
0011
1.0011
0x13
0x4
0100
0.1110
0x0E
0x5
0101
0.1111
0x0F
0x6
0110
1.0110
0x16
0x7
0111
1.0111
0x17
4-bit value
GCR code
hex
bin
bin
hex
0x8
1000
0.1001
0x09
0x9
1001
1.1001
0x19
0xA
1010
1.1010
0x1A
0xB
1011
1.1011
0x1B
0xC
1100
0.1101
0x0D
0xD
1101
1.1101
0x1D
0xE
1110
1.1110
0x1E
0xF
1111
1.0101
0x15
Like the IBM code, at most eight one bits in a row are possible, so Commodore used sequences of ten or more one bits in a row as a synchronization sequence.
This more efficient GCR scheme, combined with an approach at constant bit-density recording by gradually increasing the clock rate (zone constant angular velocity, ZCAV) and storing more physical sectors on the outer tracks than on the inner ones (zone bit recording, ZBR), enabled Commodore to fit 170KiB on a standard single-sided single-density 5.25-inch floppy, where Apple fit 140KiB (with 6-and-2 encoding) or 114KiB (with 5-and-3 encoding) and an FM-encoded floppy held only 88KiB.
Sirius/Victor
Similar, the 5.25-inch floppy drives of the Victor9000 aka Sirius1, designed by Chuck Peddle in 1981/1982, used a combination of GCR and zone bit recording by gradually decreasing a drive's rotational speed for the outer tracks in nine zones while increasing the number of sectors per track to achieve formatted capacities of 606KiB (single sided) / 1188KiB (double-sided) on 96 tpi media. The GCR code is identical to the Commodore one.
Brother
Starting around 1985, Brother introduced a family of dedicated word processor typewriters with integrated 3.5-inch 38-track diskette drive. Early models of the WP and LW series[de] used a Brother-specific group-coded recording scheme with twelve 256-byte sectors to store up to 120KB on single-sided and up to 240KB on double-sided double-density (DD) diskettes. Reportedly, prototypes were already shown at the Internationale Funkausstellung 1979 (IFA) in Berlin.
Sharp
In 1986, Sharp introduced a turnable 2.5-inch pocket disk drive solution (drives: CE-1600F, CE-140F; internally based on the FDU-250 chassis; media: CE-1650F) for their series of pocket computers with a formatted capacity of 62464 bytes per side (2× 64kB nominal, 16 tracks, 8 sectors/track, 512bytes per sector, 48 tpi, 250kbit/s, 270rpm) with GCR (4/5) recording.
Other uses
GCR was also evaluated for a possible use in bar code encoding schemes (packing efficiency, timing tolerances, amount of storage bytes for timing information, and DC output level).
See also
4B5B, another rate-4/5 code, but with looser (0,3) RLL constraints
KryoFlux (a special diskette controller able to read some GCR formats)
Notes
↑The product flyer for the Durango 800 series documents a formatted "on-line capacity" of 1.892MB for the diskette drives. The system, however, was equipped with two 5¼-inch Micropolis100 tpi 77-track floppy drives by default, and 1.892MB is about twice as large as the physical drive capacity documented in various other sources (480KB per side), therefore, by "on-line capacity" they must have meant the available storage capacity available to users for the combination of two drives.
↑The sources give slightly contradicting parameters regarding the Brother diskette formats. 12 sectors á 256 bytes would give 120KB per side on a 40-track drive, but one source claims the drives were 38-track only.
12The following Brother models are known to support a 120KB diskette format (incomplete list): WP-1 (1985/1987), WP-5 (1987/1989), WP-6 (1989), WP-55 (1987/1989), WP-500 (1987/1989). The following models are known to support a 240KB format (incomplete list): WP-70, WP-75 (1989), WP-80 (1985/1989), WP-3400, WP-3410, WP-3550, WP-3650D, WP-760D, WP-760D+, LW-1 (1989), LW-20, LW-30, LW-100, LW-400.
References
1234CW staff (1973-03-14). "6,250 Byte/In. Density – IBM 3420 Storage More Than Tripled". Computerworld. VII (11). White Plains, New York, USA: 1–2. Retrieved 2017-03-23. IBM added three new models to the 3420 magnetic tape system than can record data at the "densest recording capability yet offered", according to the company. Using a new method called Group Coded Recording (GCR), the IBM drives can handle tapes containing a data density of 6,250 byte/in. compared with 1,600 byte/in. on earlier models of the 3420. [...] An upgraded control unit was also announced – the 3803 Model 2 – which operates with both the earlier and latest 3420 tape units. The Model 2 includes the capability of correcting errors in one or two tracks "simultaneously while the tape is in motion", IBM said. [...] The GCR method segments data written on tape into groups of characters to which a special coding character is added. And the higher density is based on a combination of a modified coding scheme, a smaller interrecord gap (called an interblock gap) and modified electronics and electromechanical components, IBM said. Installed 3803/3420 tape systems can be converted to the higher densities in the field. [...]
12345678Patel, Arvind Motibhai (1988). "5. Signal and Error-Control Coding". In Mee, C. Denis; Daniel, Eric D. (eds.). Magnetic Recording. Vol.II: Computer Data Storage (1sted.). McGraw-Hill Book Company. ISBN0-07-041272-3.
↑"The Gallery of Old Iron". 2004. Archived from the original on 2008-12-25. [...] I moved to the lab at Poughkeepsie in 1958 [...] I later was Lead designer and architect for the 2802 Tape Control Unit and a few years after that, Lead Designer and Architect of the 3803 which was a very large modification based on the 2802. Three of us shared a Corporate Award for the 3803 and I, along with Planner Charlie Von Reyn, came up with the name "Group Coded Recording (GCR)" as the name of the recording method. [...] (NB. An anonymous comment by one of the developers on the origin of the name "Group Coded Recording".)
↑US 4261019,McClelland, S. Barry,"Compatible Digital Magnetic Recording System",published 1981-04-07, assigned to Micropolis Corporation (NB. Application Number: US 06/098381)
12"NCC Preview: OEMs at NCC – Micropolis Corp". Computerworld. XII (22). CW Communications, Inc.: P/50. 1978-05-28. Retrieved 2017-06-12. [...] Micropolis has extended the capacity of 5.25-in. floppy disk subsystems via double-sided models with formatted file storage of up to nearly 2 million bytes [...] The Megafloppy series also features an intelligent controller that facilitates interconnection of four subsystems to a common host interface for a total on-line storage capacity of more than 15M bytes [...] Double-sided versions of the product line will be implemented first in two OEM series – Model 1015 and Model 1055 [...] The Model 1015 is an unpackaged drive designed for the manufacturer who integrates floppy disk storage into his own system enclosure. A range of storage capacities from 143,000 to 630,000 bytes per drive is available [...] Model 1015 customers have the option of using the Micropolis intelligent controller and Group Code Recording (GCR) method to further expand file space up to 946,000 bytes [...] Offering GCR and a microprocessor-based controller as standard features, the Model 1055 5.25-in. floppy has four soft-sectored formats for each of its 77 tracks, yielding a maximum capacity of 1,892,000 bytes of file space on its double-sided version [...] An add-on module available for the 1055 is comprised of two read/write heads and two drives, sharing a common controller. The subsystem capacity (formatted) with the module is 3,784,000 bytes [...] Up to four 1055s, each with an add-on module, can be daisy-chained to a common host for a maximum on-line storage capacity of more than 15M bytes [...]
↑"InfoNews/Hardware: Hardware/Briefs". InfoWorld. 2 (2): 19. 1980-03-03. Retrieved 2017-06-12. [...] Four new 96 tracks-per-inch products have been added to Micropolis' current line of 100 tpi single-sided and double-sided floppy disks. The 96 tpi drives offer 70 tracks-per-side, as opposed to the 77 offered by the MegaFloppy line. The four models are: 1) The 1015-V: 436KB, unformatted, FM/MFM recording [...] 2) The 1016-V: 532KB unformatted, Group Coded Recording (GCR) [...] 3) The 1015-VI: a two-head version of the MFM drive, 872KB [...] 4) The 1016-VI: also a two-head drive, 1.064 MB GCR encoding [...]
123Guzis, Charles "Chuck" P. (2015-09-20). "Multi-platform distribution format". Sydex. Archived from the original on 2017-06-14. Retrieved 2017-06-14. [...] At the same time Micropolis was working a 5.25" drive that could hold about as much as an 8", using some tricks. The Micropolis drive was 100 tpi, 77 track and, by using GCR, could hold 12 512-byte sectors per track. That's 462KiB. This was about 1977–78. [...] The [...] drive and controller implementation (ours was done by a guy we'd recruited from Sperry ISS) was [...] complex and expensive [...] Brother WP disks [...] are 38 track, single-sided, Brother-encoded GCR that hold [...] 120K on 2D floppies. [...]
↑Allen, David (February 1978). "A Minifloppy Interface"(PDF). BYTE. 3 (2). Kansas City, USA: 114, 116–118, 120, 122, 134–125. Archived from the original(PDF) on 2017-06-14. Retrieved 2017-06-14. [...] Of the alternative codes used to achieve double density, GCR (Group Coded Recording) looks quite attractive. Micro Peripherals Inc has implemented double density using GCR in a full size floppy disk and controller system currently being marketed. [...] GCR is nothing more than the old standby NRZ with its attendant advantages, but, since ordinary NRZ has no clocking information and a potentially high DC content during long strings of ones or zeros, the data is reformatted to eliminate the long strings. The reformatting converts each four bit group of original data into five bits of group coded data; the five bits in the encoded version will always have a mix of ones and zeros, even if the real data is all in one state. Reformatting in GCR can be accomplished in software, as opposed to MFM, etc, which almost unavoidably must be encoded and decoded in hardware. Thus, GCR has good possibilities as a low cost, high reliability scheme for achieving double density. [...]
↑"Supplemental Technical Reference Material". Revision 0 (1st printinged.). Scotts Valley, CA, USA: Victor Publications. 1983-03-23. Application Note: 002. [...] Single-sided floppy drive offers 80tracks at 96 TPI [...] Double-sided floppy drive offers 160 tracks at 96TPI [...] Floppy drives have 512byte sectors; utilising a GCR, 10-bit recording technique. [...] Although the Victor 9000 uses 51/4-inch minifloppies of a similar type to those used in other computers, the floppy disks themselves are not readable on other machines, nor can the Victor 9000 read a disk from another manufacturers machine. The Victor 9000 uses a unique recording method to allow the data to be packed as densely as 600kbytes on a single-sided single-density minifloppy; this recording method involves the regulation of the speed at which the floppy rotates, explaining the fact that the noise from the drive sometimes changes frequency.
↑"Chapter 7. Disk Drive Assembly". Victor 9000 Technical Reference Manual(PDF). Victor Business Products, Inc. June 1982. pp.7–1..7–9. 710620. Archived(PDF) from the original on 2017-03-23. Retrieved 2017-03-23. [...] Track density is 96 tracks per inch, and recording density is maintained at approximately 8000 bits per inch on all tracks. [...] The VICTOR 9000 uses an encoding technique called group code recording (GCR) to convert the data from internal representation to an acceptable form. GCR converts each (4-bit) nibble into a 5-bit code that guarantees a recording pattern that never has more than two zeros together. Then data is recorded on the disk by causing a flux reversal for each "one" bit and no flux reversal for each "zero" bit. [...]
↑Gieseke, Hans-Werner (2003-08-27). "Brother WP-1" (in German). Archived from the original on 2017-06-14. Retrieved 2017-06-14. (NB. Reportedly, the Brother WP-1 technical data was derived from page 109 of the user manual.)
↑French, Mick (2002-09-13). "Brother WP-6". Archived from the original on 2017-11-22. Retrieved 2017-06-14. [...] The 3.5" 240Kb disk drive is a single head Brother part no.13194989 and is connected with a 15 pin ribbon. [...] it initializes (formats) the disk to a capacity of 236.5Kb. [...]
↑Cotgrove, Michael S. (2009-02-26). "archaic floppy disc format". Retrieved 2017-06-14. [...] There were several 3.5" Brother disks that are completely nonstandard. [...] One had 1296 byte sectors and another had 12 x 256 byte GCR sectors [...]
↑"Model CE-1600F". Sharp PC-1600 Service Manual(PDF). Yamatokoriyama, Japan: Sharp Corporation, Information Systems Group, Quality & Reliability Control Center. July 1986. pp.98–104. Archived(PDF) from the original on 2017-05-07. Retrieved 2017-03-23. GCR is an abbreviation of Group Coded Recording. A single byte, 8 bits, data are divided into two 4-bit data which is also converted onto a 5-bit data. Thus, a single byte (8 bits) is recorded on the media as a 10-bit data.
ANSIINCITS 40-1993 (R2003) Unrecorded Magnetic Tape for Information Interchange (9-track, 800bpi, NRZI; 1600bpi, PE; and 6250bpi, GCR)
ANSI INCITS 54-1986 (R2002) Recorded Magnetic Tape for Information Interchange (6250bpi, GCR)
Sallet, Herbert W. (July 1977). "Magnetic tape: A high performer: Magnetic tape has evolved into a highly effective medium for high-density and low-cost-per-bit data recording". IEEE Spectrum. 14 (7): 26–31. doi:10.1109/MSPEC.1977.6501525.
Hsiao, (Ben) M. Y.; Carter, William C.; Thomas, James W.; Stringfellow, William R. (September 1981). "Reliability, Availability, and Serviceability of IBM Computer Systems". IBM Journal of Research and Development. 25 (5): 462. doi:10.1147/rd.255.0453. (NB. Mentions the 5/4 RLL code used on 6250bpi tape drives.)
US 3685033,Agrawala, Ashok K.&Srivastava, Keshava,"Block encoding for magnetic recording systems",published 1972-08-15, assigned to Honeywell Inc. (NB. Application No: US 66199. See also: CA993998A, CA993998A1, DE2142428A1)
US 4564941,Woolley, Richard N.; Glover, Neal& Williams, Richard,"Error detection system",published 1986-01-14, assigned to Apple Computer, Inc. (NB. Application Number: US 06/559210. See also: CA1208794A, CA1208794A1, DE3443272A1, DE3443272C2)
Irwin, John W.; Cassie, John V.; Oppeboen, Harlyn C. (September 1971) [1970-12-11]. "The IBM 3803/3420 Magnetic Tape Subsystem". IBM Journal of Research and Development. IBM: 391–400.