Primary Examiner- Paul J. Henon Assistant Examiner-Melvin B. Chapnick Attorney-Craig, Antonelli, Stewart & Hill ABSTRACT: A logical shifting device having a plurality of levels, each of which includes a left shift logical unit, a no-shifi logical unit and a right shift logical unit interconnected by 103- icnl circuitry to as to permit a binary word input comprising N+l binary bits to be shifted left or right by up to N places. During shifting, a binary word passes once through each level and thus the time taken for a shifting operation is constant for all magnitudes of shift.

INVENTORS JOHN Sv BUCHAN, FRANK P. TURPIN This invention relates to improved logical shifting devices and methods of effecting a shifting operation on a binary word.

Shifting devices are used extensively in electronic computers in which a binary word comprises a plurality of binary bits. The shiftingdevices are sometimes located between two registers and are utilized to shift a word either left or right a required number of places, each place corresponding to one binary bit. However, an inherent property of some previous shifting devices is that the time taken for the binary word to pass through the shifting device is dependent on the number of places of shifi and this is, of course, a considerable disadvantage in some applications.

From one aspect of the present invention, it is an object to provide a shifting device in which the above-mentioned disad- V vantage is obviated or substantially reduced.

Accordingly, there is provided a logical shifting device capable of effecting a shifting operation to shift a binary word comprising (N-H) binary bits, up to N places left or right, including a plurality of logical units at a first level, a further plurality of logical units at least at one further level, and control means for activating a selected one logical unit at each level for each shifting operation of the logical shifting device so that the desired magnitude of shift is achieved and the respective portion of said binary word is passed through one logical unit at each level during the shiftingoperation, whereby the total time taken by the shifting operation is constant for all such shifting operations.

From another aspect of the present invention, it is an object to provide a method of effecting a shifting operation on a binary word in which the above-mentioned disadvantage is obviated or substantially reduced. I

According to this aspect, there is provided a method of effecting a shifting operation on a word, comprising (N+l) binary bits, to shift the word up to N places left or right including the steps of passing the binary word or respective portion thereof through one selected logical unit at a first level, passing the binary word or respective portion thereof through one selected logical unit at least at one further level, and selecting and activating said one selected logical unit at each level for each shifting operation so that the desired magnitude of shift is achieved and the total time taken by a shitting operation is constant for all such shifting operations, the binary. word or a respective portion thereof passing through one logical unit at each level.

One embodiment of the present invention will now be described, by way of example, with reference to the accompanying drawings in which:

FIG. I is a block diagrammatic representation of a shifting device according to the present invention;

FIG. 2 is made up of FIGS. 24, 2b, 2c, 2d, 2: and 2fand is a more detailed diagrammatic representation of the shifting device of FIG. I to show the logical wiring connections thereof; and

FIG. 3 illustrates the relative positions in which FIGS. 24:, 2b, 2c, 2d, 2: and 2] must be placed to form FIG. 2.

For the purposes of illustration, the logical device illustrated in FIGS. 1 and 2 is designed to handle a binary word comprising 16 binary bits, although it-will be appreciated that the in vention is equally applicable to any binary word. The device is so designed that it can effect a shift operation on the binary word by up to l5 places leftor right. As will be appreciated, a shift of IS places can be accomplished in four stages. for can ample, by shifting eight places in one stage, four places in a second stage, two places in a third stage, and one place of shift in a fourth stage. As will be clearfrom the description below, by means of suitable logical connections, the shifting device illustrated in FIG. 1 can be utilized to efl'ect any shifting operation on a l6 binary word up to [5 places left or right.

Referring to FIG. I, the logical shifting device comprises four levels, a first level I, a further level 2, a still further third level 3, and a fourth level 4. The first level 1 includes a'plurality of logical units, a logical unit 5 capable of effecting a shiftleft of eight places in a binary word, orportion thereof, applied to its input, a logical unit 6 which effects zero shift in an input word which thus appears at its output without a shift, and a logical unit 7 capable of effecting a shift-right of eight places in a binary word applied to its input. For simplicity, a shift-left of eight places is identified herein as a shift of 8" whilst a shift-right of eight places is identified +8 A binary word input to the logical units 5, 6 and 7 is provided by way of a logical input connection 8 which is, as will be seen from FIG. 2, a logical bus comprising 16 input wires. This logical connection 8 is, in turn, connected to the respective logical units by way of connections 9, l0 and It which are logically wired in a manner which will be explained below with reference to FIG. 2.

The second or further level 2 includes a further plurality of logical units, a shift-left "4" logical unit 12, a zero or no-shift logical unit 13, and a shin-right +4" logical unit 14. The third level 3 includes a shift-left 2" logical unit 15, a no-shift logical unit 16, and a shift-right +2 logical unit 17, whilst the fourth level 4 includes a shift-left "-1" logical unit 18, a no- 7 shift logical unit 19, and a shift-right +1 "logical unit 20.

Logical wiring connections are provided between the logical units shown in FIG. I and are identified generally by the numerals 21, 22 and 23, whilst the logical output connections from the various units l8, l9 and 20 are identified by the numerals 24, 25 and 26, these logical output connections being connected to a common logical output connection 27.

Control means (not shown) is also provided to activate, by way of control activating connections 28-39, those logical units, one at each level, which are required to produce the desired left or right shift in the binary word input. For example, if a magnitude of shift 10 places to the right is required, then the shift-right +8" logical unit 7 would be activated, as well as the no-shift unit 13, the shift-right +2" logical unit 17, and the no-shift unit 19. The total shift would then be a shift to the right having a magnitude +8+0+2+0 equals 10 places to the right, as required.

Similarly, referring to FIG. 1, if a shift-left of five places was required for the binary word input on connection 8, then the logical units which would be activated are the noshift unit 6. the shift-left "-4" logical unit 12, the no-shift logical unit 16, and the shift-left -l logical unit 18. Thus, the total shift would be 0-4+0l equals minus five places to the left.

From the above description with reference to FIG. 1, it will be clear that the control means activates a selected one of the logical units at each level for each shifting operation of the logical shifting device, no matter what the desired magnitude of shift up to the maximum of 15 places left or right. Thus, since the binary word or respective portion thereof passes always through one logical unit at each of the levels I, 2, 3 and 4, the total time taken by a shifting operation is constant for all the shifting operations for which the logical shifting device is designed.

The construction of the logical shifting device illustrated in FIG. 1 can be better understood by reference to FIG. 2 which comprises FIGS. 20, 2b, 2c, 2d, 2: and Zfarranged as in FIG. 3. For convenience, wherever possible, the same reference numerals have been used on like parts in FIG. 2 as were used in FIG. I.

Referring to FIG. 2, it will be seen that the logical units 5, 6, 7,12, 13,14, l5, 16, 17,18, 19 and 20 of FIG. 1 are shown in greater detail.

it should, first of all, be explained that a binary word is assumed to comprise to binary bits. If the binary word is to he passed through the logical shifting device without any shift being introduced, then obviously it must only pass through the logical units 6, 13, i6 and 19 of FIG. I, and therefore, these logical units must be capable of handling 16 binary bits in the binary word. Thus, referring to FIG. 2, it will be seen that the logical shifting unit 6 comprises I6 individual logical stages numbered 51-66, each of which is capable of handling one binary bit in the 16-bit binary word. Each of the logical stages 51 -66 is, in the present embodiment, a NAND gate having two-input connections, a first information input connection and a second control input connection, and a single output connection. By way of illustration. a logical symbol representing a NAND gate is indicated, in FIG. 2, on the logical stage 66. The circuit illustrated in FIG. 2 operates with positive logic, i.e. a binary l level is represented by plus 5 volts on any connection, whilst a binary level is represented by ground potential on any connection. A NAND gate, such as 66, comprises an AND gate followed by an inverter and therefore when a binary l" is applied to its information input and a positive potential to its control input connection, it will provide a zero binary "0" output voltage. Similarly, when the volta'ge potentials applied to inputs are unequal or are at zero, binary "0. then the output from the NAND gate will be at plus volts representing a binary l In other words, whenever a control voltage is applied to the control input potential of a NAND gate, the output of the NAND gate is opposite to its input, a binary 1" resulting in a binary 0" output and a binary "0" input resulting in a binary l output.

Referring to FIG. 2, it will be seen that the logical input connection I comprises 16 input wires, one to each logical stage 51 66. The respective control activating connection 29 is connected to each of the logical stages 51 66 to comprise the second or control input thereto. For identification purposes, the control activating connection 29 has been labeled INS-i.

The no shitt logical units 13, 16 and 19 are identical to the logical unit 6 and each comprises 16 NAND gates as illustrated in 0, block diagrammatic form in FIG. 2. The logical wiring connections between the different logical units are clearly illustrated in FIG. 2 and if a binary number appears at the input connection 8 and requires no shift, then it will be seen that by activating the control activating connections 29, 32, 35 and 38, the binary word input may be passed straight through the logical device without any shift being introduced. The logical wiring used can be simply traced from FIG. 2, from whence it will be seen that the common logical output connection 27 comprises 16 output wires, each connected to the output of a different one of the logical stages comprising the logical unit 19. For identification purposes, the control activating connections 32, 35 and 38 have been labeled NS."

The described embodiment of the present invention has been designed to handle 16-bit binary words in which the least significant digit (bit) is on the right and the most significant digit on the left.

The logical unit 5 is identified as the shift left "-8 unit and its output will be the eight remaining digits in the binary word input after a shift of eight places to the left. It will thus be appreciated that the eight binary bits making up the left half of the binary word input can be disregarded and therefore the logical unit 5 need only comprise eight NAND gates, 71-78, in the described embodiment of FIG. 2 in which those bits which are not required are dropped. The information input connection to the logical stage 71 is connected to the input connection to the logical stage 51 of the logical unit 6 whilst the information input connections to the logical stages 72-78 are similarly connected to the information input connections of the logical stages 52-58.

In a similar manner, the remaining logical unit 7 (shift-right +8") comprises eight logical NAND stages 79 86. In shiftright operation, one is not concerned with the eight digits in the right-hand side of a 16-bit binary word and thus they can be neglected in a shift-right operation. Therefore, the information input connections to the logical stages 79-86 are merely connected to the information input connections of the logical stages 59-66 of logical unit 6 as will be clear from FIG. 2. It will be seen that the control activating connection 30 is identified as "SR," an abbreviation of shift-right 8, whilst the control activating connection 28 is identified as "SL8" being an abbreviation of shift-left 8.

At level 2, the no-shift logical unit 13 comprises 16 NAND gates, i.e. logical stages, 91-106. Level 2 includes the logical units for providing four places of shift left or right and it will be seen that the shift-let! "-4" logical unit 12 includes twoinput NAND gate logical stages 111-122..Logical unit 12 also includes four single input logical stages 123-126. These stages which are designed as one-input gates are sometimes referred to as cancelling gating stages and are capable of providing a zero level output whenever their single input connection is activated. Their single input connection is connected to the control activating connection 31 which is also connected to the control connection of each of the NAND gates 111-122. The latter gates also have an infonnation input connection which is connected to receive information pulses from the respective logical units in level 1.

In a similar manner. the logical unit 14 at level 2 includes four single input logical gate stages 131-134 (cancelling gates) together with a plurality of two-input NAND gates 135-146. The control activating connection 33 SR4" (shiftright four places) is connected to the control input of the NAND gates 135 146 and also to the single input of the gates 131-134 so that the stages in the unit 14 operate in the same manner as the stages in the logical unit 12. The reason for providing the single input gates will be explained below.

Each of the output connections of the logical units 13 and 16 in FIG. 2 will be seen to include a symbol in the form of a small circle containing two crossed lines. This represents a pullup resistor, always found in NAND or NOR circuits, sometimes internal with a commercial package and sometimes extemal to the commercial package and having to be separately provided. Such a resistor is indicated at the output connection of the logical stage 166 but for simplicity is only represented in symbolic form at some of the other output connections. All the NAND gates will, of course, have either external or internal pullup resistors. It will furthermore be appreciated that, in practice, test jacks may be provided on any of the connection wires in the logical shifting device.

Level 4 includes the shift-left l" logical unit 18, the noshift logical unit 19, and the shift-right +l" logical unit 20. The logical unit 19 includes two-input NAND gates 231246 whilst the logical unit 18 includes two-input NAND gates 251-265. Logical unit 18 also includes one single input logical gate 266 and, as may be seen, the control activating connection 37, SL1 (shift-left minus one) is connected to the control input of all the stages 251-266. Similarly, the logical unit 20 at level 1 includes a single input gate 271 of the type referred to above together with two-input N AND gates 272- 286. The control activating connection 39 SR1 (shift-right plus one) is connected to all the logical stages 271-286 whilst the information input connection to the NAND gates 272- 286 are connected as illustrated in FIG. 2.

The output connections from the logical units 18, 19 and 20 at level 4 are connected as shown to the respective outpul wires of the common logical output connection 27.

As mentioned above, the logical stages 123 through 126 and 131 through 134 at level 2 have no information input but only one input from the respective control activating connections 31 and 33. They are designed to give a zero output on their output connection, upon activation of the respective control activating connection, so that the binary word, or a portion thereof, input to the succeedingstages on level 3 has the.correct number of digits. As will be seen, stages 123 through126 upon activation supply zero inputs to stages 151 through 154 and stages 171 through 174, whilst stages 131 through 134 supply inputs to stages 223 through 226 and stages 163 through 166 when the respective level 2 control activating connections are activated. This is particularly necessary when one considers the conditions which exist when all the wires of the logical input connection 8 carry a binary l so that all the NAND gates 5| through 66 are enabled due to the presence of an activating potential on the activating connection 29. In such a case, all the outputs of the NAND gate stages SI through 66 would drop to ground level potential representing binary "0." Ifat the next level 2, it was necessary to introduce a shift of four places to the right in the binary word, then the control activating connection 33 (SR4) would be activated by being placed at a "I" level having a relatively high positive potential thereon. However, as mentioned, the outputs of the logical gate stages 51 through 66 would be at zero and, there fore, zero voltage, i.e. ground level, would be applied to the information input connections of stages I35 through I46. The two inputs to those stages would thus be unequal and the stages would give a high potential output, representing binary l Similarly, since the output voltages of stages SI through 66 are applied via the logical wiring to the information input connections of stages 91 through I06 and stages Ill through 122, a low potential would thus be applied to the information input of those stages. However, their respective control activating connections 3| and 32 would be at a low potential and, therefore, the respective stages would not be activated and would all provide a high potential, representing binary l ,"which would also be applied to the input connections of stages ISI through 166 of logical unit 16. That logical unit would thus not be able to differentiate between the output of the activated logical unit I4 and the nonactivc logical units 12 and I3. Therefore, what is really an intelligible. output from the logical unit 14 is rendered unintelligible'due to the residual conditions in the logical units 12 and I3, and the shift-4-right function would thereby be cancelled out at the level 3 of the logical shifting device. To overcome this, the singleinput gates 131 through I34 are providedv in: the. logical unit 14 so as to each give a binary 0," i.e. ground otential, output whenever the SR4 control activating connection. 33 is activated. The ground potential thereon thus ensures that the information input connections to the four most significant stages 163 through I66 of logical unit I6 areal zero whenever activating connection 33 is activated.

Similarly, the logical unit'IZ is provided with the four single input stages I23 through I26 whereby whenever the control activating connection 31 is activated, zero output voltage is applied to the information inputs of. stages I71 through I74 of the shift-left minus two logical unit and also to the stages 15! through I54 of the no-shift logical unit I6. The operation of this part of the circuit, to ensure that the information passing through the circuit is intelligible will be clear from a study of the logical diagram shown in FIG. 2. Stages I51 through I54 and the four least significant bits of the binary word or portion thereof.

It is to be observed that at level 4, the logical unit I8 is also provided ,with a single input gate stage 266 whose output. is connected to the least significant: digit wire of the common logical output connection 27. The logical unit'also includes a single input stage 2'" whose output is connected -to the most significant digit wire of the common logical output connection 27. Stages 266 and! function in a similar manner to-the single input stages at level 2 so as topresent an intelligible binary word output having [6 bits.

Whilst the operation of the logical shifting device illustrated in FIGS. I and 2 should be clear from-.the above description, it may well be that an understanding thereof maybe facilitated from a consideration of the passage of a binary word through the logical device to produce a particular magnitude of shift;

Let us assume that, it is requireddo. introduce a shift of l3 places to the right in a binary word'and let it be assumed that the [6-bit binary word applied-to-the logical input connection 8 is:

l0l0 lll0l0l l l l l l.

I71 through l74 correspond, of course, to

For a l3 position shift to the right, the output binary-wo on the common logical output connection 27 should obvious OOOOOOOOOOOOO IUL" A 13 position shift to the right can be formed from succe aive shifts +8, +4, +0, +l=l3. 'lhereforefcontrol voltag must be applied lo: I

I. control activating connection 30 +8 logical unit 7;

2. control activating connection 33 +4 logical unit I4;

3. control activating connection 35 of the no-shift logic:

unit I6; and

4. control activating connection 39 of the shift cal unit 20.

The control activating connections may be activated i| sequence provided they are left on, or simultaneouslypro vided that the control voltages are of sufficient width to permi the binary word, or portion thereof, to pass therethrough.

The binary word input signal will be applied to the inpu connection 8 but since the control connections 28 and 29 art not activated, i.e. enabled, there will be no output from the shift left -8 logical unit 5 and the no-shift logical unit'6. How ever, control activating connection 30 of the logical unit '7 is activated and, therefore, the shift right +8 logical unit 7 will produce an output. The binary inputto the information input connections of the binary stages 86 through 79 willthus be:

Therefore, the respective NAND gate stages will provide an output:

(SR8) of the shift rigl (SR4) of the hin rigl right +1 logi As will be clear, the eight least significant digits on the wires of the input connection 8 are not applied to logical unit 7 and thusresult in no output therefrom.

The output from the logical unit 7 is applied to the input of the shift right +4 logical unit l4 (in fact, to all the logical units I2, I3 and I4 at level 2 but only logical unit l4 has it control connection activated) but it will be seen that, in fact, only the four most significant outputs from logical unit 7 are applied to logical unit l4 because of the shift right +4 operation. The four least significant digits have been lost on the shift-right +4 operation, as would be expected.

Thesignificant input to the logical unit 14 is thus the portion of a binary word,

0 l 0 l and the respective NAND gates 138 through thus produce anroutput However, eight NAND gate logical stages I39 through I46 are also provided which are activated, i.e. enabled and, thercfore, they provide a 0" output so that the output from the stages I46 through I35 of the shift right +4 logical unit is:

00000000 I010. This output is applied-to the input of the no-shift logical unit 16;

lt'should be mentioned that the progress of the most significant'digit in the binary word has been indicated in its passage between logical unit 7, logical unit 14, logical unit I6 and logical unit 20 by identifying the wires used with a double line.

Up to-the input'to the logical unit 16, there has been a total shift of +12 to the right and, therefore, the input to the noshift logical unit 16, taking into account the operation of stages IJI through 134, will be:

Eight'of the zeros are provided by the stages I39 through 146 of unit I4 since their control input 33 is activated by a positive voltage and their signal inputs are also high, at a positive voltage, because the output from the logical units 5 and 6 is high, representing I because there is no activating potential on'therespectivc activating connections 28 and 29 even though there may be an information input to the respective units. The output from the logical stages I39 through I46 is thus "0 and this output is supplied to the input connections of the logical stages 155 through I62 of the no-shil't logical unit id, as will be clear from the logical wiring shown In FIG 2. In order to provide a further four zeros. as required. In the binary word input to the logical unit l6. the four stages IJI through 134 of logical unit I are activated and provide a input to the logical stages 163 through 166 of logical unit [6. Thus, the correct zeros are provided on the input to the noshift logical unit 16 whose output (except for stage 151 is applied to the input of the shifl right +l unit whose control activating connection 39 SR! is activated.

The input to the shift right +1 logical unit is thus:

llllllllllll0l0, and its output becomes:

An additional zero is introduced by the last stage 2'" of logical unit 20 so as to provide a zero output on the most significant digit wire of the common logical output connection 27 whereby the final output from the logical device is:

0000000000000 1 0 l. A shift of l3 places to the right has, therefore, been produced.

In the above-described embodiment of FIGS. 1 and 2, those bits in the input binary word which do not appear in the output binary word are dropped (Le. a so-called off-the-end shifting device). However, it will be appreciated that the invention is equally applicable to a system in which those bits are recirculated and reinserted in an end-around shitting operation-as in a so-called end-around shifting device.

It will be appreciated that a device according to the present invention may be conveniently constructed by utilizing, for example, NOR gates instead of the N AND gates.

MATHEMATICAL CONSIDERATIONS The number of logical gating stages, not counting possible cancelling gates, required at each level and the number of levels required in a shifting device according to the described embodiment of the present invention can be calculated mathematically as follows:

Let! the number of levels required in the shifting device.

If the binary word to be shifted has a word length of (NH) bits, then I" must satisfy the equation:

2'-'( N 1 s 2 l where r is the smallest integer which satisfies the equation.

Thus the number of levels 1" can be calculated. The number of stages in the no-shitt logical units will be (NH) at each level but it is necessary to calculate the number of stages [at Leve 2nd Level 12" Leve t Level in shift-left and shift-right logical units at each level. The required number of positions of shift-left or right will be as follows:

The first level would introduce a shift of 2" positions left or right.

The second level would introduce a shift of 2 positions left or right.

The p level would introduce a shift of 2" positions left or right.

The r level would introduce a shift of 2' positions left or right.

Let L be the general representation for the number of gating stages in the shift-left logical units, a suffix being used to identify the level.

Let R be the general representation for the number of gating stages in the shift-right logical units, a sul'fix being used to identify the level.

The table above gives the number of active logical stages required in the logical units at each level. In practice, the shifting device will usually require additional logical stages whose number and/or type will depend on the type of shifting device.

To consider this in greater detail for the two types of shifting devices mentioned:

l. End-around shitting device;

If the shifting is an end-around shifting device, as referred to above, then the total number of logical stages in each logical unit will be (N-t-l i.e. L,=L,=L,=L,=R,-=R,=R,=R,= N+| 2. Off-the-end shifting device-cancelling gates requirement.

The shifting device illustrated in FIGS. 1 and 2 is of the type where those input bits which do not appear in the output binary word are dropped and wherein cancelling gates I23- 126 and l34l3l are provided at the second level whilst cancelling gates 266 and 271 are provided at the fourth level. in this type of oE-the-en shifting operation, the shift-left and shift-right logical units at the second level will require cancelling gates, or their equivalent, and cancelling gates, or their equivalent, will also be required at every successive alternate level thereafter. The number of cancelling gates required in a logical unit is the difference between the number of active logical stages in that logical unit and the number of active logical stages in the corresponding logical unit in the immediately preceding level.

Let L and R have the same significance as previously and let be, Re be the general representations for the number of cancelling gates required in the logical units at aparticular level, a suffix being used to identify the level. The "otf-the-end" shifting device can then be constructed generally as follows:

At the p and t"'-levels, cancelling gates are, of course, only required if those levels are even numbered. L, and R, are, of course, the representations for the number of stages in the shift-left logical unit and the shift-right logical unit respectively at the (p-l) level. Similarly, L and R are the representations for the number of stages in the shift-left logical unit and the shift-right logical unit respectively at the rl level.

By way of example, let us consider the shifting device of FIGS. 1 and 2. Here, it was required to shift a binary word comprising l6 binary bits by up to l5 places left or right.

Therefore, N+l=l6 N=l5. I The equation to be satisfied is:

2"' 3V+ l 52 giving P4.

Thus the shifting device will include logical units at four levels and the number of logical stages in each logical unit can be calculated as follows:

Logical wiring can now be provided between the various logical units. as shown in FIG. 2, together with the required activating connections.

The described logical shifting device according to the present invention may well have application in the arithmetic unit of computer, for example. a commercial digital computer or a special purpose digital computer-such a computer may already be provided with the "no-shift" gates in its standard circuitry and it will therefore only be necessary to provide the shitblefl and shirt-right have application, for example. in telephone switching The type of structure referred to should be applicable to largescale integration techniques.

Furthermore, while the invention has been described with reference to preferred embodiments thereof, other variations in the circuits will occur to those skilled in the art and may be incorporated without departing from the spirit or scope of the invention.

We claim:

I. A logical shifting device capable of effecting a shifting operation to shift a binary word. comprising (Ni-l) bits, up to N places left or right including:

a. a plurality of logical units at a first level and a further plurality of logical units at least at one further level; each level comprising a shift-left logical unit having logical gating stages with inputs interconnected through logical connections to the outputs of logical gating stages in the immediately preceding logical unit to produce a desired shift left in a respective portion of the binary word, a noahilt logical unit having logical gating stages with inputs interconnected through. logical connections to the outputs of logical gating stages in the immediately preceding logical unit to pass the respective portion of the binary word therethrough with zero shift, and a shift-right logical unit with inputs interconnected through logical connections to the outputs of logical gating stages in the immediately preceding logical unit to produce a desired shift right in the respective portion of the binary word;

. control means for activating a selected one logical unit at each level for each shifting operation of the logical shifting device so that the desired magnitude and direction of $5 shift is achieved at each level and the respective portion of said binary word is passed through one logical unit at each level during the shifting operation; whereby the total time taken by a'shilting operation is constant for all such shifting operations.

2. A logical shifting device according to claim I having a first level and at least two further levels, wherein each level includes:

a. a shift-left logical unit logically connected in the device to 65 produce a desired shift left in the respective portion of said binary word; 7

b. a Ito-shift logical unit logically connected in the device to pass the respective portion of said binary word therethrough with zero shift; and

c. a shift-right logical unit logically connected in the device to produce a desired shift right in a respective portion of said binary word.

J. A logical shifting device according to claim I for effecting a shifting operation to shift a binary word, comprising 16 bits. up to 15 places leftor right, including four levels wherein:

4. A logical shifting device according to claim 3 wherein each of said logical gating stages is a logical NAND gate and the cancelling gating stages each comprise a single input gate capable of providing a zero output in response to an activating input.

5. A logical shifting device according to claim I wherein each logical gating stage is a logical NAND gate.

6. A logical shitting device capable of efiecting a shifting operation to shift a binary word, comprising (N+l) bits, up to N places lett or right including:

a. a plurality of levels of logical units, each unit comprising a number of logical gating stages, the number of levels t being determined by the equation:

2 N l 5 2 l where tis the smallest integer which satisfies the equation, and in which:

b. the logical units at each level after the first are logically connected to the logical units at the immediately preceding level;

c. each level comprising a shift-left logical unit having logi cal gating stages with inputs interconnected through logical connections to the outputs of logical gating stages in the immediately preceding logical unit to produce a desired shift left in a respective portion of the binary word, a no-shift logical unit having logical gating stages with inputs interconnected through logical connections to the outputs of logical gating stages in the immediately preceding logical unit to pass the respective portion of the binary word therethrough with zero shift, and a shift-right logical unit with inputs interconnected through logical connections to the outputs of logical gating stages in the immediately preceding logical unit to produce a desired shift right in the respective portion of the binary word;

d. the number of logical gating stages in the shift-left logical units at a particular level being dependent on the level whereby at the general tpl th level the number of logical stages is given by .the number of logical gating stages in the no-shitt logical -.unit being (N+l for each level,

l. the number of logical gating stages in the shift-right logical uniis being dependent on the level whereby at the gneral 7) th level the number of logical stages is given control means for activating a selected one logical unit at each level for each shifting operation of the logical shifting device so that the desired magnitude of shift is achieved and a respective portion of said binary word is pamed through one logical unit at each level during the shifting operation; whereby the total time taken by a shitting operation is constant for all such shifting operations.

1. A logical shifting device according to claim 6 which is an otf-the-end shifting device and in which:

a. the shift-left logical unit and the shift-right logical unit at the second level and at every succeeding alternate level each include a number of cancelling gate stages;

b. the number of said cancelling gate stages at a particular level being dependent on the level whereby at the (p) th level the number of cancelling gates in the shift-left logical unit is Lc,-(L,L cancelling gate stages, and the number of cancelling gates in the shift-right logical unit is Rc,-( R,R, cancelling gate stages, where the (p-l) th level immediately precedes the (p) th level.

8. A logical shifting device according to claim 7 for eflecting a shifting operation to shift a binary word, comprising 16 bits, up to places left or right, including four levels wherein:

9. A logical shifting device according to claim 6 wherein the total number of logical stages in each logical unit is (N+l) to provide an end-around shifting device in which those bits which do not appear in the output binary word are recirculated and reinserted in an end-around shifting operation.

10. A method of effecting a shifting operation on a binary word, comprising (N+l) binary bits, to shift the word up to N places lefi or right-including the steps of:

a. passing the binary word, or a respective portion thereof,

through one selected logical unit at a first level;

b. passing the binary word or a respective portion thereof through one selected logical unit at least at one further level; and

c. selecting and activating said one selected logical unit at each level for each shifting operation to pass the binary word through either a shift-left logical unit, a no-shifi logical unit, or a shift-right logical unit at each level so that the desired magnitude and direction of shift is achieved at each level and the total time taken by a shifiting operation is constant for all such shifting operations, the binary word or a respective portion thereof passing through one logical unit at each level.