# 6.26 Error-correcting codes: hamming distance

So-called linear codes create error-correction bits by combining the data bits linearly. Topics discussed include generator matrices and the Hamming distance.

So-called linear codes create error-correction bits by combining the data bits linearly. The phrase "linearcombination" means here single-bit binary arithmetic.

 $0\mathop{\mathrm{xor}}0=0$ $1\mathop{\mathrm{xor}}1=0$ $0\mathop{\mathrm{xor}}1=1$ $1\mathop{\mathrm{xor}}0=1$ $·(0, 0)=0$ $·(1, 1)=1$ $·(0, 1)=0$ $·(1, 0)=0$
For example, let's consider the specific (3, 1) error correction code described by the following coding table and,more concisely, by the succeeding matrix expression. $\begin{array}{c}c(1)=b(1)\\ c(2)=b(1)\\ c(3)=b(1)\end{array}$ or $\begin{array}{c}c=Gb\end{array}$ where $\begin{array}{c}G=\begin{pmatrix}1\\ 1\\ 1\\ \end{pmatrix}\\ c=\left(\begin{array}{c}c(1)\\ c(2)\\ c(3)\end{array}\right)\\ b=\left(\begin{array}{c}b(1)\end{array}\right)\end{array}$

The length- $K$ (in this simple example $K=1$ ) block of data bits is represented by the vector $b$ , and the length- $N$ output block of the channel coder, known as a codeword , by $c$ . The generator matrix $G$ defines all block-oriented linear channel coders.

As we consider other block codes, the simple idea of the decoder taking a majority vote of the received bitswon't generalize easily. We need a broader view that takes intoaccount the distance between codewords. A length- $N$ codeword means that the receiver must decide among the $2^{N}$ possible datawords to select which of the $2^{K}$ codewords was actually transmitted. As shown in [link] , we can think of the datawords geometrically. We define the Hamming distance between binary datawords ${c}_{1}$ and ${c}_{2}$ , denoted by $d({c}_{1}, {c}_{2})$ to be the minimum number of bits that must be "flipped" to gofrom one word to the other. For example, the distance between codewords is 3 bits. In our table of binary arithmetic, wesee that adding a 1 corresponds to flipping a bit. Furthermore, subtraction and addition are equivalent. We can express theHamming distance as

$d({c}_{1}, {c}_{2})=\mathrm{sum}({c}_{1}\mathop{\mathrm{xor}}{c}_{2})$

Show that adding the error vector col[1,0,...,0]to a codeword flips the codeword's leading bit and leaves the rest unaffected.

In binary arithmetic (see [link] ), adding 0 to a binary value results in that binary value while adding 1results in the opposite binary value.

The probability of one bit being flipped anywhere in a codeword is $N{p}_{e}(1-{p}_{e})^{(N-1)}$ . The number of errors the channel introduces equals the number of ones in $e$ ; the probability of any particular error vector decreases with the number of errors. In a (3,1) repetition code, only 2 of the possible 8 three-bit data blocks are codewords. We can represent these bitpatterns geometrically with the axes being bit positions in the data block. In the left plot, the filled circlesrepresent the codewords [0 0 0] and [1 1 1], the only possible codewords. The unfilled ones correspond to the transmission.The center plot shows that the distance between codewords is 3. Because distance corresponds to flipping a bit,calculating the Hamming distance geometrically means following the axes rather than going "as the crow flies". The rightplot shows the datawords that result when one error occurs as the codeword goes through the channel. The three datawordsare unit distance from the original codeword. Note that the received dataword groups do not overlap, which means the codecan correct all single-bit errors.

#### Questions & Answers

Is there any normative that regulates the use of silver nanoparticles?
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
why we need to study biomolecules, molecular biology in nanotechnology?
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
why?
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
anyone know any internet site where one can find nanotechnology papers?
research.net
kanaga
sciencedirect big data base
Ernesto
Introduction about quantum dots in nanotechnology
what does nano mean?
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
absolutely yes
Daniel
how to know photocatalytic properties of tio2 nanoparticles...what to do now
it is a goid question and i want to know the answer as well
Maciej
characteristics of micro business
Abigail
for teaching engĺish at school how nano technology help us
Anassong
Do somebody tell me a best nano engineering book for beginners?
there is no specific books for beginners but there is book called principle of nanotechnology
NANO
what is fullerene does it is used to make bukky balls
are you nano engineer ?
s.
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
Tarell
what is the actual application of fullerenes nowadays?
Damian
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
Tarell
what is the Synthesis, properties,and applications of carbon nano chemistry
Mostly, they use nano carbon for electronics and for materials to be strengthened.
Virgil
is Bucky paper clear?
CYNTHIA
carbon nanotubes has various application in fuel cells membrane, current research on cancer drug,and in electronics MEMS and NEMS etc
NANO
so some one know about replacing silicon atom with phosphorous in semiconductors device?
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Harper
Do you know which machine is used to that process?
s.
how to fabricate graphene ink ?
for screen printed electrodes ?
SUYASH
What is lattice structure?
of graphene you mean?
Ebrahim
or in general
Ebrahim
in general
s.
Graphene has a hexagonal structure
tahir
On having this app for quite a bit time, Haven't realised there's a chat room in it.
Cied
what is biological synthesis of nanoparticles By    By By Anonymous User By Lakeima Roberts    By