<jupyter_start><jupyter_text>CRC Berechnung<jupyter_code>import sys  
sys.path.insert(0, './helper/')

import crc

data = "1001100"
generator = "1111"
crc.crc(data, generator)<jupyter_output>Binary form:	 1001100  divided by  1111

x**6+x**3+x**2
x**3+x**2+x+1

Binary form (added zeros):	 1001100000  divided by  1111
Result is	 1101100
Remainder is	 100
Working is	

    1101100 
 ---------- 
 1001100000
1111
----
 110100000
 1111
 ----
  01000000
  0000
  ----
   1000000
   1111
   ----
    111000
    1111
    ----
     00100
     0000
     ----
      0100
      0000
      ----
       100

Transmitted value is:	 1001100100<jupyter_text>IP Adresse zu Binär/Dezimal Form<jupyter_code>import sys  
sys.path.insert(0, './helper/')

import interne_protocole

interne_protocole.ip2bin('172.16.31.10')
interne_protocole.bin2ip('01000011.10110111.11010010.01100011')

print('')

interne_protocole.netmask2cidr('255.255.255.192')
interne_protocole.cidr2netmask(26)

interne_protocole.cidr2hosts(26)<jupyter_output>01000011.10110111.11010010.01100011
67.183.210.99

26
255.255.255.192
Total Hosts in Subnet: 62<jupyter_text>Hamming Code<jupyter_code>import sys
sys.path.insert(0, './helper/')

import hamming

#hamming.code('1001000') # HSLU 00110010000 = 'H'

#hamming.code('1100001') # HSLU 10111001001 = 'a'

hamming.code('1101101') # HSLU 11101010101 = 'm'

print('')

hamming.error('11101010111') # HSLU 11101010101 = 'm'

print('')

hamming.distance('10110011', '11010010')<jupyter_output>Hamming code generated would be: 11101010101

Error is in 10 bit
After correction hamming code is: 
11101010101

Hamming Distance is: 3
{'fraction_non_alphanumeric': 0.13513513513513514, 'fraction_numerical': 0.23894348894348894, 'mean_word_length': 3.777126099706745, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '248513', 'license': 'Apache-2.0', 'n_tokens_mistral': 930, 'n_tokens_neox': 652, 'n_words': 125, 'path': 'CNA.ipynb', 'repo_name': 'RubenNunez/hslu-cna', 'size': '1629'}