Solved

# Finding the bit/bits from one digit which different it from group of other digits (Kazakow method)

Posted on 2003-02-19

The method is generally called Kazakow and I'm looking for

C/C++ implementation or even help where to find it or how it may work

About the method:

We have one digit(F0) and a group of other digits(F1).

F0=0110

F1=1000,

1001,

0011,

We want to find the bit/bits which different F0 and F1.

The result must contains the fewest bits which different them

so the answer is -1-- (bit 3) - only one bit in this exapamle !!

_generaly for ONE bit

for i := 1 to n do {numbers of bits}

begin

{ here I compare F0 and F1 }

{ by the bit number i }

end;

---------

_for TWO bit

for i := 1 to n-1 do

begin

for j :=i+1 to n do

begin

{ here I compare F0 and F1 }

{ by the bit number "i" and bit "j"}

end;

---------

but how to find n-bits which different them ?!

this situations accurs in Karnaugh grid where '1' is

rounded with '0'

What for this example ?!

F0=01111

F1=00111,

01011

01101,

01110,

11111

what if I have 20-bits digits ?!

I think that some sort of adding items or even recuration is here needed

Any suggestions ?

Peter