Decoding bit streams using Hamming Code I want to decode the following bit stream using Hamming code:
01110110

Once using even parity and once odd parity. I will show my work. For even parity:

$p_{1} \; p_{2} \; 0 \; p_{3} \; 1 \; 1 \; 1 \; p_{4} \; 0 \; 1 \; \; 1 \; 0$

Now, we check:

$p_{1}: p_{1}  \; 0 \; 1 \; 1 \; 0 \; 1 $, since there is an odd number of 1's, $p_{1}=1$

$p_{2}: p_{2}  \; 0 \; 1 \; 1 \; 1 \; 1 $, since there is an even number of 1's, $p_{2}=0$

$p_{4}: p_{3}  \; 1 \; 1 \; 1 \;0 $, since there is an odd number of 1's, $p_{3}=1$

$p_{8}: p_{4}  \; 0 \; 1 \; 1 \;0 $, since there is an even number of 1's, $p_{4}=0$

so the following hamming code is 
$$1 \; 0 \; 0 \; 1\; 1 \; 1 \; 1 \; 0 \; 0 \; 1 \; \; 1 \; 0$$

As for odd, the parities will just be the opposite and the code will be

$$0\; 1 \; 0 \; 0 \; 1 \; 1 \; 1 \; 1 \; 0 \; 1 \; \; 1 \; 0$$

Can someone tell me if my work is correct? Because I am a bit confused and would appreciate the help.
There are many equivalent Hamming codes depending on the ordering of parity and data bits. 
Assuming that:


You are using the specific bit ordering described here: https://en.wikipedia.org/wiki/Hamming_code#General_algorithm
By "even parity" you mean that the parity bits are computed as the sum (modulo 2) of the corresponding groups of bits
By "odd parity" you mean that the parity bits are computed as 1 minus the sum (modulo 2) of the corresponding groups of bits,


then yes, your simulation of the algorithm is correct.