{"id":1393,"date":"2026-09-24T12:11:00","date_gmt":"2026-09-24T12:11:00","guid":{"rendered":"https:\/\/ffritze.de\/?p=1393"},"modified":"2026-09-24T08:32:16","modified_gmt":"2026-09-24T08:32:16","slug":"hamming-code-unplugged-fehlererkennung-und-fehlerkorrektur","status":"publish","type":"post","link":"https:\/\/ffritze.de\/en\/hamming-code-unplugged-fehlererkennung-und-fehlerkorrektur\/","title":{"rendered":"Hamming-Code unplugged \u2013 Error detection and error correction"},"content":{"rendered":"<p class=\"wp-block-paragraph\">In this article, the Hamming code is first built with seven coins and without a computer and tested practically. You will learn how test bits can detect errors in a transferred bit sequence and determine the faulty position. The procedure is then programmed in a Jupyter notebook with Python.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">If data is changed on the go<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-baaca9a6 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:60%\">\n<p class=\"wp-block-paragraph\">When transmitting digital data, it can happen that individual bits change. A 0 becomes a 1 or vice versa, without the recipient noticing this at first. The Hamming code therefore supplements the actual data with additional check bits. In this way, it is not only possible to see that an error has occurred, but also where it is located.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:40%\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ae7903cc018f&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ae7903cc018f\" class=\"wp-block-image size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_I.png\" alt=\"\" class=\"wp-image-1396\" srcset=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_I.png 1024w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_I-300x300.png 300w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_I-150x150.png 150w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_I-768x768.png 768w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_I-12x12.png 12w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Building the Hamming Code<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Hamming code consists of seven bits in the variant used here: four data bits and three check bits. The data bits are at positions 3, 5, 6 and 7, while the test bits are placed at positions 1, 2 and 4. Each test bit controls a specific group of four positions and is chosen so that this group contains an even number of ones. If a bit is changed later, the pattern of the faulty checks shows the position of the wrong bit.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ae7903cc1332&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ae7903cc1332\" class=\"wp-block-image size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"305\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/Hamming-Feld-1024x305.png\" alt=\"\" class=\"wp-image-1398\" srcset=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/Hamming-Feld-1024x305.png 1024w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/Hamming-Feld-300x89.png 300w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/Hamming-Feld-768x229.png 768w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/Hamming-Feld-1536x458.png 1536w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/Hamming-Feld-2048x611.png 2048w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/Hamming-Feld-18x5.png 18w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<div class=\"wp-block-group has-custom-hellblau-wenig-transparent-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-c9a371c5 wp-block-group-is-layout-constrained\" style=\"border-width:1px;border-top-left-radius:25px;border-top-right-radius:25px;border-bottom-left-radius:25px;border-bottom-right-radius:25px;padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\">\n<h3 class=\"wp-block-heading\"><strong>Material: Hamming code with coins<\/strong><\/h3>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-baaca9a6 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:60%\">\n<p class=\"wp-block-paragraph translation-block\">Seven Hamming coins and a suitable template are required for the implementation. The coins are intended for <strong>3D printing<\/strong>; the print files are available as a ZIP file in <strong>STL and 3MF format<\/strong> for <a href=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_muenze.zip\" target=\"_blank\" rel=\"noopener\">Download<\/a>.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:40%\">\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_muenze.zip\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"498\" src=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_muenze.png\" alt=\"\" class=\"wp-image-1402\" srcset=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_muenze.png 700w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_muenze-300x213.png 300w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_muenze-18x12.png 18w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph translation-block\">The template with the positions and test groups can be downloaded as <a href=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/05-Hamming_Vorlage.pdf\" target=\"_blank\" rel=\"noopener\">PDF file<\/a> and printed.<\/p>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph translation-block\">Seven coins are needed to build the Hamming code. The four <strong>data bits<\/strong> <math data-latex=\"d_0\"><semantics><msub><mi>d<\/mi>3<mn><\/mn>d_0<annotation encoding=\"application\/x-tex\">0<\/annotation><\/semantics><\/math> to <math data-latex=\"d_3\"><semantics><msub><mi>d<\/mi><mn>3<\/mn>d_3<\/annotation><\/semantics>&lt;\/s<\/semantics><\/math>&gt; are represented by blue coins, the three <strong>test bits<\/strong> <math data-latex=\"p_0\"><semantics><msub><mi>p<\/mi><mn>0<\/mn><annotation encoding=\"application\/x-tex\"><\/annotation><\/semantics><\/math> Each coin shows a 0 on one side and a 1 on the other side.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-baaca9a6 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:60%\">\n<p class=\"wp-block-paragraph translation-block\">First, place the four blue data coins in positions 3, 5, 6, and 7. Randomly choose one side for each coin and use it to record the data bits <math data-latex=\"d_0\"><semantics><msub><mi>d<\/mi><mn>0<\/mn><\/msub><annotation encoding=\"application\/x-tex\">d_0<\/annotation><\/semantics><\/math> through <math data-latex=\"d_3\"><semantics><msub><mi>d<\/mi><mn>3<\/mn><\/msub><annotation encoding=\"application\/x-tex\">d_3<\/annotation><\/semantics><\/math>.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ae7903cc27c1&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ae7903cc27c1\" class=\"wp-block-image size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"416\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_auf_I-1024x416.jpg\" alt=\"\" class=\"wp-image-1422\" srcset=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_auf_I-1024x416.jpg 1024w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_auf_I-300x122.jpg 300w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_auf_I-768x312.jpg 768w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_auf_I-18x7.jpg 18w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_auf_I.jpg 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The three orange test coins are then placed on positions 1, 2 and 4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph translation-block\">Each parity bit checks a specific group of positions. <math data-latex=\"p_0\"><semantics><msub><mi>p<\/mi><mn>0<\/mn><\/msub><annotation encoding=\"application\/x-tex\">p_0<\/annotation><\/semantics><\/math> checks positions 1, 3, 5, and 7, <math data-latex=\"p_1\"><semantics><msub><mi>p<\/mi><mn>1<\/mn><\/msub><annotation encoding=\"application\/x-tex\">p_1<\/annotation><\/semantics><\/math> checks positions 2, 3, 6, and 7, and <math data-latex=\"p_2\"><semantics><msub><mi>p<\/mi><mn>2<\/mn><\/msub><annotation encoding=\"application\/x-tex\">p_2<\/annotation><\/semantics><\/math> checks positions 4, 5, 6, and 7.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-baaca9a6 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ae7903cc346e&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ae7903cc346e\" class=\"wp-block-image size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"373\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_auf_II-1024x373.jpg\" alt=\"\" class=\"wp-image-1423\" srcset=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_auf_II-1024x373.jpg 1024w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_auf_II-300x109.jpg 300w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_auf_II-768x280.jpg 768w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_auf_II-18x7.jpg 18w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_auf_II.jpg 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:60%\">\n<p class=\"wp-block-paragraph\">Choose the sides of the orange coins so that there is an even number of A's in each of these test groups. The respective test bit is always counted.<\/p>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">This builds up a valid Hamming code. The seven coins now contain four data bits and three check bits. If a coin is later turned over, the test groups can be used to determine whether an error has occurred and in which position the changed bit is located.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Detect, locate and correct errors<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-baaca9a6 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:60%\">\n<p class=\"wp-block-paragraph translation-block\">After the Hamming code has been built on the template, first check whether each of the three parity groups contains an even number of ones. <math data-latex=\"p_0\"><semantics><msub><mi>p<\/mi><mn>0<\/mn><\/msub><annotation encoding=\"application\/x-tex\">p_0<\/annotation><\/semantics><\/math> covers positions 1, 3, 5, and 7, <math data-latex=\"p_1\"><semantics><msub><mi>p<\/mi><mn>1<\/mn><\/msub><annotation encoding=\"application\/x-tex\">p_1<\/annotation><\/semantics><\/math> covers positions 2, 3, 6, and 7, and <math data-latex=\"p_2\"><semantics><msub><mi>p<\/mi><mn>2<\/mn><\/msub><annotation encoding=\"application\/x-tex\">p_2<\/annotation><\/semantics><\/math> covers positions 4, 5, 6, and 7. The respective parity bit is included in the count during the check.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ae7903cc4477&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ae7903cc4477\" class=\"wp-block-image size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_check_skizze.png\" alt=\"\" class=\"wp-image-1425\" srcset=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_check_skizze.png 1024w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_check_skizze-300x300.png 300w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_check_skizze-150x150.png 150w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_check_skizze-768x768.png 768w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_check_skizze-12x12.png 12w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Now any coin is secretly turned over. Subsequently, the three test groups are checked again. If a test group contains an odd number of As, this shows that there is an error in one of the associated positions. <\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-baaca9a6 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:60%\">\n<p class=\"wp-block-paragraph translation-block\">The pattern of the faulty parity groups ultimately reveals the exact position of the changed bit. For example, if the parity groups of <math data-latex=\"p_0\"><semantics><msub><mi>p<\/mi><mn>0<\/mn><\/msub><annotation encoding=\"application\/x-tex\">p_0<\/annotation><\/semantics><\/math> and <math data-latex=\"p_1\"><semantics><msub><mi>p<\/mi><mn>1<\/mn><\/msub><annotation encoding=\"application\/x-tex\">p_1<\/annotation><\/semantics><\/math> are faulty, the error is at position 3, since this position is included in both parity groups.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ae7903cc51b3&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ae7903cc51b3\" class=\"wp-block-image size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"357\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_check-1024x357.jpg\" alt=\"\" class=\"wp-image-1424\" srcset=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_check-1024x357.jpg 1024w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_check-300x105.jpg 300w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_check-768x268.jpg 768w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_check-18x6.jpg 18w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_check.jpg 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">If no faulty test group is found, no coin has been changed. If the faulty position is determined, the corresponding coin is turned over again. This corrects the single bit error and restores the original Hamming code. Subsequently, it can be investigated how the method behaves with several simultaneously modified bits.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Limits of the procedure<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-baaca9a6 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"wp-block-paragraph\">The Hamming code can detect, locate and correct a single bit error in this form. However, if several bits or number spinns are changed at the same time, reliable error correction is no longer guaranteed.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ae7903cc5f20&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ae7903cc5f20\" class=\"wp-block-image size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"665\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_grenzen-edited.png\" alt=\"\" class=\"wp-image-1409\" srcset=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_grenzen-edited.png 1024w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_grenzen-edited-300x195.png 300w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_grenzen-edited-768x499.png 768w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_grenzen-edited-18x12.png 18w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Three test views show the way to error<\/h2>\n\n\n\n<p class=\"wp-block-paragraph translation-block\">The procedure works because each of the seven positions has its own three-digit binary representation: position 1 corresponds to 001, position 2 to 010, position 3 to 011, and so on up to position 7, which corresponds to 111. The three parity bits each check one digit of these binary representations. <math data-latex=\"p_0\"><semantics><msub><mi>p<\/mi><mn>0<\/mn><\/msub><annotation encoding=\"application\/x-tex\">p_0<\/annotation><\/semantics><\/math> checks the last digit, <math data-latex=\"p_1\"><semantics><msub><mi>p<\/mi><mn>1<\/mn><\/msub><annotation encoding=\"application\/x-tex\">p_1<\/annotation><\/semantics><\/math> checks the middle digit, and <math data-latex=\"p_2\"><semantics><msub><mi>p<\/mi><mn>2<\/mn><\/msub><annotation encoding=\"application\/x-tex\">p_2<\/annotation><\/semantics><\/math> checks the first digit.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-baaca9a6 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:40%\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ae7903cc6b75&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ae7903cc6b75\" class=\"wp-block-image size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"521\" height=\"588\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/Hamming_binaertabelle.png\" alt=\"\" class=\"wp-image-1406\" srcset=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/Hamming_binaertabelle.png 521w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/Hamming_binaertabelle-266x300.png 266w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/Hamming_binaertabelle-11x12.png 11w\" sizes=\"auto, (max-width: 521px) 100vw, 521px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:60%\">\n<p class=\"wp-block-paragraph translation-block\">If a coin is flipped, the number of ones changes in exactly those parity groups that include its position. The affected parity groups therefore provide the individual digits of the binary representation of the error position. For example, if <math data-latex=\"p_0\"><semantics><msub><mi>p<\/mi><mn>0<\/mn><\/msub><annotation encoding=\"application\/x-tex\">p_0<\/annotation><\/semantics><\/math> and <math data-latex=\"p_1\"><semantics><msub><mi>p<\/mi><mn>1<\/mn><\/msub><annotation encoding=\"application\/x-tex\">p_1<\/annotation><\/semantics><\/math> are faulty, while <math data-latex=\"p_2\"><semantics><msub><mi>p<\/mi><mn>2<\/mn><\/msub><annotation encoding=\"application\/x-tex\">p_2<\/annotation><\/semantics><\/math> remains correct, the result is 011 \u2014 the binary representation of position 3.<\/p>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph translation-block\">The three test results thus together form a so-called <strong>test pattern<\/strong>. This test pattern is nothing more than the binary number of the faulty position. Therefore, the Hamming code can not only detect a single bit error, but also clearly locate it and correct it by turning the corresponding coin over again.<\/p>\n\n\n\n<div class=\"wp-block-group has-custom-gelb-transparent-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-ababb639 wp-block-group-is-layout-constrained\" style=\"border-width:1px;border-top-left-radius:25px;border-top-right-radius:25px;border-bottom-left-radius:25px;border-bottom-right-radius:25px;padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\">\n<h3 class=\"wp-block-heading\"><strong>Implementation with Python<\/strong><\/h3>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-baaca9a6 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<p class=\"wp-block-paragraph\">The procedure previously carried out with coins and the template can also be implemented with Python. In a Jupyter notebook, the data bits, check bits and check groups are represented by lists and calculations. <\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/jupyter.org\/try-jupyter\/notebooks\/?fromURL=https:\/\/gist.githubusercontent.com\/ffritzemedia\/173b453784ea082ef501616c963837f5\/raw\/9856c68162f2aacc0b83bbecf2377f8e84805ac2\/05%2520Hamming-Code_LSG.ipynb\" target=\"_blank\" rel=\" noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"876\" height=\"512\" src=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/Hamming_Jupyter.png\" alt=\"\" class=\"wp-image-1413\" srcset=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/Hamming_Jupyter.png 876w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/Hamming_Jupyter-300x175.png 300w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/Hamming_Jupyter-768x449.png 768w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/Hamming_Jupyter-18x12.png 18w\" sizes=\"auto, (max-width: 876px) 100vw, 876px\" \/><\/a><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph translation-block\">Subsequently, a single bit error can be simulated, located on the basis of the test sample and automatically corrected. The <a href=\"https:\/\/jupyter.org\/try-jupyter\/notebooks\/? fromURL=https:\/\/gist.githubusercontent.com\/ffritzemedia\/173b453784ea082ef501616c963837f5\/raw\/9856c68162f2aacc0b83bbecf2377f8e84805ac2\/0520Hamming-Code_LSG.ipynb\" target=\"_blank\" rel=\"noopener\">Jupyter Notebook to Hamming-Code<\/a> <a href=\"https:\/\/jupyter.org\/try-jupyter\/notebooks\/? fromURL=https:\/\/gist.githubusercontent.com\/ffritzemedia\/173b453784ea082ef501616c963837f5\/raw\/9856c68162f2aacc0b83bbecf2377f8e84805ac2\/050Hamming-Code_LSG.ipynb\" target=\"_blank\" rel=\"noopener\"><\/a>contains the corresponding Python implementation and can be run directly in the browser.<\/p>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Hamming code with more bits<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Hamming code can also be extended to longer bit sequences.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-baaca9a6 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66%\">\n<p class=\"wp-block-paragraph\"> For this purpose, additional test bits are inserted at the positions that correspond to powers of 2, i.e. at positions 1, 2, 4, 8, 16 and so on. The more data bits are transferred, the more test bits are required: For example, a 15-bit code with four check bits are created from 11 data bits, and a 31-bit code with five check bits is created from 26 data bits.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ae7903cc8550&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ae7903cc8550\" class=\"wp-block-image size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"784\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_mehr_bit-edited.png\" alt=\"\" class=\"wp-image-1412\" srcset=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_mehr_bit-edited.png 1024w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_mehr_bit-edited-300x230.png 300w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_mehr_bit-edited-768x588.png 768w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_mehr_bit-edited-16x12.png 16w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Even with these longer codes, the test results can form the binary representation of the faulty position, so that a single bit error can be detected and corrected.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Result<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-baaca9a6 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:60%\">\n<p class=\"wp-block-paragraph\">The Hamming code clearly shows how additional test bits help to detect and correct errors in digital data. With the 3D-printed coins, the procedure can initially be built up without a computer and can be traced practically.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ae7903cc945f&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ae7903cc945f\" class=\"wp-block-image size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"795\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_fazit-edited.png\" alt=\"\" class=\"wp-image-1416\" srcset=\"https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_fazit-edited.png 1024w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_fazit-edited-300x233.png 300w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_fazit-edited-768x596.png 768w, https:\/\/ffritze.de\/wp-content\/uploads\/2026\/09\/hamming_fazit-edited-15x12.png 15w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The subsequent implementation in the Jupyter Notebook demonstrates how this unplugged method can be transformed into an algorithm that automatically locates and corrects errors.<\/p>","protected":false},"excerpt":{"rendered":"<p>In this article, the Hamming code is first built with seven coins and without a computer and tested practically. You will learn how test bits can detect errors in a transferred bit sequence and determine the faulty position. The procedure is then programmed in a Jupyter notebook with Python.<\/p>","protected":false},"author":2,"featured_media":1394,"comment_status":"open","ping_status":"open","sticky":false,"template":"seite-thoughts-beitrag","format":"standard","meta":{"iawp_total_views":4,"footnotes":""},"categories":[19,7,21,34],"tags":[89,92,22,40],"class_list":["post-1393","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-algorithms","category-programs","category-python","category-unplugged","tag-code","tag-hamming","tag-python","tag-unplugged"],"_links":{"self":[{"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/posts\/1393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/comments?post=1393"}],"version-history":[{"count":0,"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/posts\/1393\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/media\/1394"}],"wp:attachment":[{"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/media?parent=1393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/categories?post=1393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ffritze.de\/en\/wp-json\/wp\/v2\/tags?post=1393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}