SlideShare a Scribd company logo
1 of 6
Download to read offline
1 ‫الفريجي‬ ‫قاسم‬ ‫محمد‬ ‫الدكتور‬ ‫أعداد‬
Chapter 4
Channel coding
Humming distance (HD) :
( ‫الـــ‬ ‫اليجاد‬HD‫سبيل‬ ‫على‬ ‫مثال‬ ‫البتات‬ ‫من‬ ‫معين‬ ‫بعدد‬ ‫مقاطع‬ ‫شكل‬ ‫على‬ ‫المرسلة‬ ‫الرسالة‬ ‫السؤال‬ ‫في‬ ‫تعطى‬ )
‫الى‬ ‫مقسمة‬ ‫الرسالة‬ ‫اعطيت‬ ‫لو‬ ‫المثال‬3‫ال‬ ‫اليجاد‬ ‫الكالم‬ ‫هذا‬ ‫معنى‬ ‫مقاطع‬HD‫اي‬mind‫عدد‬ ‫مقارنة‬ ‫خالل‬ ‫من‬
( ‫وجدنا‬ ‫نكون‬ ‫عندها‬ ‫والثاني‬ ‫االول‬ ‫المقطع‬ ‫بين‬ ‫الخطأ‬ ‫البتات‬12d‫الكرة‬ ‫اعادة‬ ‫ثم‬ )‫بين‬ ‫الخطأ‬ ‫البتات‬ ‫عدد‬ ‫وحساب‬
( ‫اي‬ ‫والثالث‬ ‫الثاني‬23d( ‫والثالث‬ ‫االول‬ ‫بين‬ ‫ثم‬ )13d‫ال‬ ‫ستكون‬ ‫هي‬ ‫خطأ‬ ‫بتات‬ ‫اقل‬ ‫فيها‬ ‫تكون‬ ‫التي‬ ‫الحالة‬ )mind
‫ال‬ ‫نحسب‬ ‫نحن‬ ‫االساس‬ ‫في‬ ‫المطلوبة‬Humming( ‫الخطأ‬ ‫البتات‬ ‫وتحديد‬ ‫اليجاد‬error detected‫كذلك‬ ‫و‬ )
( ‫تصحيحها‬ ‫ممكن‬ ‫التي‬ ‫البتات‬ ‫عدد‬error correction: ‫التالية‬ ‫القوانين‬ ‫من‬ ‫وتحسب‬ )
: ‫الخطأ‬ ‫البتات‬ ‫عدد‬ ‫حساب‬ ‫قانون‬
2t = dmin – 1
‫الــ‬ ( ‫مالحظة‬t. ‫هي‬ ‫كما‬ ‫تبقى‬ ‫تطبق‬ ‫ال‬ ‫هنا‬ )
: ‫تصحيحها‬ ‫ممكن‬ ‫التي‬ ‫البتات‬ ‫عدد‬ ‫حساب‬ ‫قانون‬
t=
𝒅𝒎𝒊𝒏−𝟏
𝟐
Example: Find the minimum HD between the following cod words: Also
determine the possible error detection & the number of error correction bits.
C1 = [100110011] , C2 = [111101100] , C3= [101100101]
Answer:
‫الــ‬ ‫ايجاد‬ ‫اوال‬HD‫الــ‬ ‫بين‬C1 , C2‫وهو‬d12‫كاالتي‬
d12= 1 0 0 1 1 0 0 1 1
1 1 1 1 0 1 1 0 0
So d12 = 7 (bit error )
d23 = 1 1 1 1 0 1 1 0 0
1 0 1 1 0 0 1 0 1
So d23 = 3 (bit error)
D13 = 1 0 0 1 1 0 0 1 1
1 0 1 1 0 0 1 0 1
2 ‫الفريجي‬ ‫قاسم‬ ‫محمد‬ ‫الدكتور‬ ‫أعداد‬
So d13 = 4 (bit error )
d12 = 7 , d23 = 3 , d13 = 4 ( HD = dmin = 3 )
Error detection :
2t = dmin – 1  2t = 3 – 1 = 2 bit
Error correction:
t=
𝒅𝒎𝒊𝒏−𝟏
𝟐

𝟑−𝟏
𝟐

𝟐
𝟐
= 1 bit
 Humming weight:
‫في‬ ‫الواحدات‬ ‫عدد‬ ‫اي‬code word‫السؤال‬ ‫في‬ ‫اعطي‬ ‫لو‬ ‫المثال‬ ‫سبيل‬ ‫على‬ ‫السؤال‬ ‫في‬ ‫المعطاة‬
: ‫االتي‬
C1 = [ 1011100]  w1 = 4 (‫الكود‬ ‫لهذا‬ ‫الواحدات‬ ‫عدد‬)
C2 = [ 1011000]  w2 = 3 (‫الكود‬ ‫لهذا‬ ‫الواحدات‬ ‫عدد‬)
 Parity check code (Error detection):
 Even code ‫زوجي‬ ‫يكون‬ ‫ان‬ ‫يجب‬ ‫الواحدات‬ ‫عدد‬ ‫انه‬ ‫اي‬
 Odd code ‫فــردي‬ ‫يكون‬ ‫ان‬ ‫يجب‬ ‫الواحدات‬ ‫عدد‬ ‫انه‬ ‫اي‬
‫مسئلة‬ ‫حل‬ ‫الجل‬Parity check code (Error detection & Correction)‫اضافة‬ ‫خالل‬ ‫من‬
( ‫واحدة‬ ‫بت‬0‫او‬1‫نهاية‬ ‫في‬ )Data word‫الى‬ ‫تحويلها‬ ‫الجل‬ ‫السؤال‬ ‫في‬ ‫اعطائها‬ ‫يتم‬ ‫الي‬code
word( ‫الزوجي‬ ‫حالة‬ ‫في‬ ‫اذا‬ ‫يعني‬ ‫السؤال‬ ‫في‬ ‫المطلب‬ ‫نوع‬ ‫حسب‬ ‫يكون‬ ‫و‬ ‫ارسالها‬ ‫لغرض‬Even)
( ‫واحدة‬ ‫بت‬ ‫اضافة‬ ‫يتم‬ ‫اال‬ ‫و‬ ‫زوجي‬ ‫الكود‬ ‫في‬ ‫يكون‬ ‫الواحدات‬ ‫عدد‬ ‫فيجب‬1‫عدد‬ ‫كان‬ ‫اذا‬ ‫بعكسه‬ ‫و‬ )
( ‫صفر‬ ‫اضافة‬ ‫فيتم‬ ‫زوجي‬ ‫الواحدات‬0( ‫فردي‬ ‫المطلب‬ ‫كان‬ ‫اذا‬ .)Odd‫يكون‬ ‫الواحدات‬ ‫عدد‬ ‫فيجب‬ )
‫ف‬ ‫الكود‬ ‫في‬( ‫واحدة‬ ‫بت‬ ‫اضافة‬ ‫يتم‬ ‫واال‬ ‫ردي‬1‫اضافة‬ ‫فيتم‬ ‫فردي‬ ‫الواحدات‬ ‫عدد‬ ‫كان‬ ‫اذا‬ ‫بعكسه‬ ‫و‬ ، )
( ‫صفر‬0.)
n= number of bits In code word
k= number of bits in data word
r= the bit of addition for data word is produced code word (even or odd)
n = k + r
3 ‫الفريجي‬ ‫قاسم‬ ‫محمد‬ ‫الدكتور‬ ‫أعداد‬
Example: an even parity – check code (5, 4) which mean that (n=5, k=4) :
Data word Code word Data word Code word
0010 00101 0110 01100
1010 10100 1000 10001
Example: an odd parity – check code (5, 4) which mean that (n=5, k=4) :
Data word Code word Data word Code word
0010 00100 0110 01101
1010 10101 1000 10000
 Repetition codes:
( n , k )
Code word data word
Example : A receiver of (5,1) repetition code has been received :
[100100011010101, 100011001100111,111000000111110]
 Find the decoded data word and transmitted code word ?
 Find the minimum (HD) and error detection and error correction?
 Noise (Transmission XOR Received ) ?
Sol:
*Data word :
‫اساس‬ ‫على‬ ‫يكون‬ ‫التقسيم‬ ‫مجاميع‬ ‫الى‬ ‫وورد‬ ‫الداتا‬ ‫نقسم‬ ‫السؤال‬ ‫في‬ ‫المعطاة‬ ‫وورد‬ ‫الداتا‬ ‫من‬ ‫وورد‬ ‫الكود‬ ‫اليجاد‬
‫الــ‬repetition‫مقداره‬ ‫معطي‬ ‫السؤال‬ ‫هذا‬ ‫في‬ ‫هنا‬ ‫القوسين‬ ‫داخل‬ ‫المعطى‬5‫الى‬ ‫وورد‬ ‫الداتا‬ ‫بتات‬ ‫نقسم‬ ‫اذن‬
5‫وكل‬ ‫بتات‬5‫اكثر‬ ‫البتات‬ ‫اي‬ ‫نرى‬ ‫بتات‬0‫او‬1‫ال‬ ‫ضمن‬ ‫في‬5‫ب‬: ‫يلي‬ ‫كما‬ ‫ناخذه‬ ‫االكثر‬ ‫هذه‬ ‫تات‬
10010 00110 10101 10001 10011 00111 11100 00001 11110
0 0 1 0 1 1 1 0 1
 Data word = 001,011,101
4 ‫الفريجي‬ ‫قاسم‬ ‫محمد‬ ‫الدكتور‬ ‫أعداد‬
‫في‬ ‫بت‬ ‫كل‬ ‫نكرر‬ ‫المرسل‬ ‫وورد‬ ‫الكود‬ ‫اليجاد‬‫التكرار‬ ‫بمقدار‬ ‫السابقة‬ ‫الخطوه‬ ‫في‬ ‫استخراجها‬ ‫تم‬ ‫التي‬ ‫وورد‬ ‫الداتا‬
‫هنا‬ ‫المعطى‬5‫سنكرره‬ ‫وورد‬ ‫الداتا‬ ‫في‬ ‫بت‬ ‫كل‬ ‫اي‬5: ‫كاالتي‬ ‫مرات‬
*Transmitted code word =
[000000000011111,000001111111111,111110000011111]
C1 C2 C3
‫اليجاد‬dmin‫نجد‬ ‫ان‬ ‫يجب‬d12‫و‬d23‫و‬d13: ‫كاالتي‬ ‫اعاله‬ ‫الكودات‬ ‫بين‬ ‫هنا‬ ‫سابقا‬ ‫تعلمنا‬ ‫كما‬
Hd  d12, d23 , d13
C1 = 00000 00000 11111
C2 = 00000 11111 11111
d12 = 5
C2= 00000 11111 11111
C3= 11111 00000 11111
d23 = 10
C1 = 00000 00000 11111
C3 = 11111 00000 11111
d13 = 5
So : dmin = 5
Error detection  2t = dmin – 1  2t = 5 – 1 = 4 bit
Error correction  t=
𝒅𝒎𝒊𝒏−𝟏
𝟐

𝟓−𝟏
𝟐

𝟒
𝟐
= 2bit
‫ال‬ ‫اليجاد‬Noise‫البتات‬ ‫تطابق‬ ‫حيث‬ ‫من‬ ‫المستلمه‬ ‫البيانات‬ ‫مع‬ ‫المرسله‬ ‫البيانات‬ ‫في‬ ‫مقطع‬ ‫كل‬ ‫بمقارنه‬ ‫نقوم‬
‫تاثير‬ ‫يتبين‬ ‫وهنا‬ ‫خاطئة‬ ‫بصوره‬ ‫وايها‬ ‫صحيحه‬ ‫بصوره‬ ‫وصلت‬ ‫البتات‬ ‫اي‬‫ال‬Noise: ‫كاالتي‬
Noise = transmitted XOR received
n1 = 000000000011111 XOR 100100011010101= 100100011001010
n2 = 000001111111111 XOR 100011001100111 = 100010110011000
n3 = 111110000011111 XOR 111000000111110 = 000110000100001
5 ‫الفريجي‬ ‫قاسم‬ ‫محمد‬ ‫الدكتور‬ ‫أعداد‬
 Hamming code (7,4)
n=k+r
r=k-n
r= 3bit  ( P1 , P2 , P3)
k=4 bits  (d1 , d2 , d3 , d4)
: ‫يلي‬ ‫كما‬ ‫جدول‬ ‫بناء‬ ‫على‬ ‫الطريقة‬ ‫هذه‬ ‫تعتمد‬
: ‫ادناه‬ ‫الجدول‬ ‫بناء‬ ‫الحل‬ ‫في‬ ‫خطوه‬ ‫اول‬
7654321#Bits
d4d3d2P3d1P2P1Transmitted
Bit
Value
( ‫قيم‬d1,d2,d3,d4( ‫قيم‬ ‫نستخرج‬ ‫نحن‬ ‫السؤال‬ ‫في‬ ‫تعطي‬ )P1,P2,P3: ‫االتي‬ ‫القانون‬ ‫من‬ )
P1 = d1 d2 d4 ( d3 ‫عدى‬ ‫ما‬ ‫الكل‬ )
P2 = d1 d3 d4 ( d2 ‫عدى‬ ‫ما‬ ‫الكل‬ )
P3= d2 d3 d4 ( d1 ‫عدى‬ ‫ما‬ ‫)الكل‬
‫على‬ ‫اعاله‬ ‫السابقه‬ ‫الخطوه‬ ‫ادخال‬ ‫هي‬ ‫للحل‬ ‫الثانيه‬ ‫الخطوه‬syndrome: ‫كاالتي‬
*Syndrome
A= P1 d1 d2 d4
B= P2 d1 d3 d4
C= P3 d2 d3 d4
‫هو‬ ‫السابقة‬ ‫الخطوه‬ ‫من‬ ‫الناتج‬ABC‫اي‬ ‫االعلى‬ ‫الى‬ ‫االسفل‬ ‫من‬ ‫يؤخذ‬CBA‫اذن‬ ‫منها‬ ‫اصفار‬ ‫الناتج‬ ‫كان‬ ‫اذا‬
. ‫خطأ‬ ‫اي‬ ‫دون‬ ‫من‬ ‫ايصالها‬ ‫تم‬ ‫البيانات‬
6 ‫الفريجي‬ ‫قاسم‬ ‫محمد‬ ‫الدكتور‬ ‫أعداد‬
‫ال‬ ‫خطوه‬ ‫ناتج‬ ‫قراءة‬ ‫خالل‬ ‫من‬ ‫وجد‬ ‫ان‬ ‫الخطا‬ ‫البت‬ ‫اليجاد‬CBA‫ثم‬ ‫الباينري‬ ‫بصيغة‬ ‫االعلى‬ ‫الى‬ ‫االسفل‬ ‫من‬
‫ال‬ ‫الديسمل‬ ‫الى‬ ‫تحويلها‬‫الحاله‬ ‫بعكس‬ ‫البت‬ ‫هذا‬ ‫ونقلب‬ ‫المستلمه‬ ‫البيانات‬ ‫نذهب‬ ‫الخطا‬ ‫البت‬ ‫رقم‬ ‫هو‬ ‫الناتج‬ ‫رقم‬
‫هو‬ ‫البت‬ ‫كان‬ ‫ان‬ ‫االن‬ ‫عليها‬ ‫هو‬ ‫التي‬0‫يصبح‬1‫الخطا‬ ‫البت‬ ‫ايجاد‬ ‫يطلب‬ ‫االسئلة‬ ‫بعض‬ ‫في‬ . ‫صحيح‬ ‫والعكس‬
. ‫التنويه‬ ‫اقتضى‬ ‫لذا‬ ‫وتصحيحه‬ ‫اين‬
Example : Suppose we want to transmit the data (1011) over noisy
communication channel determine the hamming code word(7,4) :
Sol:
( ‫بت‬ ‫البارتي‬ ‫ايجاد‬ ‫للحل‬ ‫االولى‬ ‫الخطوه‬Parity bit: ‫االتي‬ ‫الجدول‬ ‫الكمال‬ )
7654321#Bits
d4d3d2P3d1P2P1Transmitted
Bit
1100110Value
P1 = d1 d2 d4  1 0 1 = 0
P2 = d1 d3 d4  1 1 1 = 1
P3= d2 d3 d4  0 1 1 = 0
‫الــ‬ ‫الى‬ ‫البيانات‬ ‫ادخال‬ ‫االتية‬ ‫الخطوه‬Syndrome: ‫كاالتي‬
A= P1 d1 d2 d4  0 1 0 1 = 0
B= P2 d1 d3 d4  1 1 1 1 = 0
C= P3 d2 d3 d4  0 0 1 1 = 0
CBA = 000 ( No error detection )
( ‫يلي‬ ‫كما‬ ‫المستلمه‬ ‫البتات‬ ‫احد‬ ‫في‬ ‫خطأ‬ ‫حصل‬ ‫انه‬ ‫لتفرض‬(0110111‫البت‬ ‫ابن‬ ‫واكتشاف‬ ‫البيانات‬ ‫من‬ ‫للتاكد‬
‫الــ‬ ‫الى‬ ‫البتات‬ ‫ندخل‬ ‫الخطأ‬Syndrome: ‫كاالتي‬ ‫جديد‬ ‫من‬
A= P1 d1 d2 d4  0 1 1 1 = 1
B= P2 d1 d3 d4  1 1 1 1 = 0
C= P3 d2 d3 d4  0 1 1 1 = 1
CBA = 101  5 ‫الخطأ‬ ‫هو‬ ‫الخامس‬ ‫البت‬ ‫اذن‬
0110111  ‫للــ‬ ‫يقلب‬ ‫هنا‬ ‫الحاليه‬ ‫حالته‬ ‫عكس‬ ‫يقلب‬  0110011

More Related Content

What's hot

Information Theory and Coding
Information Theory and CodingInformation Theory and Coding
Information Theory and CodingVIT-AP University
 
Error Control Coding -Introduction
Error Control Coding -IntroductionError Control Coding -Introduction
Error Control Coding -IntroductionBurdwan University
 
Error detection correction (CRC)
Error detection correction  (CRC)Error detection correction  (CRC)
Error detection correction (CRC)Karam Munir Butt
 
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
 
Information Theory Coding 1
Information Theory Coding 1Information Theory Coding 1
Information Theory Coding 1Mahafuz Aveek
 
Information Theory - Introduction
Information Theory  -  IntroductionInformation Theory  -  Introduction
Information Theory - IntroductionBurdwan University
 
Shannon-Fano algorithm
Shannon-Fano algorithmShannon-Fano algorithm
Shannon-Fano algorithmMANISH T I
 
arithmetic and adaptive arithmetic coding
arithmetic and adaptive arithmetic codingarithmetic and adaptive arithmetic coding
arithmetic and adaptive arithmetic codingAyush Gupta
 
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 networksNt Arvind
 
Linear Block Codes
Linear Block CodesLinear Block Codes
Linear Block CodesNilaNila16
 
10 Error Detection_and_Correction
10 Error Detection_and_Correction10 Error Detection_and_Correction
10 Error Detection_and_CorrectionAhmar Hashmi
 
Error control, parity check, check sum, vrc
Error control, parity check, check sum, vrcError control, parity check, check sum, vrc
Error control, parity check, check sum, vrcHuawei Technologies
 
Error correction error detection in digital communication
Error correction error detection in digital communicationError correction error detection in digital communication
Error correction error detection in digital communicationswatihalunde
 
Circuit switching packet switching
Circuit switching  packet  switchingCircuit switching  packet  switching
Circuit switching packet switchingSneha Dalvi
 

What's hot (20)

Information Theory and Coding
Information Theory and CodingInformation Theory and Coding
Information Theory and Coding
 
Error Control Coding -Introduction
Error Control Coding -IntroductionError Control Coding -Introduction
Error Control Coding -Introduction
 
Chapter 03 cyclic codes
Chapter 03   cyclic codesChapter 03   cyclic codes
Chapter 03 cyclic codes
 
Error detection correction (CRC)
Error detection correction  (CRC)Error detection correction  (CRC)
Error detection correction (CRC)
 
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..
 
Information Theory Coding 1
Information Theory Coding 1Information Theory Coding 1
Information Theory Coding 1
 
Basics of coding theory
Basics of coding theoryBasics of coding theory
Basics of coding theory
 
error control coding
error control coding error control coding
error control coding
 
Information Theory - Introduction
Information Theory  -  IntroductionInformation Theory  -  Introduction
Information Theory - Introduction
 
Shannon-Fano algorithm
Shannon-Fano algorithmShannon-Fano algorithm
Shannon-Fano algorithm
 
arithmetic and adaptive arithmetic coding
arithmetic and adaptive arithmetic codingarithmetic and adaptive arithmetic coding
arithmetic and adaptive arithmetic coding
 
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
 
Information theory
Information theoryInformation theory
Information theory
 
information theory
information theoryinformation theory
information theory
 
Linear Block Codes
Linear Block CodesLinear Block Codes
Linear Block Codes
 
10 Error Detection_and_Correction
10 Error Detection_and_Correction10 Error Detection_and_Correction
10 Error Detection_and_Correction
 
Error control, parity check, check sum, vrc
Error control, parity check, check sum, vrcError control, parity check, check sum, vrc
Error control, parity check, check sum, vrc
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
Error correction error detection in digital communication
Error correction error detection in digital communicationError correction error detection in digital communication
Error correction error detection in digital communication
 
Circuit switching packet switching
Circuit switching  packet  switchingCircuit switching  packet  switching
Circuit switching packet switching
 

More from DrMohammed Qassim

(Win7) مقدمة في نظام التشغيل
(Win7) مقدمة في نظام التشغيل  (Win7) مقدمة في نظام التشغيل
(Win7) مقدمة في نظام التشغيل DrMohammed Qassim
 
مقدمة في برمجة و تصميم الشبكات
مقدمة في برمجة و تصميم الشبكاتمقدمة في برمجة و تصميم الشبكات
مقدمة في برمجة و تصميم الشبكاتDrMohammed Qassim
 
مقدمة حول الشبكات
مقدمة حول الشبكاتمقدمة حول الشبكات
مقدمة حول الشبكاتDrMohammed Qassim
 
منهاج تحليل و تصميم نظم المعلومات
منهاج تحليل و تصميم نظم المعلوماتمنهاج تحليل و تصميم نظم المعلومات
منهاج تحليل و تصميم نظم المعلوماتDrMohammed Qassim
 
منهاج بناء و تصميم مواقع الانترنيت
منهاج بناء و تصميم مواقع الانترنيتمنهاج بناء و تصميم مواقع الانترنيت
منهاج بناء و تصميم مواقع الانترنيتDrMohammed Qassim
 
مقدمة في قواعد البيانات
مقدمة في قواعد البياناتمقدمة في قواعد البيانات
مقدمة في قواعد البياناتDrMohammed Qassim
 
Example for ER diagram part11
Example for ER diagram part11Example for ER diagram part11
Example for ER diagram part11DrMohammed Qassim
 
Primary Key & Foreign Key part10
Primary Key & Foreign Key part10Primary Key & Foreign Key part10
Primary Key & Foreign Key part10DrMohammed Qassim
 
Entity Relationship Diagram part9
Entity Relationship Diagram part9Entity Relationship Diagram part9
Entity Relationship Diagram part9DrMohammed Qassim
 
Use Case Context Diagram part5
Use Case Context Diagram part5Use Case Context Diagram part5
Use Case Context Diagram part5DrMohammed Qassim
 
System Development Life Cycle part3
System Development Life Cycle part3System Development Life Cycle part3
System Development Life Cycle part3DrMohammed Qassim
 
Introduction to System analysis part1
Introduction to System analysis part1Introduction to System analysis part1
Introduction to System analysis part1DrMohammed Qassim
 
(Protracted your system) حماية نظامك من الدخلاء
(Protracted your system) حماية نظامك من الدخلاء(Protracted your system) حماية نظامك من الدخلاء
(Protracted your system) حماية نظامك من الدخلاءDrMohammed Qassim
 
(Internet privacy) حماية الخصوصية
(Internet privacy) حماية الخصوصية (Internet privacy) حماية الخصوصية
(Internet privacy) حماية الخصوصية DrMohammed Qassim
 

More from DrMohammed Qassim (20)

(Win7) مقدمة في نظام التشغيل
(Win7) مقدمة في نظام التشغيل  (Win7) مقدمة في نظام التشغيل
(Win7) مقدمة في نظام التشغيل
 
مقدمة في برمجة و تصميم الشبكات
مقدمة في برمجة و تصميم الشبكاتمقدمة في برمجة و تصميم الشبكات
مقدمة في برمجة و تصميم الشبكات
 
مقدمة حول الشبكات
مقدمة حول الشبكاتمقدمة حول الشبكات
مقدمة حول الشبكات
 
منهاج تحليل و تصميم نظم المعلومات
منهاج تحليل و تصميم نظم المعلوماتمنهاج تحليل و تصميم نظم المعلومات
منهاج تحليل و تصميم نظم المعلومات
 
منهاج بناء و تصميم مواقع الانترنيت
منهاج بناء و تصميم مواقع الانترنيتمنهاج بناء و تصميم مواقع الانترنيت
منهاج بناء و تصميم مواقع الانترنيت
 
مقدمة في قواعد البيانات
مقدمة في قواعد البياناتمقدمة في قواعد البيانات
مقدمة في قواعد البيانات
 
System analysis part2
System analysis part2System analysis part2
System analysis part2
 
Example for ER diagram part11
Example for ER diagram part11Example for ER diagram part11
Example for ER diagram part11
 
Primary Key & Foreign Key part10
Primary Key & Foreign Key part10Primary Key & Foreign Key part10
Primary Key & Foreign Key part10
 
Entity Relationship Diagram part9
Entity Relationship Diagram part9Entity Relationship Diagram part9
Entity Relationship Diagram part9
 
Activity Diagram part8
Activity Diagram part8Activity Diagram part8
Activity Diagram part8
 
Data flow diagram part7
Data flow diagram part7Data flow diagram part7
Data flow diagram part7
 
Data Flow Models part6
Data Flow Models part6Data Flow Models part6
Data Flow Models part6
 
Use Case Context Diagram part5
Use Case Context Diagram part5Use Case Context Diagram part5
Use Case Context Diagram part5
 
Use Case Diagrams part4
Use Case Diagrams part4Use Case Diagrams part4
Use Case Diagrams part4
 
System Development Life Cycle part3
System Development Life Cycle part3System Development Life Cycle part3
System Development Life Cycle part3
 
Introduction to System analysis part1
Introduction to System analysis part1Introduction to System analysis part1
Introduction to System analysis part1
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
(Protracted your system) حماية نظامك من الدخلاء
(Protracted your system) حماية نظامك من الدخلاء(Protracted your system) حماية نظامك من الدخلاء
(Protracted your system) حماية نظامك من الدخلاء
 
(Internet privacy) حماية الخصوصية
(Internet privacy) حماية الخصوصية (Internet privacy) حماية الخصوصية
(Internet privacy) حماية الخصوصية
 

Repatino code - hamming code (7,4) - chapter four

  • 1. 1 ‫الفريجي‬ ‫قاسم‬ ‫محمد‬ ‫الدكتور‬ ‫أعداد‬ Chapter 4 Channel coding Humming distance (HD) : ( ‫الـــ‬ ‫اليجاد‬HD‫سبيل‬ ‫على‬ ‫مثال‬ ‫البتات‬ ‫من‬ ‫معين‬ ‫بعدد‬ ‫مقاطع‬ ‫شكل‬ ‫على‬ ‫المرسلة‬ ‫الرسالة‬ ‫السؤال‬ ‫في‬ ‫تعطى‬ ) ‫الى‬ ‫مقسمة‬ ‫الرسالة‬ ‫اعطيت‬ ‫لو‬ ‫المثال‬3‫ال‬ ‫اليجاد‬ ‫الكالم‬ ‫هذا‬ ‫معنى‬ ‫مقاطع‬HD‫اي‬mind‫عدد‬ ‫مقارنة‬ ‫خالل‬ ‫من‬ ( ‫وجدنا‬ ‫نكون‬ ‫عندها‬ ‫والثاني‬ ‫االول‬ ‫المقطع‬ ‫بين‬ ‫الخطأ‬ ‫البتات‬12d‫الكرة‬ ‫اعادة‬ ‫ثم‬ )‫بين‬ ‫الخطأ‬ ‫البتات‬ ‫عدد‬ ‫وحساب‬ ( ‫اي‬ ‫والثالث‬ ‫الثاني‬23d( ‫والثالث‬ ‫االول‬ ‫بين‬ ‫ثم‬ )13d‫ال‬ ‫ستكون‬ ‫هي‬ ‫خطأ‬ ‫بتات‬ ‫اقل‬ ‫فيها‬ ‫تكون‬ ‫التي‬ ‫الحالة‬ )mind ‫ال‬ ‫نحسب‬ ‫نحن‬ ‫االساس‬ ‫في‬ ‫المطلوبة‬Humming( ‫الخطأ‬ ‫البتات‬ ‫وتحديد‬ ‫اليجاد‬error detected‫كذلك‬ ‫و‬ ) ( ‫تصحيحها‬ ‫ممكن‬ ‫التي‬ ‫البتات‬ ‫عدد‬error correction: ‫التالية‬ ‫القوانين‬ ‫من‬ ‫وتحسب‬ ) : ‫الخطأ‬ ‫البتات‬ ‫عدد‬ ‫حساب‬ ‫قانون‬ 2t = dmin – 1 ‫الــ‬ ( ‫مالحظة‬t. ‫هي‬ ‫كما‬ ‫تبقى‬ ‫تطبق‬ ‫ال‬ ‫هنا‬ ) : ‫تصحيحها‬ ‫ممكن‬ ‫التي‬ ‫البتات‬ ‫عدد‬ ‫حساب‬ ‫قانون‬ t= 𝒅𝒎𝒊𝒏−𝟏 𝟐 Example: Find the minimum HD between the following cod words: Also determine the possible error detection & the number of error correction bits. C1 = [100110011] , C2 = [111101100] , C3= [101100101] Answer: ‫الــ‬ ‫ايجاد‬ ‫اوال‬HD‫الــ‬ ‫بين‬C1 , C2‫وهو‬d12‫كاالتي‬ d12= 1 0 0 1 1 0 0 1 1 1 1 1 1 0 1 1 0 0 So d12 = 7 (bit error ) d23 = 1 1 1 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 So d23 = 3 (bit error) D13 = 1 0 0 1 1 0 0 1 1 1 0 1 1 0 0 1 0 1
  • 2. 2 ‫الفريجي‬ ‫قاسم‬ ‫محمد‬ ‫الدكتور‬ ‫أعداد‬ So d13 = 4 (bit error ) d12 = 7 , d23 = 3 , d13 = 4 ( HD = dmin = 3 ) Error detection : 2t = dmin – 1  2t = 3 – 1 = 2 bit Error correction: t= 𝒅𝒎𝒊𝒏−𝟏 𝟐  𝟑−𝟏 𝟐  𝟐 𝟐 = 1 bit  Humming weight: ‫في‬ ‫الواحدات‬ ‫عدد‬ ‫اي‬code word‫السؤال‬ ‫في‬ ‫اعطي‬ ‫لو‬ ‫المثال‬ ‫سبيل‬ ‫على‬ ‫السؤال‬ ‫في‬ ‫المعطاة‬ : ‫االتي‬ C1 = [ 1011100]  w1 = 4 (‫الكود‬ ‫لهذا‬ ‫الواحدات‬ ‫عدد‬) C2 = [ 1011000]  w2 = 3 (‫الكود‬ ‫لهذا‬ ‫الواحدات‬ ‫عدد‬)  Parity check code (Error detection):  Even code ‫زوجي‬ ‫يكون‬ ‫ان‬ ‫يجب‬ ‫الواحدات‬ ‫عدد‬ ‫انه‬ ‫اي‬  Odd code ‫فــردي‬ ‫يكون‬ ‫ان‬ ‫يجب‬ ‫الواحدات‬ ‫عدد‬ ‫انه‬ ‫اي‬ ‫مسئلة‬ ‫حل‬ ‫الجل‬Parity check code (Error detection & Correction)‫اضافة‬ ‫خالل‬ ‫من‬ ( ‫واحدة‬ ‫بت‬0‫او‬1‫نهاية‬ ‫في‬ )Data word‫الى‬ ‫تحويلها‬ ‫الجل‬ ‫السؤال‬ ‫في‬ ‫اعطائها‬ ‫يتم‬ ‫الي‬code word( ‫الزوجي‬ ‫حالة‬ ‫في‬ ‫اذا‬ ‫يعني‬ ‫السؤال‬ ‫في‬ ‫المطلب‬ ‫نوع‬ ‫حسب‬ ‫يكون‬ ‫و‬ ‫ارسالها‬ ‫لغرض‬Even) ( ‫واحدة‬ ‫بت‬ ‫اضافة‬ ‫يتم‬ ‫اال‬ ‫و‬ ‫زوجي‬ ‫الكود‬ ‫في‬ ‫يكون‬ ‫الواحدات‬ ‫عدد‬ ‫فيجب‬1‫عدد‬ ‫كان‬ ‫اذا‬ ‫بعكسه‬ ‫و‬ ) ( ‫صفر‬ ‫اضافة‬ ‫فيتم‬ ‫زوجي‬ ‫الواحدات‬0( ‫فردي‬ ‫المطلب‬ ‫كان‬ ‫اذا‬ .)Odd‫يكون‬ ‫الواحدات‬ ‫عدد‬ ‫فيجب‬ ) ‫ف‬ ‫الكود‬ ‫في‬( ‫واحدة‬ ‫بت‬ ‫اضافة‬ ‫يتم‬ ‫واال‬ ‫ردي‬1‫اضافة‬ ‫فيتم‬ ‫فردي‬ ‫الواحدات‬ ‫عدد‬ ‫كان‬ ‫اذا‬ ‫بعكسه‬ ‫و‬ ، ) ( ‫صفر‬0.) n= number of bits In code word k= number of bits in data word r= the bit of addition for data word is produced code word (even or odd) n = k + r
  • 3. 3 ‫الفريجي‬ ‫قاسم‬ ‫محمد‬ ‫الدكتور‬ ‫أعداد‬ Example: an even parity – check code (5, 4) which mean that (n=5, k=4) : Data word Code word Data word Code word 0010 00101 0110 01100 1010 10100 1000 10001 Example: an odd parity – check code (5, 4) which mean that (n=5, k=4) : Data word Code word Data word Code word 0010 00100 0110 01101 1010 10101 1000 10000  Repetition codes: ( n , k ) Code word data word Example : A receiver of (5,1) repetition code has been received : [100100011010101, 100011001100111,111000000111110]  Find the decoded data word and transmitted code word ?  Find the minimum (HD) and error detection and error correction?  Noise (Transmission XOR Received ) ? Sol: *Data word : ‫اساس‬ ‫على‬ ‫يكون‬ ‫التقسيم‬ ‫مجاميع‬ ‫الى‬ ‫وورد‬ ‫الداتا‬ ‫نقسم‬ ‫السؤال‬ ‫في‬ ‫المعطاة‬ ‫وورد‬ ‫الداتا‬ ‫من‬ ‫وورد‬ ‫الكود‬ ‫اليجاد‬ ‫الــ‬repetition‫مقداره‬ ‫معطي‬ ‫السؤال‬ ‫هذا‬ ‫في‬ ‫هنا‬ ‫القوسين‬ ‫داخل‬ ‫المعطى‬5‫الى‬ ‫وورد‬ ‫الداتا‬ ‫بتات‬ ‫نقسم‬ ‫اذن‬ 5‫وكل‬ ‫بتات‬5‫اكثر‬ ‫البتات‬ ‫اي‬ ‫نرى‬ ‫بتات‬0‫او‬1‫ال‬ ‫ضمن‬ ‫في‬5‫ب‬: ‫يلي‬ ‫كما‬ ‫ناخذه‬ ‫االكثر‬ ‫هذه‬ ‫تات‬ 10010 00110 10101 10001 10011 00111 11100 00001 11110 0 0 1 0 1 1 1 0 1  Data word = 001,011,101
  • 4. 4 ‫الفريجي‬ ‫قاسم‬ ‫محمد‬ ‫الدكتور‬ ‫أعداد‬ ‫في‬ ‫بت‬ ‫كل‬ ‫نكرر‬ ‫المرسل‬ ‫وورد‬ ‫الكود‬ ‫اليجاد‬‫التكرار‬ ‫بمقدار‬ ‫السابقة‬ ‫الخطوه‬ ‫في‬ ‫استخراجها‬ ‫تم‬ ‫التي‬ ‫وورد‬ ‫الداتا‬ ‫هنا‬ ‫المعطى‬5‫سنكرره‬ ‫وورد‬ ‫الداتا‬ ‫في‬ ‫بت‬ ‫كل‬ ‫اي‬5: ‫كاالتي‬ ‫مرات‬ *Transmitted code word = [000000000011111,000001111111111,111110000011111] C1 C2 C3 ‫اليجاد‬dmin‫نجد‬ ‫ان‬ ‫يجب‬d12‫و‬d23‫و‬d13: ‫كاالتي‬ ‫اعاله‬ ‫الكودات‬ ‫بين‬ ‫هنا‬ ‫سابقا‬ ‫تعلمنا‬ ‫كما‬ Hd  d12, d23 , d13 C1 = 00000 00000 11111 C2 = 00000 11111 11111 d12 = 5 C2= 00000 11111 11111 C3= 11111 00000 11111 d23 = 10 C1 = 00000 00000 11111 C3 = 11111 00000 11111 d13 = 5 So : dmin = 5 Error detection  2t = dmin – 1  2t = 5 – 1 = 4 bit Error correction  t= 𝒅𝒎𝒊𝒏−𝟏 𝟐  𝟓−𝟏 𝟐  𝟒 𝟐 = 2bit ‫ال‬ ‫اليجاد‬Noise‫البتات‬ ‫تطابق‬ ‫حيث‬ ‫من‬ ‫المستلمه‬ ‫البيانات‬ ‫مع‬ ‫المرسله‬ ‫البيانات‬ ‫في‬ ‫مقطع‬ ‫كل‬ ‫بمقارنه‬ ‫نقوم‬ ‫تاثير‬ ‫يتبين‬ ‫وهنا‬ ‫خاطئة‬ ‫بصوره‬ ‫وايها‬ ‫صحيحه‬ ‫بصوره‬ ‫وصلت‬ ‫البتات‬ ‫اي‬‫ال‬Noise: ‫كاالتي‬ Noise = transmitted XOR received n1 = 000000000011111 XOR 100100011010101= 100100011001010 n2 = 000001111111111 XOR 100011001100111 = 100010110011000 n3 = 111110000011111 XOR 111000000111110 = 000110000100001
  • 5. 5 ‫الفريجي‬ ‫قاسم‬ ‫محمد‬ ‫الدكتور‬ ‫أعداد‬  Hamming code (7,4) n=k+r r=k-n r= 3bit  ( P1 , P2 , P3) k=4 bits  (d1 , d2 , d3 , d4) : ‫يلي‬ ‫كما‬ ‫جدول‬ ‫بناء‬ ‫على‬ ‫الطريقة‬ ‫هذه‬ ‫تعتمد‬ : ‫ادناه‬ ‫الجدول‬ ‫بناء‬ ‫الحل‬ ‫في‬ ‫خطوه‬ ‫اول‬ 7654321#Bits d4d3d2P3d1P2P1Transmitted Bit Value ( ‫قيم‬d1,d2,d3,d4( ‫قيم‬ ‫نستخرج‬ ‫نحن‬ ‫السؤال‬ ‫في‬ ‫تعطي‬ )P1,P2,P3: ‫االتي‬ ‫القانون‬ ‫من‬ ) P1 = d1 d2 d4 ( d3 ‫عدى‬ ‫ما‬ ‫الكل‬ ) P2 = d1 d3 d4 ( d2 ‫عدى‬ ‫ما‬ ‫الكل‬ ) P3= d2 d3 d4 ( d1 ‫عدى‬ ‫ما‬ ‫)الكل‬ ‫على‬ ‫اعاله‬ ‫السابقه‬ ‫الخطوه‬ ‫ادخال‬ ‫هي‬ ‫للحل‬ ‫الثانيه‬ ‫الخطوه‬syndrome: ‫كاالتي‬ *Syndrome A= P1 d1 d2 d4 B= P2 d1 d3 d4 C= P3 d2 d3 d4 ‫هو‬ ‫السابقة‬ ‫الخطوه‬ ‫من‬ ‫الناتج‬ABC‫اي‬ ‫االعلى‬ ‫الى‬ ‫االسفل‬ ‫من‬ ‫يؤخذ‬CBA‫اذن‬ ‫منها‬ ‫اصفار‬ ‫الناتج‬ ‫كان‬ ‫اذا‬ . ‫خطأ‬ ‫اي‬ ‫دون‬ ‫من‬ ‫ايصالها‬ ‫تم‬ ‫البيانات‬
  • 6. 6 ‫الفريجي‬ ‫قاسم‬ ‫محمد‬ ‫الدكتور‬ ‫أعداد‬ ‫ال‬ ‫خطوه‬ ‫ناتج‬ ‫قراءة‬ ‫خالل‬ ‫من‬ ‫وجد‬ ‫ان‬ ‫الخطا‬ ‫البت‬ ‫اليجاد‬CBA‫ثم‬ ‫الباينري‬ ‫بصيغة‬ ‫االعلى‬ ‫الى‬ ‫االسفل‬ ‫من‬ ‫ال‬ ‫الديسمل‬ ‫الى‬ ‫تحويلها‬‫الحاله‬ ‫بعكس‬ ‫البت‬ ‫هذا‬ ‫ونقلب‬ ‫المستلمه‬ ‫البيانات‬ ‫نذهب‬ ‫الخطا‬ ‫البت‬ ‫رقم‬ ‫هو‬ ‫الناتج‬ ‫رقم‬ ‫هو‬ ‫البت‬ ‫كان‬ ‫ان‬ ‫االن‬ ‫عليها‬ ‫هو‬ ‫التي‬0‫يصبح‬1‫الخطا‬ ‫البت‬ ‫ايجاد‬ ‫يطلب‬ ‫االسئلة‬ ‫بعض‬ ‫في‬ . ‫صحيح‬ ‫والعكس‬ . ‫التنويه‬ ‫اقتضى‬ ‫لذا‬ ‫وتصحيحه‬ ‫اين‬ Example : Suppose we want to transmit the data (1011) over noisy communication channel determine the hamming code word(7,4) : Sol: ( ‫بت‬ ‫البارتي‬ ‫ايجاد‬ ‫للحل‬ ‫االولى‬ ‫الخطوه‬Parity bit: ‫االتي‬ ‫الجدول‬ ‫الكمال‬ ) 7654321#Bits d4d3d2P3d1P2P1Transmitted Bit 1100110Value P1 = d1 d2 d4  1 0 1 = 0 P2 = d1 d3 d4  1 1 1 = 1 P3= d2 d3 d4  0 1 1 = 0 ‫الــ‬ ‫الى‬ ‫البيانات‬ ‫ادخال‬ ‫االتية‬ ‫الخطوه‬Syndrome: ‫كاالتي‬ A= P1 d1 d2 d4  0 1 0 1 = 0 B= P2 d1 d3 d4  1 1 1 1 = 0 C= P3 d2 d3 d4  0 0 1 1 = 0 CBA = 000 ( No error detection ) ( ‫يلي‬ ‫كما‬ ‫المستلمه‬ ‫البتات‬ ‫احد‬ ‫في‬ ‫خطأ‬ ‫حصل‬ ‫انه‬ ‫لتفرض‬(0110111‫البت‬ ‫ابن‬ ‫واكتشاف‬ ‫البيانات‬ ‫من‬ ‫للتاكد‬ ‫الــ‬ ‫الى‬ ‫البتات‬ ‫ندخل‬ ‫الخطأ‬Syndrome: ‫كاالتي‬ ‫جديد‬ ‫من‬ A= P1 d1 d2 d4  0 1 1 1 = 1 B= P2 d1 d3 d4  1 1 1 1 = 0 C= P3 d2 d3 d4  0 1 1 1 = 1 CBA = 101  5 ‫الخطأ‬ ‫هو‬ ‫الخامس‬ ‫البت‬ ‫اذن‬ 0110111  ‫للــ‬ ‫يقلب‬ ‫هنا‬ ‫الحاليه‬ ‫حالته‬ ‫عكس‬ ‫يقلب‬  0110011