SlideShare a Scribd company logo
Module IV – Perfect Codes & Hamming Codes
Lakshmi V.S.
Assistant Professor
Electronics & Communication Department
Sree Chitra Thirunal College of Engineering, Trivandrum
Perfect Codes
• Perfect codes are binary codes which satisfies Hamming bound with equality
• A Perfect Code is a t-error correcting code where its standard array has all error patterns of
t or fewer errors and no others as coset leaders
• Examples
 odd-length binary repetition codes (eg. (3, 1), (5,1),..) (these codes contain two
codewords: an all-zero codeword and an all-one codeword),
 binary Hamming codes with dmin = 3
2
Hamming Bound ,2
𝑛 −𝑘
≥∑
𝑗=0
𝑡
(𝑛
𝑗)
Department of Applied Electronics & Instrumentation
Hamming Codes
• Hamming codes are single error correcting perfect codes.
• As t = 1, RHS = =+ =1+n
• LHS = (by considering
• Since Hamming codes satisfies Hamming bound with equality
3
Department of Applied Electronics & Instrumentation
Hamming Codes - Parameters
• Hamming codes are single error correcting perfect codes.
• For any positive integer m≥3, there exists a Hamming code such that:
 Code Length: n = 2m
- 1
 No. of information symbols: k = n-m =2m
- m-1
 No. of parity check symbols: n-k = m
 Error correcting capability: t = 1 (i.e., dmin=3)
• m = 3  (7, 4) Hamming code (n = 2m
-1=7 & k = n-m = 4)
• m = 4  (15, 11) Hamming code (n = 2m
-1=15 & k = n-m = 11)
• m = 5  (31, 26) Hamming code (n = 2m
-1=31 & k = n-m = 26)
4
Department of Applied Electronics & Instrumentation
Hamming Codes
• The parity-check matrix H of Hamming code consists of all possible nonzero m-tuple ((n-k)
tuple) as its columns since n = 2m
- 1
• For (7, 4) systematic Hamming code, H matrix is of size 3 x 7 (n-k x n)
5
PT
3 x 4
I3
3 x 3
I3
3 x 3
PT
3 x 4
Department of Applied Electronics & Instrumentation
Systematic Hamming Codes
•
•
6
I3
3 x 3
PT
3 x 4
P
4 x 3
I4
4 x 4
dmin = 3
edet s  dmin –1, s = 2
ecorr , t = 1
Department of Applied Electronics & Instrumentation
Hamming Codes
• Using the G matrix, the codewords can be generated as v = u.G as in the case of LBC.
• Decoding can be done using standard array and syndrome decoding.
• Encoder circuit, syndrome circuit and decoder circuit are same as that
of LBC.
7
Department of Applied Electronics & Instrumentation
• = .
 v0  u0  u2  u3
 v1  u0  u1  u2
 v2  u1  u2  u3
 v3  u0
 v4  u1
 v5  u2
 v6  u3
8
Encoder – (7, 4) Systematic Hamming Code
Department of Applied Electronics & Instrumentation
Encoder – (7, 4) Systematic Hamming Code
 v0  u0  u2  u3
 v1  u0  u1  u2
 v2  u1  u2  u3
 v3  u0
 v4  u1
 v5  u2
 v6  u3
9
Department of Applied Electronics & Instrumentation
Decoder – (7, 4) Systematic Hamming Code
• = .
 s0  r0  r3  r5  r6
 s1  r1  r3  r4  r5
 s2  r2  r4  r5  r6
10
Department of Applied Electronics & Instrumentation
Decoder – (7, 4) Systematic Hamming Code
11
Department of Applied Electronics & Instrumentation
Decoder – (7, 4) Systematic Hamming Code
12
Department of Applied Electronics & Instrumentation
Decoder – (7, 4) Systematic Hamming Code
13
Department of Applied Electronics & Instrumentation
Decoder – (7, 4) Systematic Hamming Code
14


H T =
[
1 0 0
0 1 0
0 0 1
1 1 0
0 1 1
1 1 1
1 0 1
]
Department of Applied Electronics & Instrumentation
Decoding Circuit for (7, 4) Systematic Hamming Code
15
 s0  r0  r3  r5  r6
 s1  r1  r3  r4  r5
 s2  r2  r4  r5  r6


Non Systematic Hamming Codes
• A non-systematic Hamming code can be constructed by placing the parity check bits at 2l
(l
= 0, 1, 2, 3, …) locations of G matrix
• Procedure for constructing non-systematic Hamming code
 Step 1: Write the BCD of length (n – k) for decimals from 1 to n.
 Step 2: Arrange the sequences in the reverse order in a matrix form.
 Step 3: Transpose of the matrix obtained in step 2 gives the parity check matrix, H for
the code.
16
Department of Applied Electronics & Instrumentation
(7, 4) Non Systematic Hamming Codes
 Step 1: Write the BCD of length (n – k) for decimals from 1 to n.
17
Department of Applied Electronics & Instrumentation
(7, 4) Non Systematic Hamming Codes
 Step 2: Arrange the sequences in the reverse order in a matrix form to form HT
.
 Step 3: Transpose of the matrix obtained in step 2 gives the parity check matrix, H for
the code.
18
(7, 4) Non Systematic Hamming Codes
• A non-systematic Hamming code can be constructed by placing the parity check bits at 2l
(l
= 0, 1, 2, 3, …) locations of G matrix
• 1, 2 & 4 columns in H matrix are part of identity matrix
• Select each row elements from remaining columns of H as part of PT
and place it as 1, 2 and
4 columns of G.
• Fill the remaining columns of G with columns of identity matrix.
19
• The parity bit equations are
• .The codeword format for non-systematic Hamming code is
(7, 4) Non Systematic Hamming Codes
20
Department of Applied Electronics & Instrumentation
(7, 4) Non Systematic Hamming Codes
21
v = u.G
Decoding - (7, 4) Non Systematic Hamming Codes
22
s = e.HT
Department of Applied Electronics & Instrumentation
THANK YOU…
Department of Electronics & Communication 23
Ad

More Related Content

Similar to Error Control Codes or Channel Codes -Haming Codes (20)

1 Unit-1 DEC B.Tech ECE III Sem Syllabus & Intro.pptx
1 Unit-1 DEC B.Tech ECE III Sem Syllabus & Intro.pptx1 Unit-1 DEC B.Tech ECE III Sem Syllabus & Intro.pptx
1 Unit-1 DEC B.Tech ECE III Sem Syllabus & Intro.pptx
Satish Chandra
 
Fpga implementation of linear ldpc encoder
Fpga implementation of linear ldpc encoderFpga implementation of linear ldpc encoder
Fpga implementation of linear ldpc encoder
eSAT Journals
 
LDPC_CODES.ppt
LDPC_CODES.pptLDPC_CODES.ppt
LDPC_CODES.ppt
hsomashekar987
 
An Efficient Interpolation-Based Chase BCH Decoder
An Efficient Interpolation-Based Chase BCH DecoderAn Efficient Interpolation-Based Chase BCH Decoder
An Efficient Interpolation-Based Chase BCH Decoder
ijsrd.com
 
Fpga implementation of linear ldpc encoder
Fpga implementation of linear ldpc encoderFpga implementation of linear ldpc encoder
Fpga implementation of linear ldpc encoder
eSAT Publishing House
 
Hamlet_Khachatryan_57--61
Hamlet_Khachatryan_57--61Hamlet_Khachatryan_57--61
Hamlet_Khachatryan_57--61
Hamlet Khachatryan
 
Proposal
ProposalProposal
Proposal
Shaikh M Karim
 
Mini Project 2 - 4-to-1 Multiplexer And 1-to-4 Demultiplexer With Enable
Mini Project 2 -  4-to-1 Multiplexer And 1-to-4 Demultiplexer With EnableMini Project 2 -  4-to-1 Multiplexer And 1-to-4 Demultiplexer With Enable
Mini Project 2 - 4-to-1 Multiplexer And 1-to-4 Demultiplexer With Enable
AIMST University
 
Design and implementation of single bit error correction linear block code sy...
Design and implementation of single bit error correction linear block code sy...Design and implementation of single bit error correction linear block code sy...
Design and implementation of single bit error correction linear block code sy...
TELKOMNIKA JOURNAL
 
Error Control coding
Error Control codingError Control coding
Error Control coding
Dr Naim R Kidwai
 
Lcdf4 chap 03_p2
Lcdf4 chap 03_p2Lcdf4 chap 03_p2
Lcdf4 chap 03_p2
ozgur_can
 
Belief Propagation Decoder for LDPC Codes Based on VLSI Implementation
Belief Propagation Decoder for LDPC Codes Based on VLSI ImplementationBelief Propagation Decoder for LDPC Codes Based on VLSI Implementation
Belief Propagation Decoder for LDPC Codes Based on VLSI Implementation
inventionjournals
 
Digital electronica RSS vvvdmsASmCMmmmmmcdsdvfssc
Digital electronica RSS vvvdmsASmCMmmmmmcdsdvfsscDigital electronica RSS vvvdmsASmCMmmmmmcdsdvfssc
Digital electronica RSS vvvdmsASmCMmmmmmcdsdvfssc
Anji (M.Tech)
 
FPGA Based Decimal Matrix Code for Passive RFID Tag
FPGA Based Decimal Matrix Code for Passive RFID TagFPGA Based Decimal Matrix Code for Passive RFID Tag
FPGA Based Decimal Matrix Code for Passive RFID Tag
IJERA Editor
 
DLD Lecture Unit 4 (1).pdf
DLD Lecture Unit 4 (1).pdfDLD Lecture Unit 4 (1).pdf
DLD Lecture Unit 4 (1).pdf
ASHISHMEHRA64
 
Notes Computer Organization and Architecture
Notes Computer Organization and ArchitectureNotes Computer Organization and Architecture
Notes Computer Organization and Architecture
SureshK256753
 
Number System and conversion in Electronics.pdf
Number System and conversion in Electronics.pdfNumber System and conversion in Electronics.pdf
Number System and conversion in Electronics.pdf
ParthaSarathi882211
 
Channel Coding (Error Control Coding)
Channel Coding (Error Control Coding)Channel Coding (Error Control Coding)
Channel Coding (Error Control Coding)
Ola Mashaqi @ an-najah national university
 
International Journal of Computer Science, Engineering and Applications (IJCSEA)
International Journal of Computer Science, Engineering and Applications (IJCSEA)International Journal of Computer Science, Engineering and Applications (IJCSEA)
International Journal of Computer Science, Engineering and Applications (IJCSEA)
IJCSEA Journal
 
International Journal of Computer Science, Engineering and Applications (IJCSEA)
International Journal of Computer Science, Engineering and Applications (IJCSEA)International Journal of Computer Science, Engineering and Applications (IJCSEA)
International Journal of Computer Science, Engineering and Applications (IJCSEA)
IJCSEA Journal
 
1 Unit-1 DEC B.Tech ECE III Sem Syllabus & Intro.pptx
1 Unit-1 DEC B.Tech ECE III Sem Syllabus & Intro.pptx1 Unit-1 DEC B.Tech ECE III Sem Syllabus & Intro.pptx
1 Unit-1 DEC B.Tech ECE III Sem Syllabus & Intro.pptx
Satish Chandra
 
Fpga implementation of linear ldpc encoder
Fpga implementation of linear ldpc encoderFpga implementation of linear ldpc encoder
Fpga implementation of linear ldpc encoder
eSAT Journals
 
An Efficient Interpolation-Based Chase BCH Decoder
An Efficient Interpolation-Based Chase BCH DecoderAn Efficient Interpolation-Based Chase BCH Decoder
An Efficient Interpolation-Based Chase BCH Decoder
ijsrd.com
 
Fpga implementation of linear ldpc encoder
Fpga implementation of linear ldpc encoderFpga implementation of linear ldpc encoder
Fpga implementation of linear ldpc encoder
eSAT Publishing House
 
Mini Project 2 - 4-to-1 Multiplexer And 1-to-4 Demultiplexer With Enable
Mini Project 2 -  4-to-1 Multiplexer And 1-to-4 Demultiplexer With EnableMini Project 2 -  4-to-1 Multiplexer And 1-to-4 Demultiplexer With Enable
Mini Project 2 - 4-to-1 Multiplexer And 1-to-4 Demultiplexer With Enable
AIMST University
 
Design and implementation of single bit error correction linear block code sy...
Design and implementation of single bit error correction linear block code sy...Design and implementation of single bit error correction linear block code sy...
Design and implementation of single bit error correction linear block code sy...
TELKOMNIKA JOURNAL
 
Lcdf4 chap 03_p2
Lcdf4 chap 03_p2Lcdf4 chap 03_p2
Lcdf4 chap 03_p2
ozgur_can
 
Belief Propagation Decoder for LDPC Codes Based on VLSI Implementation
Belief Propagation Decoder for LDPC Codes Based on VLSI ImplementationBelief Propagation Decoder for LDPC Codes Based on VLSI Implementation
Belief Propagation Decoder for LDPC Codes Based on VLSI Implementation
inventionjournals
 
Digital electronica RSS vvvdmsASmCMmmmmmcdsdvfssc
Digital electronica RSS vvvdmsASmCMmmmmmcdsdvfsscDigital electronica RSS vvvdmsASmCMmmmmmcdsdvfssc
Digital electronica RSS vvvdmsASmCMmmmmmcdsdvfssc
Anji (M.Tech)
 
FPGA Based Decimal Matrix Code for Passive RFID Tag
FPGA Based Decimal Matrix Code for Passive RFID TagFPGA Based Decimal Matrix Code for Passive RFID Tag
FPGA Based Decimal Matrix Code for Passive RFID Tag
IJERA Editor
 
DLD Lecture Unit 4 (1).pdf
DLD Lecture Unit 4 (1).pdfDLD Lecture Unit 4 (1).pdf
DLD Lecture Unit 4 (1).pdf
ASHISHMEHRA64
 
Notes Computer Organization and Architecture
Notes Computer Organization and ArchitectureNotes Computer Organization and Architecture
Notes Computer Organization and Architecture
SureshK256753
 
Number System and conversion in Electronics.pdf
Number System and conversion in Electronics.pdfNumber System and conversion in Electronics.pdf
Number System and conversion in Electronics.pdf
ParthaSarathi882211
 
International Journal of Computer Science, Engineering and Applications (IJCSEA)
International Journal of Computer Science, Engineering and Applications (IJCSEA)International Journal of Computer Science, Engineering and Applications (IJCSEA)
International Journal of Computer Science, Engineering and Applications (IJCSEA)
IJCSEA Journal
 
International Journal of Computer Science, Engineering and Applications (IJCSEA)
International Journal of Computer Science, Engineering and Applications (IJCSEA)International Journal of Computer Science, Engineering and Applications (IJCSEA)
International Journal of Computer Science, Engineering and Applications (IJCSEA)
IJCSEA Journal
 

Recently uploaded (20)

Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Journal of Soft Computing in Civil Engineering
 
fluke dealers in bangalore..............
fluke dealers in bangalore..............fluke dealers in bangalore..............
fluke dealers in bangalore..............
Haresh Vaswani
 
DSP and MV the Color image processing.ppt
DSP and MV the  Color image processing.pptDSP and MV the  Color image processing.ppt
DSP and MV the Color image processing.ppt
HafizAhamed8
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)
Vəhid Gəruslu
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Journal of Soft Computing in Civil Engineering
 
The Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLabThe Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLab
Journal of Soft Computing in Civil Engineering
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
Machine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptxMachine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptx
rajeswari89780
 
Avnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights FlyerAvnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights Flyer
WillDavies22
 
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
Value Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous SecurityValue Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous Security
Marc Hornbeek
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
fluke dealers in bangalore..............
fluke dealers in bangalore..............fluke dealers in bangalore..............
fluke dealers in bangalore..............
Haresh Vaswani
 
DSP and MV the Color image processing.ppt
DSP and MV the  Color image processing.pptDSP and MV the  Color image processing.ppt
DSP and MV the Color image processing.ppt
HafizAhamed8
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)
Vəhid Gəruslu
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
Machine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptxMachine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptx
rajeswari89780
 
Avnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights FlyerAvnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights Flyer
WillDavies22
 
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
Value Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous SecurityValue Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous Security
Marc Hornbeek
 
Ad

Error Control Codes or Channel Codes -Haming Codes

  • 1. Module IV – Perfect Codes & Hamming Codes Lakshmi V.S. Assistant Professor Electronics & Communication Department Sree Chitra Thirunal College of Engineering, Trivandrum
  • 2. Perfect Codes • Perfect codes are binary codes which satisfies Hamming bound with equality • A Perfect Code is a t-error correcting code where its standard array has all error patterns of t or fewer errors and no others as coset leaders • Examples  odd-length binary repetition codes (eg. (3, 1), (5,1),..) (these codes contain two codewords: an all-zero codeword and an all-one codeword),  binary Hamming codes with dmin = 3 2 Hamming Bound ,2 𝑛 −𝑘 ≥∑ 𝑗=0 𝑡 (𝑛 𝑗) Department of Applied Electronics & Instrumentation
  • 3. Hamming Codes • Hamming codes are single error correcting perfect codes. • As t = 1, RHS = =+ =1+n • LHS = (by considering • Since Hamming codes satisfies Hamming bound with equality 3 Department of Applied Electronics & Instrumentation
  • 4. Hamming Codes - Parameters • Hamming codes are single error correcting perfect codes. • For any positive integer m≥3, there exists a Hamming code such that:  Code Length: n = 2m - 1  No. of information symbols: k = n-m =2m - m-1  No. of parity check symbols: n-k = m  Error correcting capability: t = 1 (i.e., dmin=3) • m = 3  (7, 4) Hamming code (n = 2m -1=7 & k = n-m = 4) • m = 4  (15, 11) Hamming code (n = 2m -1=15 & k = n-m = 11) • m = 5  (31, 26) Hamming code (n = 2m -1=31 & k = n-m = 26) 4 Department of Applied Electronics & Instrumentation
  • 5. Hamming Codes • The parity-check matrix H of Hamming code consists of all possible nonzero m-tuple ((n-k) tuple) as its columns since n = 2m - 1 • For (7, 4) systematic Hamming code, H matrix is of size 3 x 7 (n-k x n) 5 PT 3 x 4 I3 3 x 3 I3 3 x 3 PT 3 x 4 Department of Applied Electronics & Instrumentation
  • 6. Systematic Hamming Codes • • 6 I3 3 x 3 PT 3 x 4 P 4 x 3 I4 4 x 4 dmin = 3 edet s  dmin –1, s = 2 ecorr , t = 1 Department of Applied Electronics & Instrumentation
  • 7. Hamming Codes • Using the G matrix, the codewords can be generated as v = u.G as in the case of LBC. • Decoding can be done using standard array and syndrome decoding. • Encoder circuit, syndrome circuit and decoder circuit are same as that of LBC. 7 Department of Applied Electronics & Instrumentation
  • 8. • = .  v0  u0  u2  u3  v1  u0  u1  u2  v2  u1  u2  u3  v3  u0  v4  u1  v5  u2  v6  u3 8 Encoder – (7, 4) Systematic Hamming Code Department of Applied Electronics & Instrumentation
  • 9. Encoder – (7, 4) Systematic Hamming Code  v0  u0  u2  u3  v1  u0  u1  u2  v2  u1  u2  u3  v3  u0  v4  u1  v5  u2  v6  u3 9 Department of Applied Electronics & Instrumentation
  • 10. Decoder – (7, 4) Systematic Hamming Code • = .  s0  r0  r3  r5  r6  s1  r1  r3  r4  r5  s2  r2  r4  r5  r6 10 Department of Applied Electronics & Instrumentation
  • 11. Decoder – (7, 4) Systematic Hamming Code 11 Department of Applied Electronics & Instrumentation
  • 12. Decoder – (7, 4) Systematic Hamming Code 12 Department of Applied Electronics & Instrumentation
  • 13. Decoder – (7, 4) Systematic Hamming Code 13 Department of Applied Electronics & Instrumentation
  • 14. Decoder – (7, 4) Systematic Hamming Code 14   H T = [ 1 0 0 0 1 0 0 0 1 1 1 0 0 1 1 1 1 1 1 0 1 ] Department of Applied Electronics & Instrumentation
  • 15. Decoding Circuit for (7, 4) Systematic Hamming Code 15  s0  r0  r3  r5  r6  s1  r1  r3  r4  r5  s2  r2  r4  r5  r6  
  • 16. Non Systematic Hamming Codes • A non-systematic Hamming code can be constructed by placing the parity check bits at 2l (l = 0, 1, 2, 3, …) locations of G matrix • Procedure for constructing non-systematic Hamming code  Step 1: Write the BCD of length (n – k) for decimals from 1 to n.  Step 2: Arrange the sequences in the reverse order in a matrix form.  Step 3: Transpose of the matrix obtained in step 2 gives the parity check matrix, H for the code. 16 Department of Applied Electronics & Instrumentation
  • 17. (7, 4) Non Systematic Hamming Codes  Step 1: Write the BCD of length (n – k) for decimals from 1 to n. 17 Department of Applied Electronics & Instrumentation
  • 18. (7, 4) Non Systematic Hamming Codes  Step 2: Arrange the sequences in the reverse order in a matrix form to form HT .  Step 3: Transpose of the matrix obtained in step 2 gives the parity check matrix, H for the code. 18
  • 19. (7, 4) Non Systematic Hamming Codes • A non-systematic Hamming code can be constructed by placing the parity check bits at 2l (l = 0, 1, 2, 3, …) locations of G matrix • 1, 2 & 4 columns in H matrix are part of identity matrix • Select each row elements from remaining columns of H as part of PT and place it as 1, 2 and 4 columns of G. • Fill the remaining columns of G with columns of identity matrix. 19
  • 20. • The parity bit equations are • .The codeword format for non-systematic Hamming code is (7, 4) Non Systematic Hamming Codes 20 Department of Applied Electronics & Instrumentation
  • 21. (7, 4) Non Systematic Hamming Codes 21 v = u.G
  • 22. Decoding - (7, 4) Non Systematic Hamming Codes 22 s = e.HT Department of Applied Electronics & Instrumentation
  • 23. THANK YOU… Department of Electronics & Communication 23