SlideShare a Scribd company logo
1 of 16
Hamming Code System
Name- Dilshad Ahmad
Roll No-MT/EC/10007/19
Subject Code-EC564
Name- Richa Anand
Roll No-MT/EC/10014/19
Subject Code-EC564
ECE Dept. , BIT Mesra, Ranchi, 835215
5/30/2020
1
Content
 Introduction
 Errors
 Type of Errors
 Hamming Bound
 Hamming Code system
 Implementation of Hamming Code
 Syndrome and Decoding
 MATLAB Implementation Flow chart
 Source Code
 Output
 Conclusion
5/30/2020
2
Introduction
 Data can be corrupted during transmission, For reliable communication, errors must be
detected and corrected
 So we required a ‘Coding technique’ to overcome these errors at receiver.
 There is always some Bit Error Rate so to maintain some QoS we do encoding and
Decoding with a particular coding Scheme
 So There are Various coding scheme used according to need and Application, like
Hamming code, cyclic coding convolutional code etc.
5/30/2020
3
Errors
 What is Error?
o Error is a condition when the output information does not match with the input information. During
transmission, digital signals suffer from noise that can introduce errors in the binary bits travelling
from one system to other.
o That means a 0 bit may change to 1 or a 1 bit may change to 0.
 Error Detection: Error detection is the detection of errors caused by noise or other
impairments during transmission from the transmitter to the receiver.
 Error correction: Error correction is the detection of errors and reconstruction of the original,
error-free data.
5/30/2020
4
Type of Error:
 There are Mainly Three Types of Errors Occurs
1. Single bit error.
2. Multi bits error.
3. Burst bits error.
1 0 1 0 1 0 1 1 1 0 1 0
Single bit error: In a frame, there is only one bit, anywhere though, which is corrupt
1 0 1 0 1 0 0 1 1 0 1 0
Multi bit error: Frame is received with more than one bits in corrupted state.
1 0 1 0 1 0 0 1 1 1 1 1
Burst bit error: Frame contains more than1 consecutive bits corrupted..
5/30/2020
5
Hamming code:
 Around 1947 Richard W. Hamming developed technique for detecting and correcting single bit
errors in transmitted data. His technique requires that three parity bits (or check bits) be
transmitted with every four data bits. The algorithm is called a (7, 4) code, because it requires seven
bits to encoded four bits of data.
 In communication, Hamming codes are a family of linear error-correcting. Hamming codes can
detect up to two-bit or correct one-bit errors without detection of uncorrected errors.
0 0 1 1 0 1 0 1 1 1 1 0 1 0
0 0 1 1 0 1 0
1 1 1 1 0 1 0
Detection
Hamming Decoding
At Receiver
2 bit Detected
At Transmitter
1 0 1 1 0 1 0
Channel
At Receiver
1 bit Error Corrected
 Now Lets See what is these Hamming codes…
5/30/2020
6
Hamming Bound
 Any ( n, k ) code which is capable of correcting ‘t’ errors should satisfy the following condition
Called Hamming Bound
2 𝑛−𝑘 ≥ 𝑖=0
𝑡
𝑛𝐶𝑖 For t=1(Single Error Correcting code)
2 𝑛−𝑘 ≥n+1
 Any code which satisfy the equality condition in the hamming bound called perfect code
 For n=7, k=4 Equality condition hold
 So (7,4 ) single error correcting perfect code is called Hamming code
5/30/2020
7
Implementation of Hamming Code
 To implement Hamming code firstly we calculate Parity Bits
 Generator Matrix- It is matrix of [I,P] use to encode message bits
 For Example
 p1 = d2 + d3 + d4
p2 = d1 + d3 + d4
p3 = d1 + d2 + d4
5/30/2020
8
Continued…
 So for any Message bits (4 bits) we can get code directly using Generator matrix
C=[d]*[G]
 We send this Codeword through Channel and at receiver we decode this codeword
using parity check matrix also we find error is there or not
 Let at Receiver we get a received codeword “r”
5/30/2020
9
Syndrome and Decoding
 Syndrome-The pattern of errors, called the error syndrome, identifies the bit in error.
 If all parity bits are correct, there is no error. Otherwise, the sum of the positions of the
erroneous parity bits identifies the erroneous bit.
S=[r]. [HT]
If S =0 No Errors
S ≠ 0 Errors are there and we got Error Vector e
 S also gives location of error and this location vector verified from [HT]
5/30/2020
10
Continued…
 At last after getting the error vector e
Correct codeword= r + e
 This Syndrome Decoding for Hamming Code and error vector can’t correct more than
one error vector
 For correction more errors we have to add more redundancy
5/30/2020
11
MATLAB Implementation
 Flow Chart
Transmitter Receiver side
Channel
Start
Generator
Matrix
creation
Encoding
Parity
Generation
AWGN
Channel
Decoding
BER
Calculation
Error
Calculations
Stop 5/30/2020
12
Source Code
EbN0dB=2; Energy Per Bit
R=4/7; % (7,4) Hamming code Rate
EbN0=10^(EbN0dB/10); % Anti Log
sigma=sqrt(1/2*R*EbN0);
k=4; n=7;
Nerrs=0; Nblocks=1000; % 1000 blocks
for i = 1:Nblocks
msg=randi([0,1],1,k); %Random Msg Generation
%Encoding
cword=[msg mod(msg(1)+msg(2)+msg(3),2)...
mod(msg(2)+msg(3)+msg(4),2)...
mod(msg(1)+msg(2)+msg(4),2)];
s=1-2*cword;% BPSK bit to symbol conversion
r= s+sigma*randn(1,n); % AWGN CHANNEL
% Hard Decoding
b=(r<0); % Thresholg at Zero
dist= mod(repmat(b,16,1)+cwords,2)*ones(7,1);
[mind1,pos]=min(dist);
msg_cap1=cwords(pos,1:4);
%Soft Decoding
corr=(1-2*cwords).*r;
[mind2,pos]=max(corr);
msg_cap2=cwords(pos,1:4); % Decoded msg
Nerrs=Nerrs+sum(msg~=msg_cap1); % Eroors Calculation
end
BER_sim=Nerrs/k/Nblocks; % BER Calculation
% Name:
disp([EbN0dB BER_sim Nerrs k*Nblocks]);
5/30/2020
13
Output
For EbN0dB=2 ;
disp([EbN0dB R BER_sim Nerrs k*Nblocks]);
2 0.57143 0.05505 2202 40000
msg = % Random Input msg
0 0 0 1
cword =
0 0 0 1 0 1 1
%After AWGN Channel Received Code
r =
1.9644 0.455 1.1051 -1.89 1.2222
-0.62404 2.2142
msg_cap1 =% Decoded Msg
0 0 0 1
For EbN0dB=4 ;
disp([EbN0dB R BER_sim Nerrs k*Nblocks]);
4 0.57143 0.01545 618 40000
msg = % Random Input msg
0 1 0 0
cword =
0 1 0 0 1 1 1
%After AWGN Channel Received Code
r = 1.4018 -0.29702 0.51536 0.94538 -1.5975 -1.9073
0.36304
msg_cap1 =
0 1 0 0
5/30/2020
14
Conclusion
 Hamming Code system is very much important where we need only one
error correction and two error detection system, it is very easy to
implement and for large number of block of bits it is more efficient.
5/30/2020
15
5/30/2020
16

More Related Content

What's hot

Error Correction And Hamming Code Ibrar
Error Correction And Hamming Code IbrarError Correction And Hamming Code Ibrar
Error Correction And Hamming Code Ibraribrar562
 
Presentation on cyclic redundancy check (crc)
Presentation on cyclic redundancy check (crc)Presentation on cyclic redundancy check (crc)
Presentation on cyclic redundancy check (crc)Sudhanshu Srivastava
 
Digital Communication: Channel Coding
Digital Communication: Channel CodingDigital Communication: Channel Coding
Digital Communication: Channel CodingDr. Sanjay M. Gulhane
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction SetDr. Pankaj Zope
 
Error control coding bch, reed-solomon etc..
Error control coding   bch, reed-solomon etc..Error control coding   bch, reed-solomon etc..
Error control coding bch, reed-solomon etc..Madhumita Tamhane
 
Digital Data, Digital Signal | Scrambling Techniques
Digital Data, Digital Signal | Scrambling TechniquesDigital Data, Digital Signal | Scrambling Techniques
Digital Data, Digital Signal | Scrambling TechniquesBiplap Bhattarai
 
Serial Communication
Serial CommunicationSerial Communication
Serial CommunicationUshaRani289
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086saurav kumar
 
Ppt Digital Electronics
Ppt Digital ElectronicsPpt Digital Electronics
Ppt Digital ElectronicsNaval Kush
 
Error Control Coding -Introduction
Error Control Coding -IntroductionError Control Coding -Introduction
Error Control Coding -IntroductionBurdwan University
 
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decodersDeepikaDG1
 
Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086Urvashi Singh
 

What's hot (20)

Error Correction And Hamming Code Ibrar
Error Correction And Hamming Code IbrarError Correction And Hamming Code Ibrar
Error Correction And Hamming Code Ibrar
 
Multiplexing
MultiplexingMultiplexing
Multiplexing
 
Presentation on cyclic redundancy check (crc)
Presentation on cyclic redundancy check (crc)Presentation on cyclic redundancy check (crc)
Presentation on cyclic redundancy check (crc)
 
Digital Communication: Channel Coding
Digital Communication: Channel CodingDigital Communication: Channel Coding
Digital Communication: Channel Coding
 
Convolution Codes
Convolution CodesConvolution Codes
Convolution Codes
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction Set
 
Ethernet
EthernetEthernet
Ethernet
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 
Error control coding bch, reed-solomon etc..
Error control coding   bch, reed-solomon etc..Error control coding   bch, reed-solomon etc..
Error control coding bch, reed-solomon etc..
 
Digital Data, Digital Signal | Scrambling Techniques
Digital Data, Digital Signal | Scrambling TechniquesDigital Data, Digital Signal | Scrambling Techniques
Digital Data, Digital Signal | Scrambling Techniques
 
Serial Communication
Serial CommunicationSerial Communication
Serial Communication
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
Reed solomon codes
Reed solomon codesReed solomon codes
Reed solomon codes
 
Huffman Coding
Huffman CodingHuffman Coding
Huffman Coding
 
Ppt Digital Electronics
Ppt Digital ElectronicsPpt Digital Electronics
Ppt Digital Electronics
 
Error Control Coding -Introduction
Error Control Coding -IntroductionError Control Coding -Introduction
Error Control Coding -Introduction
 
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decoders
 
Error Control coding
Error Control codingError Control coding
Error Control coding
 
Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086
 
Line coding
Line codingLine coding
Line coding
 

Similar to Hamming code system

Digital logic designing presentation
Digital logic designing presentationDigital logic designing presentation
Digital logic designing presentationHassan Hashmi
 
DCN Error Detection & Correction
DCN Error Detection & CorrectionDCN Error Detection & Correction
DCN Error Detection & CorrectionRohan Bhatkar
 
Performance Comparision of Coded and Un-Coded OFDM for Different Fic Code
Performance Comparision of Coded and Un-Coded OFDM for Different Fic CodePerformance Comparision of Coded and Un-Coded OFDM for Different Fic Code
Performance Comparision of Coded and Un-Coded OFDM for Different Fic CodeIJERA Editor
 
M.TECH, ECE 2nd SEM LAB RECORD
M.TECH, ECE 2nd SEM LAB RECORD M.TECH, ECE 2nd SEM LAB RECORD
M.TECH, ECE 2nd SEM LAB RECORD Arif Ahmed
 
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
 
Single-Bit Parity Detection and Correction using Hamming Code 7-Bit Model
Single-Bit Parity Detection and Correction using Hamming Code 7-Bit ModelSingle-Bit Parity Detection and Correction using Hamming Code 7-Bit Model
Single-Bit Parity Detection and Correction using Hamming Code 7-Bit ModelUniversitas Pembangunan Panca Budi
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)ijceronline
 
Presentation for the Project on VLSI and Embedded
Presentation for the Project on VLSI and EmbeddedPresentation for the Project on VLSI and Embedded
Presentation for the Project on VLSI and Embeddedlthanuja01
 
13-DataLink_02.ppt
13-DataLink_02.ppt13-DataLink_02.ppt
13-DataLink_02.pptWinterSnow16
 
Reed Solomon Coding For Error Detection and Correction
Reed Solomon Coding For Error Detection and CorrectionReed Solomon Coding For Error Detection and Correction
Reed Solomon Coding For Error Detection and Correctioninventionjournals
 
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 TagIJERA Editor
 
Forward Bit Error Correction - Wireless Communications
Forward Bit Error Correction - Wireless Communications Forward Bit Error Correction - Wireless Communications
Forward Bit Error Correction - Wireless Communications Surya Chandra
 
Hard Decision Viterbi Decoder: Implementation on FPGA and Comparison of Resou...
Hard Decision Viterbi Decoder: Implementation on FPGA and Comparison of Resou...Hard Decision Viterbi Decoder: Implementation on FPGA and Comparison of Resou...
Hard Decision Viterbi Decoder: Implementation on FPGA and Comparison of Resou...IJERA Editor
 
IRJET- FPGA Implementation of Orthogonal Codes for Efficient Digital Communic...
IRJET- FPGA Implementation of Orthogonal Codes for Efficient Digital Communic...IRJET- FPGA Implementation of Orthogonal Codes for Efficient Digital Communic...
IRJET- FPGA Implementation of Orthogonal Codes for Efficient Digital Communic...IRJET Journal
 
Survey on Error Control Coding Techniques
Survey on Error Control Coding TechniquesSurvey on Error Control Coding Techniques
Survey on Error Control Coding TechniquesIJTET Journal
 

Similar to Hamming code system (20)

Digital logic designing presentation
Digital logic designing presentationDigital logic designing presentation
Digital logic designing presentation
 
DCN Error Detection & Correction
DCN Error Detection & CorrectionDCN Error Detection & Correction
DCN Error Detection & Correction
 
Performance Comparision of Coded and Un-Coded OFDM for Different Fic Code
Performance Comparision of Coded and Un-Coded OFDM for Different Fic CodePerformance Comparision of Coded and Un-Coded OFDM for Different Fic Code
Performance Comparision of Coded and Un-Coded OFDM for Different Fic Code
 
M.TECH, ECE 2nd SEM LAB RECORD
M.TECH, ECE 2nd SEM LAB RECORD M.TECH, ECE 2nd SEM LAB RECORD
M.TECH, ECE 2nd SEM LAB RECORD
 
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...
 
Single-Bit Parity Detection and Correction using Hamming Code 7-Bit Model
Single-Bit Parity Detection and Correction using Hamming Code 7-Bit ModelSingle-Bit Parity Detection and Correction using Hamming Code 7-Bit Model
Single-Bit Parity Detection and Correction using Hamming Code 7-Bit Model
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
 
Presentation for the Project on VLSI and Embedded
Presentation for the Project on VLSI and EmbeddedPresentation for the Project on VLSI and Embedded
Presentation for the Project on VLSI and Embedded
 
13-DataLink_02.ppt
13-DataLink_02.ppt13-DataLink_02.ppt
13-DataLink_02.ppt
 
error control coding
error control coding error control coding
error control coding
 
Data links
Data links Data links
Data links
 
crc_checksum.pdf
crc_checksum.pdfcrc_checksum.pdf
crc_checksum.pdf
 
Channel Coding (Error Control Coding)
Channel Coding (Error Control Coding)Channel Coding (Error Control Coding)
Channel Coding (Error Control Coding)
 
Reed Solomon Coding For Error Detection and Correction
Reed Solomon Coding For Error Detection and CorrectionReed Solomon Coding For Error Detection and Correction
Reed Solomon Coding For Error Detection and Correction
 
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
 
Forward Bit Error Correction - Wireless Communications
Forward Bit Error Correction - Wireless Communications Forward Bit Error Correction - Wireless Communications
Forward Bit Error Correction - Wireless Communications
 
Hard Decision Viterbi Decoder: Implementation on FPGA and Comparison of Resou...
Hard Decision Viterbi Decoder: Implementation on FPGA and Comparison of Resou...Hard Decision Viterbi Decoder: Implementation on FPGA and Comparison of Resou...
Hard Decision Viterbi Decoder: Implementation on FPGA and Comparison of Resou...
 
IRJET- FPGA Implementation of Orthogonal Codes for Efficient Digital Communic...
IRJET- FPGA Implementation of Orthogonal Codes for Efficient Digital Communic...IRJET- FPGA Implementation of Orthogonal Codes for Efficient Digital Communic...
IRJET- FPGA Implementation of Orthogonal Codes for Efficient Digital Communic...
 
Unit-4.pptx
Unit-4.pptxUnit-4.pptx
Unit-4.pptx
 
Survey on Error Control Coding Techniques
Survey on Error Control Coding TechniquesSurvey on Error Control Coding Techniques
Survey on Error Control Coding Techniques
 

More from DILSHAD AHMAD

Spectrum Sensing in Cognitive Radio Network
Spectrum Sensing in Cognitive Radio NetworkSpectrum Sensing in Cognitive Radio Network
Spectrum Sensing in Cognitive Radio NetworkDILSHAD AHMAD
 
Link adaptation and Adaptive coding,modulation system
Link adaptation and Adaptive coding,modulation systemLink adaptation and Adaptive coding,modulation system
Link adaptation and Adaptive coding,modulation systemDILSHAD AHMAD
 
Wireless power transmission for implantable medical devices
Wireless power transmission for implantable medical devicesWireless power transmission for implantable medical devices
Wireless power transmission for implantable medical devicesDILSHAD AHMAD
 
Network information theory,Multiterminal Network,Guassian channels
Network information theory,Multiterminal Network,Guassian channelsNetwork information theory,Multiterminal Network,Guassian channels
Network information theory,Multiterminal Network,Guassian channelsDILSHAD AHMAD
 
MIMO Antenna and Technology installation
MIMO Antenna and Technology installationMIMO Antenna and Technology installation
MIMO Antenna and Technology installationDILSHAD AHMAD
 
Broadband technology wired and wireless
Broadband technology wired and wireless Broadband technology wired and wireless
Broadband technology wired and wireless DILSHAD AHMAD
 
Disaster Risk Reduction Agenda of Urban Africa
Disaster Risk Reduction Agenda of Urban Africa Disaster Risk Reduction Agenda of Urban Africa
Disaster Risk Reduction Agenda of Urban Africa DILSHAD AHMAD
 

More from DILSHAD AHMAD (8)

Spectrum Sensing in Cognitive Radio Network
Spectrum Sensing in Cognitive Radio NetworkSpectrum Sensing in Cognitive Radio Network
Spectrum Sensing in Cognitive Radio Network
 
Link adaptation
Link adaptationLink adaptation
Link adaptation
 
Link adaptation and Adaptive coding,modulation system
Link adaptation and Adaptive coding,modulation systemLink adaptation and Adaptive coding,modulation system
Link adaptation and Adaptive coding,modulation system
 
Wireless power transmission for implantable medical devices
Wireless power transmission for implantable medical devicesWireless power transmission for implantable medical devices
Wireless power transmission for implantable medical devices
 
Network information theory,Multiterminal Network,Guassian channels
Network information theory,Multiterminal Network,Guassian channelsNetwork information theory,Multiterminal Network,Guassian channels
Network information theory,Multiterminal Network,Guassian channels
 
MIMO Antenna and Technology installation
MIMO Antenna and Technology installationMIMO Antenna and Technology installation
MIMO Antenna and Technology installation
 
Broadband technology wired and wireless
Broadband technology wired and wireless Broadband technology wired and wireless
Broadband technology wired and wireless
 
Disaster Risk Reduction Agenda of Urban Africa
Disaster Risk Reduction Agenda of Urban Africa Disaster Risk Reduction Agenda of Urban Africa
Disaster Risk Reduction Agenda of Urban Africa
 

Recently uploaded

Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 

Recently uploaded (20)

Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 

Hamming code system

  • 1. Hamming Code System Name- Dilshad Ahmad Roll No-MT/EC/10007/19 Subject Code-EC564 Name- Richa Anand Roll No-MT/EC/10014/19 Subject Code-EC564 ECE Dept. , BIT Mesra, Ranchi, 835215 5/30/2020 1
  • 2. Content  Introduction  Errors  Type of Errors  Hamming Bound  Hamming Code system  Implementation of Hamming Code  Syndrome and Decoding  MATLAB Implementation Flow chart  Source Code  Output  Conclusion 5/30/2020 2
  • 3. Introduction  Data can be corrupted during transmission, For reliable communication, errors must be detected and corrected  So we required a ‘Coding technique’ to overcome these errors at receiver.  There is always some Bit Error Rate so to maintain some QoS we do encoding and Decoding with a particular coding Scheme  So There are Various coding scheme used according to need and Application, like Hamming code, cyclic coding convolutional code etc. 5/30/2020 3
  • 4. Errors  What is Error? o Error is a condition when the output information does not match with the input information. During transmission, digital signals suffer from noise that can introduce errors in the binary bits travelling from one system to other. o That means a 0 bit may change to 1 or a 1 bit may change to 0.  Error Detection: Error detection is the detection of errors caused by noise or other impairments during transmission from the transmitter to the receiver.  Error correction: Error correction is the detection of errors and reconstruction of the original, error-free data. 5/30/2020 4
  • 5. Type of Error:  There are Mainly Three Types of Errors Occurs 1. Single bit error. 2. Multi bits error. 3. Burst bits error. 1 0 1 0 1 0 1 1 1 0 1 0 Single bit error: In a frame, there is only one bit, anywhere though, which is corrupt 1 0 1 0 1 0 0 1 1 0 1 0 Multi bit error: Frame is received with more than one bits in corrupted state. 1 0 1 0 1 0 0 1 1 1 1 1 Burst bit error: Frame contains more than1 consecutive bits corrupted.. 5/30/2020 5
  • 6. Hamming code:  Around 1947 Richard W. Hamming developed technique for detecting and correcting single bit errors in transmitted data. His technique requires that three parity bits (or check bits) be transmitted with every four data bits. The algorithm is called a (7, 4) code, because it requires seven bits to encoded four bits of data.  In communication, Hamming codes are a family of linear error-correcting. Hamming codes can detect up to two-bit or correct one-bit errors without detection of uncorrected errors. 0 0 1 1 0 1 0 1 1 1 1 0 1 0 0 0 1 1 0 1 0 1 1 1 1 0 1 0 Detection Hamming Decoding At Receiver 2 bit Detected At Transmitter 1 0 1 1 0 1 0 Channel At Receiver 1 bit Error Corrected  Now Lets See what is these Hamming codes… 5/30/2020 6
  • 7. Hamming Bound  Any ( n, k ) code which is capable of correcting ‘t’ errors should satisfy the following condition Called Hamming Bound 2 𝑛−𝑘 ≥ 𝑖=0 𝑡 𝑛𝐶𝑖 For t=1(Single Error Correcting code) 2 𝑛−𝑘 ≥n+1  Any code which satisfy the equality condition in the hamming bound called perfect code  For n=7, k=4 Equality condition hold  So (7,4 ) single error correcting perfect code is called Hamming code 5/30/2020 7
  • 8. Implementation of Hamming Code  To implement Hamming code firstly we calculate Parity Bits  Generator Matrix- It is matrix of [I,P] use to encode message bits  For Example  p1 = d2 + d3 + d4 p2 = d1 + d3 + d4 p3 = d1 + d2 + d4 5/30/2020 8
  • 9. Continued…  So for any Message bits (4 bits) we can get code directly using Generator matrix C=[d]*[G]  We send this Codeword through Channel and at receiver we decode this codeword using parity check matrix also we find error is there or not  Let at Receiver we get a received codeword “r” 5/30/2020 9
  • 10. Syndrome and Decoding  Syndrome-The pattern of errors, called the error syndrome, identifies the bit in error.  If all parity bits are correct, there is no error. Otherwise, the sum of the positions of the erroneous parity bits identifies the erroneous bit. S=[r]. [HT] If S =0 No Errors S ≠ 0 Errors are there and we got Error Vector e  S also gives location of error and this location vector verified from [HT] 5/30/2020 10
  • 11. Continued…  At last after getting the error vector e Correct codeword= r + e  This Syndrome Decoding for Hamming Code and error vector can’t correct more than one error vector  For correction more errors we have to add more redundancy 5/30/2020 11
  • 12. MATLAB Implementation  Flow Chart Transmitter Receiver side Channel Start Generator Matrix creation Encoding Parity Generation AWGN Channel Decoding BER Calculation Error Calculations Stop 5/30/2020 12
  • 13. Source Code EbN0dB=2; Energy Per Bit R=4/7; % (7,4) Hamming code Rate EbN0=10^(EbN0dB/10); % Anti Log sigma=sqrt(1/2*R*EbN0); k=4; n=7; Nerrs=0; Nblocks=1000; % 1000 blocks for i = 1:Nblocks msg=randi([0,1],1,k); %Random Msg Generation %Encoding cword=[msg mod(msg(1)+msg(2)+msg(3),2)... mod(msg(2)+msg(3)+msg(4),2)... mod(msg(1)+msg(2)+msg(4),2)]; s=1-2*cword;% BPSK bit to symbol conversion r= s+sigma*randn(1,n); % AWGN CHANNEL % Hard Decoding b=(r<0); % Thresholg at Zero dist= mod(repmat(b,16,1)+cwords,2)*ones(7,1); [mind1,pos]=min(dist); msg_cap1=cwords(pos,1:4); %Soft Decoding corr=(1-2*cwords).*r; [mind2,pos]=max(corr); msg_cap2=cwords(pos,1:4); % Decoded msg Nerrs=Nerrs+sum(msg~=msg_cap1); % Eroors Calculation end BER_sim=Nerrs/k/Nblocks; % BER Calculation % Name: disp([EbN0dB BER_sim Nerrs k*Nblocks]); 5/30/2020 13
  • 14. Output For EbN0dB=2 ; disp([EbN0dB R BER_sim Nerrs k*Nblocks]); 2 0.57143 0.05505 2202 40000 msg = % Random Input msg 0 0 0 1 cword = 0 0 0 1 0 1 1 %After AWGN Channel Received Code r = 1.9644 0.455 1.1051 -1.89 1.2222 -0.62404 2.2142 msg_cap1 =% Decoded Msg 0 0 0 1 For EbN0dB=4 ; disp([EbN0dB R BER_sim Nerrs k*Nblocks]); 4 0.57143 0.01545 618 40000 msg = % Random Input msg 0 1 0 0 cword = 0 1 0 0 1 1 1 %After AWGN Channel Received Code r = 1.4018 -0.29702 0.51536 0.94538 -1.5975 -1.9073 0.36304 msg_cap1 = 0 1 0 0 5/30/2020 14
  • 15. Conclusion  Hamming Code system is very much important where we need only one error correction and two error detection system, it is very easy to implement and for large number of block of bits it is more efficient. 5/30/2020 15