吐纳是什么意思| 体重一直不变说明什么| 后背疼痛挂什么科| 101什么意思| 子宫内膜脱落是什么原因| 肾虚吃什么补最好| 肠胃出血有什么症状| 胆固醇高是什么引起的| 熹是什么意思| 口腔异味是什么原因引起的| 萝卜不能和什么一起吃| 牛鬼蛇神是什么意思| 什么食物好消化| 流鼻血是什么病| 高丽参有什么功效| 桃花像什么| 生活防水是什么意思| 时过境迁是什么意思| 胃发热是什么原因| 宝宝吃益生菌有什么好处和坏处| 神什么什么神| 司马光和司马迁是什么关系| 气色是什么意思| 周岁和虚岁是什么意思| 潼字五行属什么| 什么叫高血脂| 红景天有什么功效| 立春吃什么| 翘嘴鱼是什么鱼| 甲状腺发炎有什么症状| 不假思索的假是什么意思| 孕吐严重是什么原因| 余年是什么意思| 一声什么| 咬牙切齿什么意思| 身份证有x代表什么| 献血对身体有什么好处| 顺钟向转位是什么意思| 孛儿只斤现在姓什么| 怀孕喝什么牛奶好| 同房出血要做什么检查| 千娇百媚是什么意思| 鱼翅配什么煲汤最好| 人为什么会做梦| 女人右手断掌代表什么| 女士内裤用什么洗最好| 农历12月26日是什么星座| 治疗便秘吃什么| 香港为什么不用人民币| 蛰居是什么意思| 淋巴结肿大挂什么科| 甲状腺饱满是什么意思| 仙人掌煎鸡蛋治什么病| 盆腔积液吃什么药| 胡思乱想是什么意思| 早餐可以吃什么| 雄激素过高是什么意思| 后遗症是什么意思| 常温保存是什么意思| 绿色裙子搭配什么颜色上衣| 16年属什么生肖| spf50是什么意思| 泰坦尼克号什么时候上映的| 多囊是什么| 天蝎座和什么星座配| 银子发黄是什么原因| 什么症状吃柏子养心丸| 酥油是什么油| 创伤性关节炎有什么症状| 血尿是什么颜色| 什么情况做肠镜| 双相障碍是什么| 211是什么| 1941属什么生肖| 什么叫人均可支配收入| 笑刑是什么| 奶油奶酪可以做什么| 红小豆和赤小豆有什么区别| 卯戌相合发生什么| 梅毒rpr是什么| 女性肛门坠胀看什么科| 愿力是什么意思| 今是什么结构| 感冒什么时候能好| 糖尿病患者适合吃什么水果| 室性期前收缩是什么病| 精索静脉曲张是什么| 软是什么意思| 心脏早搏是什么原因| 无名指戴戒指代表什么| 气血不足吃什么水果| 将军是什么生肖| 前列腺增大伴钙化灶是什么意思| 脖子粗大是什么原因| 双生什么意思| guava是什么水果| 左边偏头痛什么原因| 什么星座最花心| 世事无常是什么意思| 梦见盗墓是什么意思| 为什么会长黑头| 此刻朋友这杯酒最珍贵是什么歌| 吃狗肉有什么危害| 教科书是什么意思| 什么叫湿气| 什么是强迫症| 晏殊字什么| 痱子涂什么药膏好| 7点至9点是什么时辰| 化疗期间吃什么最好| 石斛念什么| 阴唇肥大是什么原因| 绝世是什么意思| 安宫丸什么时候吃效果是最佳的| 劣迹斑斑是什么意思| 国字脸适合什么发型男| 甘油三酯高有什么危害| 软组织损伤是什么意思| 维生素b有什么用| 农历11月18日是什么星座| 长命的动物是什么生肖| 世界上最大的生物是什么| 定义是什么| 甲减是一种什么病| samedelman是什么牌子| noon什么意思| 尿液发白是什么原因| 饿了么什么时候成立的| c1和c2有什么区别| 肝弥漫性病变是什么意思| met是什么氨基酸| 喜面是什么意思| 日是什么意思| 国际劳动日是什么生肖| 64年属什么的| 腰间盘突出用什么药好| 备注是什么意思| 闻字五行属什么| 妈妈的手像什么| 等闲变却故人心却道故人心易变什么意思| 查微量元素挂什么科| 土豆发芽到什么程度不能吃| 桂花什么颜色| 属鸡的适合干什么行业最赚钱| 精囊炎吃什么药| 双侧颈部淋巴结可见是什么意思| 来月经属于什么期| 毛泽东什么时候逝世| 发泥和发蜡有什么区别| 鼻子老是出血是什么原因| 丛林之王是什么动物| rapido是什么牌子| 手经常出汗是什么原因| 哮喘吃什么食物好| 眩晕是怎么回事是什么原因引起| 肛塞是什么| 鼻子和嘴巴连接的地方叫什么| 多此一举是什么生肖| 什么字五行属水| 中指尖麻木是什么原因| 人属于什么界门纲目科属种| 肾上腺是什么| 你喜欢我什么| 肺部气肿吃什么药能治好| 应用心理学是什么| 胆挂什么科| hp阳性是什么意思| 口坐读什么| 舌吻是什么感觉| 植入是什么意思| dm是什么意思| 经常低血糖是什么原因| 什么的船只| 地震为什么会发生| 胆囊壁毛糙是什么意思| 果糖胺是什么意思| 司马懿字什么| 辟谷吃什么| 牙龈肿痛吃什么药快速消肿止痛| 淋巴细胞数偏高是什么意思| 股癣是什么样的| 叶绿素是什么| review是什么意思| 南京市市长什么级别| 风水是什么意思| 29周岁属什么生肖| 右眼跳什么意思| 六爻是什么意思| 什么的高山填空| 头部MRI检查是什么意思| 腱鞘是什么| 栩字五行属什么| 儿童乘坐高铁需要什么证件| 月柱金舆是什么意思| 助产是干什么的| 才貌双全是什么生肖| 干咳有痰是什么原因| 东宫是什么生肖| 新疆人为什么不吃猪肉| 什么是三观| 丑时五行属什么| 肝部出现腹水是什么原因| 桃园三结义是什么意思| 哺乳期发烧吃什么药| 动脉导管未闭是什么意思| 上面白下面本念什么| 萎谢是什么意思| 宫外孕什么症状| 花椒木有什么作用与功效| 健康证是什么样的| 龙抄手是什么| 童心未泯什么意思| 复健是什么意思| 惠五行属什么| 左耳烫代表什么预兆| 心脏长什么样| 痰湿体质吃什么中成药| 凿壁偷光告诉我们什么道理| 女人肾虚是什么原因| 流产吃什么药| 闭关什么意思| cos是什么意思啊| 和解少阳是什么意思| 尿隐血弱阳性什么意思| 什么时间喝酸奶最好| 厚黑学什么意思| 室上速是什么原因导致的| 深红色是什么颜色| 百毒不侵是什么意思| 路人皆知的上一句歇后语是什么| 帆布是什么材质| 手震颤是什么原因引起的| 观察是什么意思| 山峦是什么意思| 频繁是什么意思| 撩是什么意思| 蓝色与什么色搭配好看| 什么是再生障碍性贫血| 农历六月十七是什么日子| 失眠看什么科| 胃气上逆吃什么药| 萝卜喝醉了会变成什么| 月台是什么意思| 胆囊炎的症状是什么| 伤口恢复吃什么好得快| 小孩突然抽搐失去意识是什么原因| 马六甲板材是什么木材| 紫笋茶属于什么茶| 姨妈老是推迟是为什么| 印度的全称是什么| 嘴唇起泡是什么原因| 脑供血不足吃什么药最好| 肋间神经痛什么症状| 老年人反复发烧是什么原因引起的| 篱笆是什么意思| 为什么不建议做冠脉cta检查| 子宫偏小是什么原因| 一般什么时候排卵| 泉中水是什么生肖| 吃什么食物养胃| 四个火读什么字| 什么水果泡酒最好喝| 手指盖空了是什么原因| 馍是什么意思| 百度Jump to content

《人民的名义》数十戏骨总片酬4800万 不及一当红偶像

From Wikipedia, the free encyclopedia
7 bits of data
(count of 1-bits) 8 bits including parity
even odd
0000000 0 00000000 00000001
1010001 3 10100011 10100010
1101001 4 11010010 11010011
1111111 7 11111111 11111110
百度 中国特色社会主义进入新时代,多党合作舞台极为广阔。

A parity bit, or check bit, is a bit added to a string of binary code. Parity bits are a simple form of error detecting code. Parity bits are generally applied to the smallest units of a communication protocol, typically 8-bit octets (bytes), although they can also be applied separately to an entire message string of bits.

The parity bit ensures that the total number of 1-bits in the string is even or odd.[1] Accordingly, there are two variants of parity bits: even parity bit and odd parity bit. In the case of even parity, for a given set of bits, the bits whose value is 1 are counted. If that count is odd, the parity bit value is set to 1, making the total count of occurrences of 1s in the whole set (including the parity bit) an even number. If the count of 1s in a given set of bits is already even, the parity bit's value is 0. In the case of odd parity, the coding is reversed. For a given set of bits, if the count of bits with a value of 1 is even, the parity bit value is set to 1 making the total count of 1s in the whole set (including the parity bit) an odd number. If the count of bits with a value of 1 is odd, the count is already odd so the parity bit's value is 0. Parity is a special case of a cyclic redundancy check (CRC), where the 1-bit CRC is generated by the polynomial x+1.

Parity

[edit]

In mathematics parity can refer to the evenness or oddness of an integer, which, when written in its binary form, can be determined just by examining only its least significant bit.

In information technology parity refers to the evenness or oddness, given any set of binary digits, of the number of those bits with value one. Because parity is determined by the state of every one of the bits, this property of parity—being dependent upon all the bits and changing its value from even to odd parity if any one bit changes—allows for its use in error detection and correction schemes.

In telecommunications the parity referred to by some protocols is for error-detection. The transmission medium is preset, at both end points, to agree on either odd parity or even parity. For each string of bits ready to transmit (data packet) the sender calculates its parity bit, zero or one, to make it conform to the agreed parity, even or odd. The receiver of that packet first checks that the parity of the packet as a whole is in accordance with the preset agreement, then, if there was a parity error in that packet, requests a retransmission of that packet.

In computer science the parity stripe or parity disk in a RAID provides error-correction. Parity bits are written at the rate of one parity bit per n bits, where n is the number of disks in the array. When a read error occurs, each bit in the error region is recalculated from its set of n bits. In this way, using one parity bit creates "redundancy" for a region from the size of one bit to the size of one disk. See § RAID array below.

In electronics, transcoding data with parity can be very efficient, as XOR gates output what is equivalent to a check bit that creates an even parity, and XOR logic design easily scales to any number of inputs. XOR and AND structures comprise the bulk of most integrated circuitry.

Error detection

[edit]
Diagrammatic oscilloscope trace of voltage levels for a RS232 transmission of a 7 bit ASCII "K" character (4Bh = 1001011b) framed as 1 start bit, 7 data bits (least significant bit first), even parity, and 1 stop bit: 7E1.

If an odd number of bits (including the parity bit) are transmitted incorrectly, the parity bit will be incorrect, thus indicating that a parity error occurred in the transmission. The parity bit is suitable only for detecting errors; it cannot correct any errors, as there is no way to determine the particular bit that is corrupted. The data must be discarded entirely, and retransmitted from scratch. On a noisy transmission medium, successful transmission can therefore take a long time or even never occur. However, parity has the advantage that it uses only a single bit and requires only a number of XOR gates to generate. See Hamming code for an example of an error-correcting code.

Parity bit checking is used occasionally for transmitting ASCII characters, which have 7 bits, leaving the 8th bit as a parity bit.

For example, the parity bit can be computed as follows. Assume Alice and Bob are communicating and Alice wants to send Bob the simple 4-bit message 1001.

Type of bit parity Successful transmission scenario
Even parity

Alice wants to transmit: 1001 and 1011

Alice computes parity bit value:
1+0+0+1 (mod 2) = 0
1+0+1+1 (mod 2) = 1

Alice adds parity bit and sends:
10010 and 10111

Bob receives: 10010 and 10111

Bob computes parity:
1+0+0+1+0 (mod 2) = 0
1+0+1+1+1 (mod 2) = 0

Bob reports correct transmission after observing expected even result.

Odd parity

Alice wants to transmit: 1001 and 1011

Alice computes parity bit value:
1+0+0+1 (+ 1 mod 2) = 1
1+0+1+1 (+ 1 mod 2) = 0

Alice adds parity bit and sends:
10011 and 10110

Bob receives: 10011 and 10110

Bob computes overall parity:
1+0+0+1+1 (mod 2) = 1
1+0+1+1+0 (mod 2) = 1

Bob reports correct transmission after observing expected odd result.

This mechanism enables the detection of single bit errors, because if one bit gets flipped due to line noise, there will be an incorrect number of ones in the received data. In the two examples above, Bob's calculated parity value matches the parity bit in its received value, indicating there are no single bit errors. Consider the following example with a transmission error in the second bit using XOR:

Type of bit parity error Failed transmission scenario
Even parity

Error in the second bit

Alice wants to transmit: 1001

Alice computes parity bit value: 1^0^0^1 = 0

Alice adds parity bit and sends: 10010

...TRANSMISSION ERROR...

Bob receives: 11010

Bob computes overall parity: 1^1^0^1^0 = 1

Bob reports incorrect transmission after observing unexpected odd result.

Even parity

Error in the parity bit

Alice wants to transmit: 1001

Alice computes even parity value: 1^0^0^1 = 0

Alice sends: 10010

...TRANSMISSION ERROR...

Bob receives: 10011

Bob computes overall parity: 1^0^0^1^1 = 1

Bob reports incorrect transmission after observing unexpected odd result.

There is a limitation to parity schemes. A parity bit is guaranteed to detect only an odd number of bit errors. If an even number of bits have errors, the parity bit records the correct number of ones even though the data is corrupt. (See also error detection and correction.) Consider the same example as before but with an even number of corrupted bits:

Type of bit parity error Failed transmission scenario
Even parity

Two corrupted bits

Alice wants to transmit: 1001

Alice computes even parity value: 1^0^0^1 = 0

Alice sends: 10010

...TRANSMISSION ERROR...

Bob receives: 11011

Bob computes overall parity: 1^1^0^1^1 = 0

Bob reports correct transmission though actually incorrect.

Bob observes even parity, as expected, thereby failing to catch the two bit errors.

Usage

[edit]

Because of its simplicity, parity is used in many hardware applications in which an operation can be repeated in case of difficulty, or simply detecting the error is helpful. For example, the SCSI and PCI buses use parity to detect transmission errors, and many microprocessor instruction caches include parity protection. Because the Instruction cache data is just a copy of the main memory, it can be disregarded and refetched if it is found to be corrupted.

In serial data transmission, a common format is 7 data bits, an even parity bit, and one or two stop bits. That format accommodates all the 7-bit ASCII characters in an 8-bit byte. Other formats are possible; 8 bits of data plus a parity bit can convey all 8-bit byte values.

In serial communication contexts, parity is usually generated and checked by interface hardware (such as a UART) and, on reception, the result made available to a processor such as the CPU (and so too, for instance, the operating system) via a status bit in a hardware register in the interface hardware. Recovery from the error is usually done by retransmitting the data, the details of which are usually handled by software (such as the operating system I/O routines).

When the total number of transmitted bits, including the parity bit, is even, odd parity has the advantage that both all-zeros and all-ones patterns are detected as errors. If the total number of bits is odd, only one of the patterns is detected as an error, and the choice can be made based on what the more common error is expected to be.

RAID array

[edit]

Parity data is used by RAID arrays (redundant array of independent/inexpensive disks) to achieve redundancy. If a drive in the array fails, remaining data on the other drives can be combined with the parity data (using the Boolean XOR function) to reconstruct the missing data.

For example, suppose two drives in a three-drive RAID 4 array contained the following data:

Drive 1: 01101101
Drive 2: 11010100

To calculate parity data for the two drives, an XOR is performed on their data:

01101101
  XOR     11010100
10111001

The resulting parity data, 10111001, is then stored on Drive 3.

Should any of the three drives fail, the contents of the failed drive can be reconstructed on a replacement drive by subjecting the data from the remaining drives to the same XOR operation. If Drive 2 were to fail, its data could be rebuilt using the XOR results of the contents of the two remaining drives, Drive 1 and Drive 3:

Drive 1: 01101101
Drive 3: 10111001

as follows:

01101101 Drive 1
XOR 10111001 Drive 3
11010100 Reconstructed Drive 2

The result of that XOR calculation yields Drive 2's contents. 11010100 is then stored on Drive 2, fully repairing the array.

XOR logic is also equivalent to even parity (because a XOR b XOR c XOR ... may be treated as XOR(a,b,c,...), which is an n-ary operator that is true if and only if an odd number of arguments is true). So the same XOR concept above applies similarly to larger RAID arrays with parity, using any number of disks. In the case of a RAID 3 array of 12 drives, 11 drives participate in the XOR calculation shown above and yield a value that is then stored on the dedicated parity drive.

Extensions and variations on the parity bit mechanism "double," "dual," or "diagonal" parity, are used in RAID-DP.

History

[edit]

A parity track was present on the first magnetic-tape data storage in 1951. Parity in this form, applied across multiple parallel signals, is known as a transverse redundancy check. This can be combined with parity computed over multiple bits sent on a single signal, a longitudinal redundancy check. In a parallel bus, there is one longitudinal redundancy check bit per parallel signal.

Parity was also used on at least some paper-tape (punched tape) data entry systems (which preceded magnetic-tape systems). On the systems sold by British company ICL (formerly ICT) the 1-inch-wide (25 mm) paper tape had 8 hole positions running across it, with the 8th being for parity. 7 positions were used for the data, e.g., 7-bit ASCII. The 8th position had a hole punched in it depending on the number of data holes punched.

See also

[edit]

References

[edit]
  1. ^ Ziemer, RodgerE.; Tranter, William H. (17 March 2014). Principles of communication : systems, modulation, and noise (Seventh ed.). Hoboken, New Jersey. ISBN 9781118078914. OCLC 856647730.{{cite book}}: CS1 maint: location missing publisher (link)
[edit]
女生腰疼是什么原因 智齿为什么会横着长 7月14日什么星座 心悸吃什么药好 甲状腺不能吃什么
断背山讲的是什么故事 脚痛去医院挂什么科 6月19日什么星座 方脸适合什么耳环 麦粒肿用什么药
b细胞淋巴肿瘤是一种什么病 眉毛上长痣代表什么 经常吃土豆有什么好处 化学性肝损伤是指什么 vera是什么意思
宾格是什么 美尼尔综合症是一种什么病 猪肝能钓什么鱼 什么化痰效果最好最快 无下限是什么意思
fte是什么意思hcv9jop1ns0r.cn 左边太阳穴疼是什么原因hcv9jop6ns5r.cn 三栖明星是什么意思hcv9jop6ns8r.cn 什么年树木hcv8jop7ns5r.cn 肉桂茶适合什么人喝hcv8jop4ns3r.cn
女人肝火旺吃什么好hcv9jop6ns6r.cn 肩周炎不能吃什么食物hcv9jop3ns6r.cn 肝不好有什么症状有哪些表现hcv9jop7ns0r.cn 厂与什么有关bfb118.com 梦见自己洗头发是什么意思hebeidezhi.com
巳火是什么火hcv9jop6ns3r.cn 青蛙长什么样hcv9jop0ns1r.cn 晚上吃什么水果好hcv8jop3ns6r.cn 溺爱是什么意思hcv9jop0ns8r.cn 独显是什么意思hcv7jop9ns9r.cn
护理学和护理有什么区别hcv7jop6ns5r.cn 西洋参什么时候吃效果最好hcv8jop4ns2r.cn nb是什么意思hcv7jop6ns6r.cn 鹅蛋脸适合什么发型hcv8jop5ns1r.cn 痛风可以吃什么hcv8jop3ns3r.cn
百度