Hi AnomalousMonk, Here is the quote from my req... "...the LSb of the output (Q[0] = D[0]) matches the LSb of the input. With the starting value established, the remaining 7bits of the output (9th bit always 1) is derived from sequential XORing of each bit of the input with the previously derived bit...." Therefore i coded it this way. In a very simple way. pls let me know if it is clear now. Also i was looking for some input to make my code smaller/smarter than it is now.
my %map; for my $i ( 0 .. 255 ) { my @Q = qw(0 0 0 0 0 0 0 0 0); my $result; #Step 1 : $Q[0] = D[0] $Q[0] = ($i & 0x01); #Step 2 : $Q[1] = D[1] ^ $Q[0] $Q[1] = (($i & 0x02) ^ ($Q[0] << 1)); #Step 3 : $Q[2] = D[2] ^ $Q[1] $Q[2] = ($i & 0x04) ^ ($Q[1] << 1); #Step 4 : $Q[3] = D[3] ^ $Q[2] $Q[3] = ($i & 0x08) ^ ($Q[2] << 1); #Step 5 : $Q[4] = D[4] ^ $Q[3] $Q[4] = ($i & 0x10) ^ ($Q[3] << 1); #Step 6 : $Q[5] = D[5] ^ $Q[4] $Q[5] = ($i & 0x20) ^ ($Q[4] << 1); #Step 7 : $Q[6] = D[6] ^ $Q[5] $Q[6] = ($i & 0x40) ^ ($Q[5] << 1); #Step 8 : $Q[7] = D[7] ^ $Q[6] $Q[7] = ($i & 0x80) ^ ($Q[6] << 1); #Step 9 : $Q[8] = 1 $Q[8] = 0x100; $result = ($Q[0] | $Q[1] | $Q[2] | $Q[3] | $Q[4] | $Q[5] | $Q[6] | + $Q[7] | $Q[8]); $map{ $i } = $result; #print "$result "; } pp \%map;

In reply to Re^9: encoding hdmi video byte by hdmiguru
in thread encoding hdmi video byte by hdmiguru

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.