In article <11**********************@v46g2000cwv.googlegroups .com>,

newbie <ch*********@yahoo.com> wrote:

the RH and LH as below:-

Q: How do you tell that someone is using google groups as their

newsreader?

A: Look for the complete lack of quoting and attribution.

static uint32 LHs[16] =

{

0x00000000, 0x00000001, 0x00000100, 0x00000101,
static uint32 RHs[16] =

{

0x00000000, 0x01000000, 0x00010000, 0x01010000,
so what the expression produce?

Which expression? As I pointed out before, the code obviously

calculates *two* values, X and Y, not just *one* value.

Your original question was, if I recall correctly, whether the

code produced the same answer as the table of values you showed.

[If I don't recall correctly, it's because you failed to quote

appropriate context.]

Examining the code and examining the table of values, without

knowing what a "PC-1" is, and without figuring out exactly what the

code calculates, we can determine that the code does not produce

the given table of values -- not unless there are some unstated

restrictions on the input values.

To prove that the table values are not what the code produces, start

with X and Y both 0. T is calculated in terms of shifts and XOR.

Unsigned shifts never introduce binary 1's where there were none

to start with, so the shifts are going to leave the values as 0.

Similarily, XOR of 0 and 0 is 0, so the XOR is not going to

introduce any new binary 1's. We can thus deduce that at the

end of the introductory sequence, X, Y, and T will all be 0 when

X and Y started at 0.

Now look at the pair of long expressions. There are lookups and

shifts and binary ORs. Again shifts and OR do not introduce new 1s

out of 0's. But it is the looked-up values that are manipulated,

so examine those. In each case, the array index used is a shift

and AND of X or Y, and we know X and Y are 0 here, so in each

case the array index used is going to be 0. And when we look

at LHS[0] and RHS[0], we see 0's in both locations. From this

we can deduce that when X and Y start out as 0, the final X and Y

values are both going to come out as 0.

If we know look at the PC-1 table of values given, then no matter

how we mentally account for the mismatch in dimensions, we can see

that none of the PC-1 values are ever 0. There is thus an output

pair from the code that is not to be found in the PC-1 values,

and hence the PC-1 values are not those produced by the code --

at least to the limits of the documentation we are given about the

input ranges.

--

Programming is what happens while you're busy making other plans.