File:Conv code 177 133.png
Page contents not supported in other languages.
Tools
Actions
General
In other projects
Appearance
Size of this preview: 800 × 324 pixels. Other resolutions: 320 × 130 pixels | 963 × 390 pixels.
Original file (963 × 390 pixels, file size: 28 KB, MIME type: image/png)
This is a file from the Wikimedia Commons. Information from its description page there is shown below. Commons is a freely licensed media file repository. You can help. |
Summary
DescriptionConv code 177 133.png |
English: Octal 171 is the binary 1111001, octal 133 is the binary 1011011. So, the one means the existence of the link to the adder (by modulo 2), zero - no link.
Try in python: import numpy as np
from scipy.ndimage.interpolation import shift
class ConvolutionalCodes:
def __init__(self, poly):
self.poly = poly
def poly2regs(self):
poly = self.poly
L = poly[0] # Constrain length
Gen = [] # List for generators
for g in poly[1]:
bin_str = bin(int(str(g), 8))[2:] # From octal to binary representation
split_str = list(tuple(bin_str)) # Split the bits
split_int = [int(i) for i in split_str] # Convert to from chars to integers
Gen.append(split_int)
return L, Gen
def encoder(self, message):
L, Gen = self.poly2regs()
Gen = np.matrix(Gen)
memory = np.zeros((L,))
encoded = []
for bit in message:
memory = np.abs(shift(memory, 1, cval=np.NaN).round())
memory[0] = bit
y = np.array(np.dot(Gen, memory) % 2)
[encoded.append(i) for i in y[0]]
return encoded
convC = ConvolutionalCodes([7,[171, 133]])
convC.poly2regs()
convC.encoder([1, 0, 1, 0, 0, 1, 1])
|
||
Date | |||
Source | Own work | ||
Author | Kirlf | ||
Other versions |
|
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Items portrayed in this file
depicts
some value
12 October 2018
image/png
b69e9b091fe8427ca038c40893b931c559ca7570
28,611 byte
390 pixel
963 pixel
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 06:07, 13 February 2019 | 963 × 390 (28 KB) | Kirlf | User created page with UploadWizard |
File usage
The following page uses this file:
Retrieved from "https://en.wikipedia.org/wiki/File:Conv_code_177_133.png"