Find the exclusive OR in an Array by the index, Java -


I have a string of length 15: "10101000000010" I want to take the array as unique as every alternate index, such as

'

  int s = a [3] ^ a [5] ^ a [7] ^ A. [11] ^ A [13] ^ A [15]; '  

// here leaves the index 1 by the end of the length of the string all the way

'

  int = A [3] ^ A [6] ^ A [7] ^ A [11] ^ A [14] ^ A [15]; '  

// here skips 2 index and lets 2 go, skips 2 lets 2 go ... and so on

I do not know how to come . Make a method with the parameter Return the length and method of the array (0 or 1) which is primarily because it is unique or

then to clear it ... It should do with any size array. Such as [now] 17 [

  int z = a [3] ^ a [5] ^ a [7] ^ a [[]]: [[]] A [13] ^ A [ 15] ^ [17]   

This is for the hipping code

Create a byte of data: 10011010 data word, leaving spaces for parity bits: _ _ 1 _ 0 0 1 _ 1 0 1 0 Calculate the equality for each parity bit (setting A? Bit position):

Check status1 of 1,3,5,7, 9,11 bits:? _ 1 _ 0 0 1 _ 1 0 1 0. Equality also set a position from 0 to 0: 0 _ 1 _ 0 0 1 _ 1 0 1 0 Position 2 Check bits 2,3,6,7,10,11 :

0? 1 _ 0 0 1 _ 1 0 1 0. Strange Equality Set Position from 2 to 1: 0 1 1 _ 0 0 1 _ 1 0 1 0 Position 4 Check Bits 4,5,6,7,12: p>

0 1 1? 0 0 1 _ 1 0 1 0 Incredible equality set position of 4 to 1: 0 1 1 1 0 0 1 _ 1 0 1 0 Status 8 Check bits 8,9,10,11,12:

0 1 1 1 0 0 1? 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Word of the words: 011100101010.

'

  int d [] = new int [7]; For (int i = 0; i   

'

If perfomance allows, then I For a loop Start with 0, then, check the index inside the for-loop and XOR or continue.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -