SlideShare a Scribd company logo
CSN08704
Data, Audio, Video and Images
http://asecuritysite.com/comms
Telecommunications
Prof Bill Buchanan
5: Error Coding
CSN08704
Data, Audio, Video and Images
http://asecuritysite.com/comms
Telecommunications
Prof Bill Buchanan
5: Error Coding: Modulo-2
Modulo-2
Digital coding uses modulo-2 arithmetic where addition becomes the following
operations:
• 0+0=0 1+1=0
• 0+1=1 1+0=1
It performs the equivalent operation to an exclusive-OR (XOR) function. For
modulo-2 arithmetic, subtraction is the same operation as addition:
• 0–0=0 1–1=0
• 0–1=1 1–0=1
Multiplication is performed with the following:
• 00=0 01=0
• 10=0 11=1
which is an equivalent operation to a logical AND operation.
Binary Manipulation
• Link.
10111 x4
+x2
+x+1
1000 0001 x7
+ 1
1111 1111 1111 1111 x11
+x10
+x9
+x8
+x7
+x6
+x5
+x4
+x3
+x2
+x+1
10101010 x6
+x4
+x2
+x
For example: 101110
is represented as: (x2
+1)(x2
+x)
which equates to: x4
+x3
+x2
+x
which is thus: 11110
Binary Manipulation
• x4+x4+x2+1+1 becomes x2
as x4+x4 =0
Binary Manipulation
• Link.
Thus: 1010101110
is represented as: (x4
+x2
+1)(x3
+x2
+x)
which equates to: x7
+x6
+x5
+x5
+x4
+x3
+x3
+x2
+x
which equates to: x7
+x6
+x4
+x2
+x
which is thus: 11010110
Modulo-2 Division
• Link.
1011
100 101101
100
110
100
101
100
1
Hamming distance
• Hamming difference between 101101010 and 011101100? Link.
• The Hamming distance can be used to determine how well the code
will cope with errors. The minimum Hamming distance min{d(C1,C2)}
defines by how many bits the code must change so that one code can
become another code.
• A code C can detect up to N errors for any code word if d(C) is greater
than or equal to N+1 (that is, d(C)N+1).
• A code C can correct up to M errors in any code word if d(C) is greater
than or equal to 2M+1 (that is, d(C)2M+1).
Error detection
• For example: {00000, 01101, 10110, 11011} has a Hamming distance
of 3. Link.
• d(C)N+1
• d(C) is 3, thus N must be 2. So we can detect one or two bits in error
in the code.
• Eg 00000 could become 01010 ... and this will be detected as an error,
as the code does not exist.
Error correction
• For example: {00000, 01101, 10110, 11011} has a Hamming distance
of 3. Link.
• d(C)2M+1
• d(C) is 3, thus M must be 1. So we can correct one bit in error in the
code.
• Eg 00000 could become 00010 ... and as the nearest code will be
“00000”.
Examples
• What is the Hamming distance of {00000000, 11111111, 11110000,
01010101} Link? How many errors can be detected? How many errors
can be corrected?
• What is the Hamming distance of {10111101011, 10011111011,
11110101011, 10100101011, 10111101000} Link?
CSN08704
Data, Audio, Video and Images
http://asecuritysite.com/comms
Telecommunications
Prof Bill Buchanan
5: Error Coding: Error Correction
Linear and cyclic codes
• Linear Code: sum of any two codes equals another code - {00, 01, 10,
11} and {00000, 01101, 10110, 11011}.
• Cyclic Codes: Linear Code + When a cyclic shift also gives a code word
- {0000, 0110, 0011, 1001, 1100, 0001, 0010, 0100, 1000}
• Is {000, 010, 011, 100, 001} cyclic?
Block parity
• Odd parity (make number of 1s
odd) or Even parity (make
number of 1s even).
• Detects single bit errors.
• Cannot detect when two bits in
error in the same position.
• Example (binary). Link.
• Example (int). Link.
1 0000 0001
4 0000 0100
12 0000 1100
–1 1111 1111
–6 1111 1010
17 0001 0001
0 0000 0000
–10 1111 0110
1110 1011
CSN08704
Data, Audio, Video and Images
Telecommunications
Cyclic Redundancy Check
Cyclic redundancy checking (CRC)
Example: We have 32, and make it divisible by 9, we add a ‘0’ to make
‘320’, and now divide by 9, to give 35 remainder 4. So lets add ‘4’ to
make 324. Now when it is received we divide by 9, and if the answer is
zero, there are no errors, and we can ignore the last digit.
CRC-CCITT: x16+x12+x5+1
• The error correction code is 16 bits long and is the remainder
of the data message polynomial G(x) divided by the
generator polynomial P(x) (x16+x12+x5+1, i.e.
10001000000100001).
• The quotient is discarded and the remainder is truncated to
16 bits. This is then appended to the message as the coded
word.
x16+x12+x5+1 G(x)
CRC Example
• Example. Link.
For a 7-bit data code 1001100 determine the encoded bit pattern using a CRC generating
polynomial of P(x)=x3
+x2
+x0
. Show that the receiver will not detect an error if there are no
bits in error.
P(x)=x3
+x2
+x0
(1101)
G(x)=x6
+x3
+x2
(1001100)
Multiply by the number of bits in the CRC polynomial.
x3
(x6
+x3
+x2
)
x9
+x6
+x5
(1001100000)
Figure 5.3 shows the operations at the transmitter. The transmitted message is thus:
1001100001
Figure 5.3
CRC (Receiving)
• Example. Link.
For a 7-bit data code 1001100 determine the encoded bit pattern using a CRC generating
polynomial of P(x)=x3
+x2
+x0
. Show that the receiver will not detect an error if there are no
bits in error.
P(x)=x3
+x2
+x0
(1101)
G(x)=x6
+x3
+x2
(1001100)
Multiply by the number of bits in the CRC polynomial.
x3
(x6
+x3
+x2
)
x9
+x6
+x5
(1001100000)
Figure 5.3 shows the operations at the transmitter. The transmitted message is thus:
1001100001
No error!
LRC/VRC
• Link.
F r e d d y LRC
b0 0 0 1 0 0 1 0
b1 1 1 0 0 0 0 0
b2 1 0 1 1 1 0 0
b3 0 0 0 0 0 1 1
b4 0 1 0 0 0 1 0
b5 0 1 1 1 1 1 1
b6 1 1 1 1 1 1 0
VRC 0 1 1 0 0 0 1
CSN08704
Data, Audio, Video and Images
http://asecuritysite.com/comms
Telecommunications
Prof Bill Buchanan
Hamming Code
Hamming Codes
Error correction: m is number of bits in the data symbol
n is number of Hamming bits
Eg if we have 4 bits (m=4). Then to correct we need n=3 (as 8 is greater
than or equal to 4+3+1).
How many error correcting bits would be need for 5 bits?
12  nmn
Hamming Codes
The character is 011001
The Hamming bits are HHHH
The message format will be 01H100H1HH
Position Code
9 1001
7 0111
3 0011
XOR 1101
10 9 8 7 6 5 4 3 2 1
0 1 1 1 0 0 1 1 0 1
Hamming Codes
Position Code
Hamming 1101
9 1001
7 0111
3 0011
XOR 0000
Position Code
Hamming 1101
9 1001
7 0111
5 0101
3 0011
XOR 0101
No error Error in bit 5
10 9 8 7 6 5 4 3 2 1
0 1 1 1 0 0 1 1 0 1
Hamming Code
Sending:
Receiving:
P1 =D1  D2  D4
P2 =D1  D3  D4
P3 =D2  D3  D4
D4 D3 D2 P3 D1 P2 P1
111 110 101 100 011 010 001
S1 =P1  D1  D2  D4
S2 =P2  D1  D3  D4
S3 =P3  D2  D3  D4
Hamming Code











1111000
1100110
1010101
H
Check of P1
Check of P2
Check of P3
Hamming Code (receiving)
• At the receiver we calculate the Syndrome matrix S ... if all zeros ... no
error!












































3
2
1
4
3
2
3
1
2
1
1111000
1100110
1010101
S
S
S
D
D
D
P
D
P
P
T
HRS
Hamming Code (Example)
• Link.











1111000
1100110
1010101
H and























0
1
0
1
1
0
1
T
T
D1
D2
D3
D4
 4323121 DDDPDPPT
and D1=1, D2=0, D3=1, D4=0
for even parity:
P1 checks the 1st, 3rd, 5th and 7th, so P1  D1  D2  D4 = 0; thus P1 =1
P2 checks the 2nd, 3rd, 6th and 7th, so P2  D1  D3  D4 = 0; thus P2 =0
P3 checks the 4th, 5th, 6th and 7th, so P3  D2  D3  D4 = 0; thus P3 =1
Hamming Code
• Let’s check the Syndrome matrix:


























































0
0
0
0.11.10.11.11.00.01.0
0.11.10.01.01.10.11.0
0.11.00.11.01.10.01.1
0
1
0
1
1
0
1
1111000
1100110
1010101
T
HT
No error!
Hamming Code
Error:
 0111101R
Error in bit 5


























































1
0
1
0.11.11.11.11.00.01.0
0.11.11.01.01.10.11.0
0.11.01.11.01.10.01.1
0
1
1
1
1
0
1
1111000
1100110
1010101
T
HR
CSN08704
Data, Audio, Video and Images
http://asecuritysite.com/comms
Telecommunications
Prof Bill Buchanan
5: Error Coding

More Related Content

What's hot

Binary Arithmetic Operations
Binary Arithmetic OperationsBinary Arithmetic Operations
Binary Arithmetic Operations
Digital System Design
 
Chapter 2.1 introduction to number system
Chapter 2.1 introduction to number systemChapter 2.1 introduction to number system
Chapter 2.1 introduction to number system
ISMT College
 
PPT ON NUMBER SYSTEM
PPT ON NUMBER SYSTEMPPT ON NUMBER SYSTEM
PPT ON NUMBER SYSTEM
Rishabh Kanth
 
Binary Mathematics Classwork and Hw
Binary Mathematics Classwork and HwBinary Mathematics Classwork and Hw
Binary Mathematics Classwork and HwJoji Thompson
 
Chapter 07 Digital Alrithmetic and Arithmetic Circuits
Chapter 07 Digital Alrithmetic and Arithmetic CircuitsChapter 07 Digital Alrithmetic and Arithmetic Circuits
Chapter 07 Digital Alrithmetic and Arithmetic Circuits
SSE_AndyLi
 
01.number systems
01.number systems01.number systems
01.number systemsrasha3
 
Basic of number system
Basic of number systemBasic of number system
Basic of number system
Akhilesh Maithani
 
digital logic circuits, digital component floting and fixed point
digital logic circuits, digital component floting and fixed pointdigital logic circuits, digital component floting and fixed point
digital logic circuits, digital component floting and fixed point
Rai University
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
Aiman Hud
 
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
Arti Parab Academics
 
Chapter 6 base_number
Chapter 6 base_numberChapter 6 base_number
Chapter 6 base_number
Nazrul Shah
 
Binary number systems
Binary number systemsBinary number systems
Binary number systems
KULDEEP MATHUR
 
Number Systems
Number SystemsNumber Systems
Number Systems
Jubayer Alam Shoikat
 
Decimal to Binary Conversion
Decimal to Binary ConversionDecimal to Binary Conversion
Decimal to Binary Conversion
adil raja
 
Numbersystemcont
NumbersystemcontNumbersystemcont
Numbersystemcont
Sajib
 
01.number systems
01.number systems01.number systems
01.number systems
Sripati Mahapatra
 
ALL ABOUT NUMBER SYSTEMS
ALL ABOUT NUMBER SYSTEMSALL ABOUT NUMBER SYSTEMS
ALL ABOUT NUMBER SYSTEMS
vinaygoel18
 

What's hot (20)

Binary Arithmetic Operations
Binary Arithmetic OperationsBinary Arithmetic Operations
Binary Arithmetic Operations
 
Chapter 2.1 introduction to number system
Chapter 2.1 introduction to number systemChapter 2.1 introduction to number system
Chapter 2.1 introduction to number system
 
PPT ON NUMBER SYSTEM
PPT ON NUMBER SYSTEMPPT ON NUMBER SYSTEM
PPT ON NUMBER SYSTEM
 
06 floating point
06 floating point06 floating point
06 floating point
 
Binary Mathematics Classwork and Hw
Binary Mathematics Classwork and HwBinary Mathematics Classwork and Hw
Binary Mathematics Classwork and Hw
 
Chapter 07 Digital Alrithmetic and Arithmetic Circuits
Chapter 07 Digital Alrithmetic and Arithmetic CircuitsChapter 07 Digital Alrithmetic and Arithmetic Circuits
Chapter 07 Digital Alrithmetic and Arithmetic Circuits
 
01.number systems
01.number systems01.number systems
01.number systems
 
Basic of number system
Basic of number systemBasic of number system
Basic of number system
 
digital logic circuits, digital component floting and fixed point
digital logic circuits, digital component floting and fixed pointdigital logic circuits, digital component floting and fixed point
digital logic circuits, digital component floting and fixed point
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
 
Chapter 6 base_number
Chapter 6 base_numberChapter 6 base_number
Chapter 6 base_number
 
Binary number systems
Binary number systemsBinary number systems
Binary number systems
 
Class03
Class03Class03
Class03
 
Number Systems
Number SystemsNumber Systems
Number Systems
 
Decimal to Binary Conversion
Decimal to Binary ConversionDecimal to Binary Conversion
Decimal to Binary Conversion
 
Okkkkk
OkkkkkOkkkkk
Okkkkk
 
Numbersystemcont
NumbersystemcontNumbersystemcont
Numbersystemcont
 
01.number systems
01.number systems01.number systems
01.number systems
 
ALL ABOUT NUMBER SYSTEMS
ALL ABOUT NUMBER SYSTEMSALL ABOUT NUMBER SYSTEMS
ALL ABOUT NUMBER SYSTEMS
 

Similar to 5. Error Coding

Oth1
Oth1Oth1
Oth1b137
 
Digital Fundamental Learning for the Students
Digital Fundamental Learning for the StudentsDigital Fundamental Learning for the Students
Digital Fundamental Learning for the Students
shaival
 
CRC implementation
CRC implementation CRC implementation
CRC implementation
ajay singh
 
Error Detection and correction concepts in Data communication and networks
Error Detection and correction concepts in Data communication and networksError Detection and correction concepts in Data communication and networks
Error Detection and correction concepts in Data communication and networks
Nt Arvind
 
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptx
sulekhasaxena2
 
GROUP03_AMAK:ERROR DETECTION AND CORRECTION PPT
GROUP03_AMAK:ERROR DETECTION AND CORRECTION PPTGROUP03_AMAK:ERROR DETECTION AND CORRECTION PPT
GROUP03_AMAK:ERROR DETECTION AND CORRECTION PPTKrishbathija
 
05 directnets errors
05 directnets errors05 directnets errors
05 directnets errorsjyang1983
 
Chapter 10: Error Correction and Detection
Chapter 10: Error Correction and DetectionChapter 10: Error Correction and Detection
Chapter 10: Error Correction and Detection
JeoffnaRuth
 
21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx
GobinathAECEJRF1101
 
DLD-Introduction.pptx
DLD-Introduction.pptxDLD-Introduction.pptx
DLD-Introduction.pptx
UzairAhmadWalana
 
linear codes and cyclic codes
linear codes and cyclic codeslinear codes and cyclic codes
linear codes and cyclic codes
saigopinadh bodigiri
 
Digital Logic & Design
Digital Logic & DesignDigital Logic & Design
Digital Logic & Design
Rokonuzzaman Rony
 
Lecture4 binary-numbers-logic-operations
Lecture4  binary-numbers-logic-operationsLecture4  binary-numbers-logic-operations
Lecture4 binary-numbers-logic-operationsmarkme18
 
Digital Logic Design.pptx
Digital Logic Design.pptxDigital Logic Design.pptx
Digital Logic Design.pptx
AminaZahid16
 
New error-detection
New error-detectionNew error-detection
New error-detectionNitesh Singh
 

Similar to 5. Error Coding (20)

Oth1
Oth1Oth1
Oth1
 
Data linklayer
Data linklayerData linklayer
Data linklayer
 
Lecture set 3
Lecture set 3Lecture set 3
Lecture set 3
 
Digital Fundamental Learning for the Students
Digital Fundamental Learning for the StudentsDigital Fundamental Learning for the Students
Digital Fundamental Learning for the Students
 
CRC implementation
CRC implementation CRC implementation
CRC implementation
 
Error Detection and correction concepts in Data communication and networks
Error Detection and correction concepts in Data communication and networksError Detection and correction concepts in Data communication and networks
Error Detection and correction concepts in Data communication and networks
 
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptx
 
Dpsd lecture-notes
Dpsd lecture-notesDpsd lecture-notes
Dpsd lecture-notes
 
GROUP03_AMAK:ERROR DETECTION AND CORRECTION PPT
GROUP03_AMAK:ERROR DETECTION AND CORRECTION PPTGROUP03_AMAK:ERROR DETECTION AND CORRECTION PPT
GROUP03_AMAK:ERROR DETECTION AND CORRECTION PPT
 
05 directnets errors
05 directnets errors05 directnets errors
05 directnets errors
 
Chapter 10: Error Correction and Detection
Chapter 10: Error Correction and DetectionChapter 10: Error Correction and Detection
Chapter 10: Error Correction and Detection
 
Chapter 10
Chapter 10Chapter 10
Chapter 10
 
21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx
 
DLD-Introduction.pptx
DLD-Introduction.pptxDLD-Introduction.pptx
DLD-Introduction.pptx
 
linear codes and cyclic codes
linear codes and cyclic codeslinear codes and cyclic codes
linear codes and cyclic codes
 
Digital Logic & Design
Digital Logic & DesignDigital Logic & Design
Digital Logic & Design
 
Ch3 datalink
Ch3 datalinkCh3 datalink
Ch3 datalink
 
Lecture4 binary-numbers-logic-operations
Lecture4  binary-numbers-logic-operationsLecture4  binary-numbers-logic-operations
Lecture4 binary-numbers-logic-operations
 
Digital Logic Design.pptx
Digital Logic Design.pptxDigital Logic Design.pptx
Digital Logic Design.pptx
 
New error-detection
New error-detectionNew error-detection
New error-detection
 

More from Napier University

Intrusion Detection Systems
Intrusion Detection SystemsIntrusion Detection Systems
Intrusion Detection Systems
Napier University
 
Networks
NetworksNetworks
Memory, Big Data and SIEM
Memory, Big Data and SIEMMemory, Big Data and SIEM
Memory, Big Data and SIEM
Napier University
 
What is Cyber Data?
What is Cyber Data?What is Cyber Data?
What is Cyber Data?
Napier University
 
Open Source Intelligence
Open Source IntelligenceOpen Source Intelligence
Open Source Intelligence
Napier University
 
10. Data to Information: NumPy and Pandas
10. Data to Information: NumPy and Pandas10. Data to Information: NumPy and Pandas
10. Data to Information: NumPy and Pandas
Napier University
 
2. Defence Systems
2. Defence Systems2. Defence Systems
2. Defence Systems
Napier University
 
1. Cyber and Intelligence
1. Cyber and Intelligence1. Cyber and Intelligence
1. Cyber and Intelligence
Napier University
 
The Road Ahead for Ripple, Marjan Delatinne
The Road Ahead for Ripple, Marjan DelatinneThe Road Ahead for Ripple, Marjan Delatinne
The Road Ahead for Ripple, Marjan Delatinne
Napier University
 
Delivering The Tel Aviv Stock Exchange Securities, Duncan Johnston-Watt
 Delivering The Tel Aviv Stock Exchange Securities, Duncan Johnston-Watt Delivering The Tel Aviv Stock Exchange Securities, Duncan Johnston-Watt
Delivering The Tel Aviv Stock Exchange Securities, Duncan Johnston-Watt
Napier University
 
ARTiFACTS, Emma Boswood
ARTiFACTS, Emma BoswoodARTiFACTS, Emma Boswood
ARTiFACTS, Emma Boswood
Napier University
 
RMIT Blockchain Innovation Hub, Chris Berg
RMIT Blockchain Innovation Hub, Chris BergRMIT Blockchain Innovation Hub, Chris Berg
RMIT Blockchain Innovation Hub, Chris Berg
Napier University
 
Keynote, Naseem Naqvi
Keynote, Naseem Naqvi Keynote, Naseem Naqvi
Keynote, Naseem Naqvi
Napier University
 
Browser-based Crypto M, C. F Mondschein
Browser-based Crypto M, C. F MondscheinBrowser-based Crypto M, C. F Mondschein
Browser-based Crypto M, C. F Mondschein
Napier University
 
Should we transform or adapt to blockchain - a public sector perspective?, Al...
Should we transform or adapt to blockchain - a public sector perspective?, Al...Should we transform or adapt to blockchain - a public sector perspective?, Al...
Should we transform or adapt to blockchain - a public sector perspective?, Al...
Napier University
 
IoT device attestation system using blockchain, Alistair Duke
IoT device attestation system using blockchain, Alistair DukeIoT device attestation system using blockchain, Alistair Duke
IoT device attestation system using blockchain, Alistair Duke
Napier University
 
Robust Programming of Smart Contracts in Solidity+, RK Shyamasundar
Robust Programming of Smart Contracts in Solidity+, RK ShyamasundarRobust Programming of Smart Contracts in Solidity+, RK Shyamasundar
Robust Programming of Smart Contracts in Solidity+, RK Shyamasundar
Napier University
 
Using Blockchain for Evidence Purpose, Rafael Prabucki
Using Blockchain for Evidence Purpose, Rafael PrabuckiUsing Blockchain for Evidence Purpose, Rafael Prabucki
Using Blockchain for Evidence Purpose, Rafael Prabucki
Napier University
 
Cryptocurrencies and cyberlaundering- the need for regulation, Gian Marco Bov...
Cryptocurrencies and cyberlaundering- the need for regulation, Gian Marco Bov...Cryptocurrencies and cyberlaundering- the need for regulation, Gian Marco Bov...
Cryptocurrencies and cyberlaundering- the need for regulation, Gian Marco Bov...
Napier University
 
Emerging Regulatory Approaches to Blockchain-based Token Economy, Agata Fereirra
Emerging Regulatory Approaches to Blockchain-based Token Economy, Agata FereirraEmerging Regulatory Approaches to Blockchain-based Token Economy, Agata Fereirra
Emerging Regulatory Approaches to Blockchain-based Token Economy, Agata Fereirra
Napier University
 

More from Napier University (20)

Intrusion Detection Systems
Intrusion Detection SystemsIntrusion Detection Systems
Intrusion Detection Systems
 
Networks
NetworksNetworks
Networks
 
Memory, Big Data and SIEM
Memory, Big Data and SIEMMemory, Big Data and SIEM
Memory, Big Data and SIEM
 
What is Cyber Data?
What is Cyber Data?What is Cyber Data?
What is Cyber Data?
 
Open Source Intelligence
Open Source IntelligenceOpen Source Intelligence
Open Source Intelligence
 
10. Data to Information: NumPy and Pandas
10. Data to Information: NumPy and Pandas10. Data to Information: NumPy and Pandas
10. Data to Information: NumPy and Pandas
 
2. Defence Systems
2. Defence Systems2. Defence Systems
2. Defence Systems
 
1. Cyber and Intelligence
1. Cyber and Intelligence1. Cyber and Intelligence
1. Cyber and Intelligence
 
The Road Ahead for Ripple, Marjan Delatinne
The Road Ahead for Ripple, Marjan DelatinneThe Road Ahead for Ripple, Marjan Delatinne
The Road Ahead for Ripple, Marjan Delatinne
 
Delivering The Tel Aviv Stock Exchange Securities, Duncan Johnston-Watt
 Delivering The Tel Aviv Stock Exchange Securities, Duncan Johnston-Watt Delivering The Tel Aviv Stock Exchange Securities, Duncan Johnston-Watt
Delivering The Tel Aviv Stock Exchange Securities, Duncan Johnston-Watt
 
ARTiFACTS, Emma Boswood
ARTiFACTS, Emma BoswoodARTiFACTS, Emma Boswood
ARTiFACTS, Emma Boswood
 
RMIT Blockchain Innovation Hub, Chris Berg
RMIT Blockchain Innovation Hub, Chris BergRMIT Blockchain Innovation Hub, Chris Berg
RMIT Blockchain Innovation Hub, Chris Berg
 
Keynote, Naseem Naqvi
Keynote, Naseem Naqvi Keynote, Naseem Naqvi
Keynote, Naseem Naqvi
 
Browser-based Crypto M, C. F Mondschein
Browser-based Crypto M, C. F MondscheinBrowser-based Crypto M, C. F Mondschein
Browser-based Crypto M, C. F Mondschein
 
Should we transform or adapt to blockchain - a public sector perspective?, Al...
Should we transform or adapt to blockchain - a public sector perspective?, Al...Should we transform or adapt to blockchain - a public sector perspective?, Al...
Should we transform or adapt to blockchain - a public sector perspective?, Al...
 
IoT device attestation system using blockchain, Alistair Duke
IoT device attestation system using blockchain, Alistair DukeIoT device attestation system using blockchain, Alistair Duke
IoT device attestation system using blockchain, Alistair Duke
 
Robust Programming of Smart Contracts in Solidity+, RK Shyamasundar
Robust Programming of Smart Contracts in Solidity+, RK ShyamasundarRobust Programming of Smart Contracts in Solidity+, RK Shyamasundar
Robust Programming of Smart Contracts in Solidity+, RK Shyamasundar
 
Using Blockchain for Evidence Purpose, Rafael Prabucki
Using Blockchain for Evidence Purpose, Rafael PrabuckiUsing Blockchain for Evidence Purpose, Rafael Prabucki
Using Blockchain for Evidence Purpose, Rafael Prabucki
 
Cryptocurrencies and cyberlaundering- the need for regulation, Gian Marco Bov...
Cryptocurrencies and cyberlaundering- the need for regulation, Gian Marco Bov...Cryptocurrencies and cyberlaundering- the need for regulation, Gian Marco Bov...
Cryptocurrencies and cyberlaundering- the need for regulation, Gian Marco Bov...
 
Emerging Regulatory Approaches to Blockchain-based Token Economy, Agata Fereirra
Emerging Regulatory Approaches to Blockchain-based Token Economy, Agata FereirraEmerging Regulatory Approaches to Blockchain-based Token Economy, Agata Fereirra
Emerging Regulatory Approaches to Blockchain-based Token Economy, Agata Fereirra
 

Recently uploaded

The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 

Recently uploaded (20)

The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 

5. Error Coding

  • 1. CSN08704 Data, Audio, Video and Images http://asecuritysite.com/comms Telecommunications Prof Bill Buchanan 5: Error Coding
  • 2. CSN08704 Data, Audio, Video and Images http://asecuritysite.com/comms Telecommunications Prof Bill Buchanan 5: Error Coding: Modulo-2
  • 3. Modulo-2 Digital coding uses modulo-2 arithmetic where addition becomes the following operations: • 0+0=0 1+1=0 • 0+1=1 1+0=1 It performs the equivalent operation to an exclusive-OR (XOR) function. For modulo-2 arithmetic, subtraction is the same operation as addition: • 0–0=0 1–1=0 • 0–1=1 1–0=1 Multiplication is performed with the following: • 00=0 01=0 • 10=0 11=1 which is an equivalent operation to a logical AND operation.
  • 4. Binary Manipulation • Link. 10111 x4 +x2 +x+1 1000 0001 x7 + 1 1111 1111 1111 1111 x11 +x10 +x9 +x8 +x7 +x6 +x5 +x4 +x3 +x2 +x+1 10101010 x6 +x4 +x2 +x For example: 101110 is represented as: (x2 +1)(x2 +x) which equates to: x4 +x3 +x2 +x which is thus: 11110
  • 5. Binary Manipulation • x4+x4+x2+1+1 becomes x2 as x4+x4 =0
  • 6. Binary Manipulation • Link. Thus: 1010101110 is represented as: (x4 +x2 +1)(x3 +x2 +x) which equates to: x7 +x6 +x5 +x5 +x4 +x3 +x3 +x2 +x which equates to: x7 +x6 +x4 +x2 +x which is thus: 11010110
  • 7. Modulo-2 Division • Link. 1011 100 101101 100 110 100 101 100 1
  • 8. Hamming distance • Hamming difference between 101101010 and 011101100? Link. • The Hamming distance can be used to determine how well the code will cope with errors. The minimum Hamming distance min{d(C1,C2)} defines by how many bits the code must change so that one code can become another code. • A code C can detect up to N errors for any code word if d(C) is greater than or equal to N+1 (that is, d(C)N+1). • A code C can correct up to M errors in any code word if d(C) is greater than or equal to 2M+1 (that is, d(C)2M+1).
  • 9. Error detection • For example: {00000, 01101, 10110, 11011} has a Hamming distance of 3. Link. • d(C)N+1 • d(C) is 3, thus N must be 2. So we can detect one or two bits in error in the code. • Eg 00000 could become 01010 ... and this will be detected as an error, as the code does not exist.
  • 10. Error correction • For example: {00000, 01101, 10110, 11011} has a Hamming distance of 3. Link. • d(C)2M+1 • d(C) is 3, thus M must be 1. So we can correct one bit in error in the code. • Eg 00000 could become 00010 ... and as the nearest code will be “00000”.
  • 11. Examples • What is the Hamming distance of {00000000, 11111111, 11110000, 01010101} Link? How many errors can be detected? How many errors can be corrected? • What is the Hamming distance of {10111101011, 10011111011, 11110101011, 10100101011, 10111101000} Link?
  • 12. CSN08704 Data, Audio, Video and Images http://asecuritysite.com/comms Telecommunications Prof Bill Buchanan 5: Error Coding: Error Correction
  • 13. Linear and cyclic codes • Linear Code: sum of any two codes equals another code - {00, 01, 10, 11} and {00000, 01101, 10110, 11011}. • Cyclic Codes: Linear Code + When a cyclic shift also gives a code word - {0000, 0110, 0011, 1001, 1100, 0001, 0010, 0100, 1000} • Is {000, 010, 011, 100, 001} cyclic?
  • 14. Block parity • Odd parity (make number of 1s odd) or Even parity (make number of 1s even). • Detects single bit errors. • Cannot detect when two bits in error in the same position. • Example (binary). Link. • Example (int). Link. 1 0000 0001 4 0000 0100 12 0000 1100 –1 1111 1111 –6 1111 1010 17 0001 0001 0 0000 0000 –10 1111 0110 1110 1011
  • 15. CSN08704 Data, Audio, Video and Images Telecommunications Cyclic Redundancy Check
  • 16. Cyclic redundancy checking (CRC) Example: We have 32, and make it divisible by 9, we add a ‘0’ to make ‘320’, and now divide by 9, to give 35 remainder 4. So lets add ‘4’ to make 324. Now when it is received we divide by 9, and if the answer is zero, there are no errors, and we can ignore the last digit. CRC-CCITT: x16+x12+x5+1 • The error correction code is 16 bits long and is the remainder of the data message polynomial G(x) divided by the generator polynomial P(x) (x16+x12+x5+1, i.e. 10001000000100001). • The quotient is discarded and the remainder is truncated to 16 bits. This is then appended to the message as the coded word. x16+x12+x5+1 G(x)
  • 17. CRC Example • Example. Link. For a 7-bit data code 1001100 determine the encoded bit pattern using a CRC generating polynomial of P(x)=x3 +x2 +x0 . Show that the receiver will not detect an error if there are no bits in error. P(x)=x3 +x2 +x0 (1101) G(x)=x6 +x3 +x2 (1001100) Multiply by the number of bits in the CRC polynomial. x3 (x6 +x3 +x2 ) x9 +x6 +x5 (1001100000) Figure 5.3 shows the operations at the transmitter. The transmitted message is thus: 1001100001 Figure 5.3
  • 18. CRC (Receiving) • Example. Link. For a 7-bit data code 1001100 determine the encoded bit pattern using a CRC generating polynomial of P(x)=x3 +x2 +x0 . Show that the receiver will not detect an error if there are no bits in error. P(x)=x3 +x2 +x0 (1101) G(x)=x6 +x3 +x2 (1001100) Multiply by the number of bits in the CRC polynomial. x3 (x6 +x3 +x2 ) x9 +x6 +x5 (1001100000) Figure 5.3 shows the operations at the transmitter. The transmitted message is thus: 1001100001 No error!
  • 19. LRC/VRC • Link. F r e d d y LRC b0 0 0 1 0 0 1 0 b1 1 1 0 0 0 0 0 b2 1 0 1 1 1 0 0 b3 0 0 0 0 0 1 1 b4 0 1 0 0 0 1 0 b5 0 1 1 1 1 1 1 b6 1 1 1 1 1 1 0 VRC 0 1 1 0 0 0 1
  • 20. CSN08704 Data, Audio, Video and Images http://asecuritysite.com/comms Telecommunications Prof Bill Buchanan Hamming Code
  • 21. Hamming Codes Error correction: m is number of bits in the data symbol n is number of Hamming bits Eg if we have 4 bits (m=4). Then to correct we need n=3 (as 8 is greater than or equal to 4+3+1). How many error correcting bits would be need for 5 bits? 12  nmn
  • 22. Hamming Codes The character is 011001 The Hamming bits are HHHH The message format will be 01H100H1HH Position Code 9 1001 7 0111 3 0011 XOR 1101 10 9 8 7 6 5 4 3 2 1 0 1 1 1 0 0 1 1 0 1
  • 23. Hamming Codes Position Code Hamming 1101 9 1001 7 0111 3 0011 XOR 0000 Position Code Hamming 1101 9 1001 7 0111 5 0101 3 0011 XOR 0101 No error Error in bit 5 10 9 8 7 6 5 4 3 2 1 0 1 1 1 0 0 1 1 0 1
  • 24. Hamming Code Sending: Receiving: P1 =D1  D2  D4 P2 =D1  D3  D4 P3 =D2  D3  D4 D4 D3 D2 P3 D1 P2 P1 111 110 101 100 011 010 001 S1 =P1  D1  D2  D4 S2 =P2  D1  D3  D4 S3 =P3  D2  D3  D4
  • 26. Hamming Code (receiving) • At the receiver we calculate the Syndrome matrix S ... if all zeros ... no error!                                             3 2 1 4 3 2 3 1 2 1 1111000 1100110 1010101 S S S D D D P D P P T HRS
  • 27. Hamming Code (Example) • Link.            1111000 1100110 1010101 H and                        0 1 0 1 1 0 1 T T D1 D2 D3 D4  4323121 DDDPDPPT and D1=1, D2=0, D3=1, D4=0 for even parity: P1 checks the 1st, 3rd, 5th and 7th, so P1  D1  D2  D4 = 0; thus P1 =1 P2 checks the 2nd, 3rd, 6th and 7th, so P2  D1  D3  D4 = 0; thus P2 =0 P3 checks the 4th, 5th, 6th and 7th, so P3  D2  D3  D4 = 0; thus P3 =1
  • 28. Hamming Code • Let’s check the Syndrome matrix:                                                           0 0 0 0.11.10.11.11.00.01.0 0.11.10.01.01.10.11.0 0.11.00.11.01.10.01.1 0 1 0 1 1 0 1 1111000 1100110 1010101 T HT No error!
  • 29. Hamming Code Error:  0111101R Error in bit 5                                                           1 0 1 0.11.11.11.11.00.01.0 0.11.11.01.01.10.11.0 0.11.01.11.01.10.01.1 0 1 1 1 1 0 1 1111000 1100110 1010101 T HR
  • 30. CSN08704 Data, Audio, Video and Images http://asecuritysite.com/comms Telecommunications Prof Bill Buchanan 5: Error Coding