程序代碼錯誤檢測_錯誤檢測代碼

程序代碼錯誤檢測

錯誤檢測代碼 (Error Detecting Codes)

A group of bits is known as words, and these words move as an entity from one block to another in the digital system. While moving from one part to another within the system via transmission media, the bits within the word can get altered/distorted due to external factors, whom we call Noise. Because digital systems need to be accurate to the digit, an error can pose a serious threat. So, several error detecting methods are introduced to find these incorrect bits in the words, which can be corrected and after detection and should be retransmitted.

一組位稱為字,這些字作為一個實體從數字系統中的一個塊移動到另一個塊。 當通過傳輸介質從系統中的一個部分移動到另一部分時,該字中的位會由于外部因素(我們稱為“噪聲”)而發生更改/失真。 因為數字系統需要精確到數字,所以錯誤可能會構成嚴重威脅。 因此,引入了幾種錯誤檢測方法以在單詞中找到這些不正確的比特,這些錯誤比特可以被糾正并且在被檢測之后應當被重新發送。

平價 (Parity)

The simplest technique for detecting an error in a word is adding an extra bit in the group of bits, this extra bit is known as the parity bit.

檢測單詞錯誤的最簡單技術是在位組中添加一個額外的位,這個額外的位稱為奇偶校驗位。

There are two types of parity which we consider for error detection purposes which are ODD parity and EVEN parity. In odd parity, 0 or 1 parity bit is added to the group of bits such that the total number of 1 bit including the parity bit in word remains odd in number. Similarly, in even parity, 0 or 1 bit is added in the group of bits such that total no. of 1 bit including the parity bit in the word remains even in number.

為了錯誤檢測的目的,我們考慮兩種奇偶校驗,即ODD奇偶校驗EVEN奇偶校驗 。 在奇數奇偶校驗中 ,將01個奇偶校驗位添加到位組中,以使包括字中的奇偶校驗位的1位總數保持奇數。 類似地,在偶數奇偶校驗中,將0或1位添加到位組中,以使總數為0。 包括該字中的奇偶校驗位的1位元的數量保持偶數。

Given below is a table which contains message bit of 4 bits and the parity bit in odd and even parity cases,

下表是一個包含4位消息位和奇偶校驗情況下奇偶校驗位的表,

Word of 4 bitsParity Bit(Odd)Word of 4 bitsParity Bit(Even)
0000100000
0001000011
0010000101
0011100110
0100001001
0101101010
1100111000
0111001111
1000010001
1001110010
1010010100
............
............
4位字 奇偶校驗位(奇數) 4位字 奇偶校驗位(偶數)
0000 1個 0000 0
0001 0 0001 1個
0010 0 0010 1個
0011 1個 0011 0
0100 0 0100 1個
0101 1個 0101 0
1100 1個 1100 0
0111 0 0111 1個
1000 0 1000 1個
1001 1個 1001 0
1010 0 1010 0
... ... ... ...
... ... ... ...

A parity checker circuit is set up on the receiving side which generates an error whenever an odd number of 1's occurs in case of even parity and an even number of 1's occurs in case of odd parity system.

在接收側建立一個奇偶校驗器電路,每當偶數奇偶校驗出現奇數1時發生錯誤,而在奇偶校驗系統奇偶校驗發生時偶數1出現錯誤。

Generally, odd parity is used more often than even parity because even parity does not detect the situation where all 0's is created by a short circuit or other fault condition.

通常,奇數奇偶校驗比偶數奇偶校驗使用更多,因為偶數奇偶校驗無法檢測到短路或其他故障情況導致全0的情況。

Example 1: In even-parity system, which of the following words contain an error?

示例1:在偶數奇偶校驗系統中,以下哪個單詞包含錯誤?

  1. 0010100011

    0010100011

  2. 1010001010

    1010001010

  3. 0010000110

    0010000110

Answer: In an even-parity system, total number of 1’s should be even. So,

答:在偶數奇偶校驗系統中,總數1應該是偶數。 所以,

  1. 0010100011, contains 4 one bit which is even. Thus, it has no errors.

    0010100011 ,包含4個偶數位。 因此,它沒有錯誤。

  2. 1011101010, contains 6 one bit which is even. Thus, it has no errors.

    1011101010 ,包含6個偶數位。 因此,它沒有錯誤。

  3. 0010000110, contains 3 one bit which is odd. Thus, this word has an error.

    0010000110 ,包含3個奇數位。 因此,這個詞有錯誤。

Example 2: In odd-parity system, which of the following words contain an error?

示例2:在奇偶校驗系統中,以下哪個單詞包含錯誤?

  1. 1011101111

    1011101111

  2. 1011000011

    1011000011

  3. 1011110110

    1011110110

Answer: In an odd-parity system, total number of 1’s should be odd. So,

答:在奇數奇偶校驗系統中,總數1應該是奇數。 所以,

  1. 1011101111, contains 8 one bit which is even. Thus, it has an error.

    1011101111 ,包含8個偶數位。 因此,它有一個錯誤。

  2. 1011000011, contains 5 one bit which is odd. Thus, it has no errors.

    1011000011 ,包含5個奇數位。 因此,它沒有錯誤。

  3. 1011110110, contains 7 one bit which is odd. Thus, it has no errors.

    1011110110 ,包含7個奇數位。 因此,它沒有錯誤。

翻譯自: https://www.includehelp.com/basics/error-detecting-codes.aspx

程序代碼錯誤檢測

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/540645.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/540645.shtml
英文地址,請注明出處:http://en.pswp.cn/news/540645.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Web瀏覽器端通過https 使用mqtt通訊

做的產品簡介 這次需要做一個web端的上課平臺,有音視頻通訊,有白板(畫板)功能,有文字通訊等。技術點 音視頻通訊需要走Webrtc需要跟ios, android, windows, mac 客戶端互聯互通一般通訊通過mqtt協議MQTT簡介 MQTT(Message Queuing…

vga顯示模式_VGA的完整形式是什么?

vga顯示模式VGA:視頻圖形陣列 (VGA: Video Graphics Array) VGA is an abbreviation of "Video Graphics Array". VGA是“視頻圖形陣列”的縮寫 。 It is a three-row 15-pin DE-15 connector display hardware developed by IBM in 1987. It was first …

【iCore4 雙核心板_FPGA】例程十一:FSMC總線通信實驗——獨立地址模式

實驗原理: STM32F767上自帶FMC控制器,本實驗將通過FMC總線的地址獨立模式實現STM32與FPGA 之間通信,FPGA內部建立RAM塊,FPGA橋接STM32和RAM塊,本實驗通過FSMC總線從STM32向 RAM塊中寫入數據,然后讀取RAM出來的數據進行…

世界糧農組織五大健康食品_糧農組織的完整形式是什么?

世界糧農組織五大健康食品糧農組織:請注意 (FAO: For the Attention Of) FAO is an abbreviation of "For the Attention Of". FAO是“ For the Attention Of”的縮寫 。 It is an expression, which is commonly used in the Gmail platform. When a ma…

http 412 precondition failed

2019獨角獸企業重金招聘Python工程師標準>>> 今天在谷歌瀏覽器上刷新頁面的時候,出現了 如下失敗信息: HTTP 412 (Precondition Failed) 想想當時的動作是在發送ajax請求失敗之后,再刷新,就會出現上面的失敗問題。百度…

Python | Pyplot標簽

There are the following types of labels, 標簽有以下幾種, 1)X軸貼標 (1) X-axis labelling) plt.xlabel(Number Line)# Default labellingplt.xlabel(Number Line, colorgreen)#Font colour Changedplt.xlabel(Number Line, colorGreen, fontsize15)#Font size …

LTNS的完整形式是什么?

LTNS:很久沒看到 (LTNS: Long Time No See) LTNS is an abbreviation of "Long time, no see". LTNS是“長時間,看不見”的縮寫 。 It is an English phrase used when people meet and greet each other after a while when in between they…

MySQL Index Condition Pushdown

2019獨角獸企業重金招聘Python工程師標準>>> 一、Index Condition Pushdown簡介 ICP(index condition pushdown)是mysql利用索引(二級索引)元組和篩字段在索引中的where條件從表中提取數據記錄的一種優化操作。ICP的思…

ADBB的完整形式是什么?

ADBB:所有完成的再見 (ADBB: All Done Bye Bye) ADBB is an abbreviation to All Done Bye Bye. ADBB是All Done Bye Bye的縮寫。 Whenever a person wants to convey his message to another person, they use some sort of short-form in the text messages. ADB…

c 環境

系統ubuntu sudo apt-get install vim g openssh-server libgl1-mesa-dev檢查下安裝的版本gcc -v g -v make -v gdb -v 轉載于:https://blog.51cto.com/skinglzw/1964449

java.util (Collection接口和Map接口)

1:Collection和Map接口的幾個主要繼承和實現類 1.1 Collection接口 Collection是最基本的集合接口,一個Collection代表一組Object,即Collection的元素(Elements)。一些Collection允許相同的元素而另一些不行。一些能排…

scala 拆分字符串翻轉_Scala程序分割字符串

scala 拆分字符串翻轉A string is a collection that stores multiple characters, it is an immutable sequence which cannot be changed. 字符串是存儲多個字符的集合,它是不可更改的不可更改的序列。 分割字符串 (Splitting a string) In Scala, using the spl…

[轉載] python 簡單示例說明os.walk和os.path.walk的不同

參考鏈接: 示例說明Python2.x和Python3.x之間的重要區別 import os,os.path def func(arg,dirname,names): for filespath in names: print os.path.join(dirname,filespath) if __name__"__main__": print "os.walk" index 1 for root,subd…

c#中索引器是什么_C#中的索引器

c#中索引器是什么An Indexer is a special feature of C# to use an object as an array. If you define an indexer in a class then it will behave like a virtual array. Indexer is also known as smart array in C#. It is not a compulsory or essential part of OOPS. …

asp.net MVC5為WebAPI添加命名空間的支持

前言 默認情況下,微軟提供的MVC框架模板中,WebAPI路由是不支持Namespace參數的。這導致一些比較大型的項目,無法把WebApi分離到單獨的類庫中。 本文將提供解決該問題的方案。 微軟官方曾經給出過一個關于WebAPI支持Namespace的擴展&#xff0…

[轉載] Python3.X 線程中信號量的使用方法示例

參考鏈接: 示例說明Python2.x和Python3.x之間的重要區別 信號量semaphore 是一個變量,控制著對公共資源或者臨界區的訪問。信號量維護著一個計數器,指定可同時訪問資源或者進入臨界區的線程數。下面這篇文章主要給大家介紹了關于Python3.X 線…

從流程的自動化中獲得最大價值的10種方式

流程自動化很好,如果它可以節省時間并減少錯誤。但是如果它不能在業務流程中“很好地契合”,那么會難以得到普及。問問有誰沒有對語音助手感到傷腦筋。 所幸的是,某些最佳實踐讓你可以從流程自動化中獲得最大價值,以下就是其中的1…

java中null是常量嗎_C_NULL Julia中的常量

java中null是常量嗎Julia| C_NULL常數 (Julia | C_NULL Constant) C_NULL is a constant of Ptr{Nothing} type in Julia programming language, it represents the null pointer value, which is used for C Null Pointer while calling external code. C_NULL是Julia編程語言…

[轉載] Python京東搶購

參考鏈接: 從Python獲取輸入 Python京東搶購 分析其中提交信息接口的參數,可以成功搶購商品,并且可以提交訂單。。。。2018年7月17日 提交信息的獲取 直接提交信息對post提交分析其中的參數。 經過分析參數大多數在:https…

6.04 從字符串中刪除不需要的字符

需求:刪除所有的0和元音字母。 select ename,replace(replace(replace(replace(replace(ename,A,),E,),I,),O,),U,) as stripped1,sal,replace(sal,0,) stripped2from emp;轉載于:https://www.cnblogs.com/liang545621/p/7518766.html