	if (xor == 1) {
						reg = reg ^ parseInt("10000011", 2);
					}
					// next bit from input data
					//comb = comb >> 1;
					comb = Math.floor(comb / 2);
				}

				// step 4: the state of the shift register is the ECC value
				toValue(result, reg);
			}

			function toValue(id, num) {
				var n= num.toString(2);
				document.getElementById(id).value = "00000000".substr(n.length)+n;
			}

		</script>
	</head>
	<body>
		<div class="def">
			<h2>Packet Header</h2>
			<div class="defx">byte3: <input maxl