LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i flip a certain bit in a bit stream?

i have made a hamming encoder and decoder and i want to evaluate the whole performance of the system so i want to to flip a certain bit (representing the effect of noise ) so the the decoder detecte this error and correct it , i tried to use a subarray to select one bit then compare it to zero (which i couldnt do mismatch data type)  , how can i fix this problem?
0 Kudos
Message 1 of 3
(1,944 Views)
You may use the Not Exclusive Or function. If I want to flip bit 1 in the U8=0xb10101010, I use the Not Exclusive Or function with 0xb111111101, and 0xb10101010 as input values. The result will be 0xb10101000. Set the bit you want to flip equal to 0


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 2 of 3
(1,937 Views)
A little bit more logical is to use the exclusive OR function.  That way the bit you want to flip is a 1 and all the rest are zero.
0 Kudos
Message 3 of 3
(1,919 Views)