Patent GB-1336824-A (GB)
Title: Data processing apparatus
IPC: H03M7/40
Filed: 1972-04-14
Abstract: 1336824 Coding INTERNATIONAL BUSINESS MACHINES CORP 14 April 1972 [7 June 1971] 17256/72 Heading G4C Incoming bit strings of variable length are encoded into variable length code words, each terminating in a selected one of a plurality of predefined word ending bit sequences, the ratio between the lengths of the incoming bit strings and encoded data words being fixed. To decode the data back into its form it is examined for the word ending bit sequences to derive the length of the code word so that the length of the bit string may be determined. Encoding.-In the embodiment of the Figs. 1A and 1B incoming data words of maximum length L are encoded into words of maximum length W (where the ratio of encoded bits to original bits is N/a where N and a are least integers) of the type in which successive "1" bits are separated by no less than d and no more than k zeros. The encoding is controlled by a train of single shots generating clock pulses E1-E17. At E1 a length counter 34 is preset via gate 46 to a count of Pulses E2, E3 and E4 are then repetitively generated to (1) shift the data in input register 30, (2) enter a new bit of data into the register 30 and decrement counter 34 and (3) check whether counter 34 is zero. When the count is at zero gate 60 enables a single shot to generate pulse E5 which sets all match indicators in an associative memory 20 (comprising three state elements) to their "1" state, a search being carried out during pulse E6 for the word in section 24 of memory 20 matching the word in the register 30. At pulse E7 a read pulse is applied to the match indicators which results in the word in section 22 of memory 20 associated with the matched word in section 24 being read out via gate 104 to register 32, the length of the original word being simultaneously read into counter 34 via gate 106. To read out the data from the register 32 at pulse E8 counter 38 is set to a and counter 36 is set to N. During pulses E9 and E10 the contents of register 30 are shifted and new data entered, counters 34 and 38 being decremented for each new input bit, this process being repeated until counter 38 is at zero. Simultaneously, at pulses E12 and E13 data is gated out of register 32, the remaining data being shifted, and counter 36 being decremented, this process being repeated until counter 36 is at zero. At pulse E15 a check is made on whether counter 34 is at zero and, if not, at pulse E16 counters 38 and 36 are reset to a and N. When counter 34 is at zero a test is initiated at pulse E17 to determine if the final word has been encoded. Each message ends in a recognizable end of record (EOR) representation. This results in an EOR code being read out of register 32 and detected to set a bistable 44 to its "1" state to give an "end of message" indication. Otherwise the clock pulse E5 is generated to process the new data in register 30. Decoding.-Initially a number of bits W corresponding to the maximum in a code word is entered into input register 200 where framing logic 202 operates to determine the length of the encoded word. If, for example, for codes with a maximum length of 9 bits and not less than 1 and not more than 8 zeros between successive "1" bits if the digit in position 7 of register 200 is "0" and either positions 8 or 9 have a "1" bit, an AND gate (210, Fig. 8, not shown) is triggered to generate a signal A indicating that the code word is of three bits. If there is a "0" in position 4 and a "1" in any of positions 5-7 a gate (214) is enabled to generate a signal B indicating that the code word is of 6 bits. If neither signal A or B is generated the word is assumed to be of 9 bits and if both signals A and B are generated an error has occurred and the code word is assumed to be of only 3 bits. Decoding is similarly controlled by a train of single shots generating clock pulses D1-D13. At pulse D1 N is entered into counter 38, α into counter 36 and counter 34 is set to α/N multiplied by the length detected by framing logic. At pulse D2 the W bits of input register 200 are entered into decoding register 204, the match indicators in memory 20 being simultaneously set to their "1" state. At pulse D3 a search operation of the memory 20 is initiated so that at pulse D4 when the match indicators are read the corresponding decoded word is read via gate 264 into decoding register 206. If no circuit generates a match a dummy word is read out consisting of zeros. Clock pulses D5-D7 and D8-D12 occur concurrently and result in N bits being read in to register 200 for every α bits read out of register 206, length counter 34 being simultaneously decremented. This process is repeated until counter 34 is at zero when a check is made at pulse D13 to determine whether the end of message code has been fed out. If it has the resulting output of gate 324 terminates the operation. Otherwise the process is repeated from clock pulse D1.