windows-nt/Source/XPSP1/NT/windows/richedit/re30/bitrun.htm
2020-09-26 16:20:57 +08:00

223 lines
8.8 KiB
HTML

<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>BitStream manipulation</title>
</head>
<body bgcolor="#FFFFFF">
<table border="0" cellpadding="0" cellspacing="0">
<caption align="top">Insert 5 bits at underlined cp</caption>
<tr>
<td>&nbsp;</td>
<td><font size="2" face="Courier New">i</font></td>
<td><font size="2" face="Courier New">(j)</font></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><font size="2" face="Courier New">1. </font></td>
<td><font size="2" face="Courier New">1<u>1</u>11 </font></td>
<td><font size="2" face="Courier New">1111</font></td>
<td>&nbsp;</td>
<td><font size="2" face="Courier New">Produce h=0111 and
l=1000</font></td>
</tr>
<tr>
<td><font size="2" face="Courier New">2.</font></td>
<td><font size="2" face="Courier New">1<u>1</u>11</font></td>
<td><font size="2" face="Courier New">xxxx </font></td>
<td><font size="2" face="Courier New">1111 </font></td>
<td><font size="2" face="Courier New">Insert 5/4 elems at
[i+1]</font></td>
</tr>
<tr>
<td><font size="2" face="Courier New">3.</font></td>
<td><font size="2" face="Courier New">0000</font></td>
<td><font size="2" face="Courier New">0111</font></td>
<td><font size="2" face="Courier New">1111</font></td>
<td><font size="2" face="Courier New">j = i+5/4; Zero out
[i] &amp; move h to [j]</font></td>
</tr>
<tr>
<td><font size="2" face="Courier New">4.</font></td>
<td><font size="2" face="Courier New">0000</font></td>
<td><font size="2" face="Courier New">0011</font></td>
<td><font size="2" face="Courier New">1111</font></td>
<td><font size="2" face="Courier New">Shift up 5%4 bits
starting at [j]</font></td>
</tr>
<tr>
<td><font size="2" face="Courier New">5.</font></td>
<td><font size="2" face="Courier New">1<u>000</u></font></td>
<td><font size="2" face="Courier New"><u>00</u>11</font></td>
<td><font size="2" face="Courier New">1111</font></td>
<td><font size="2" face="Courier New">Or l to [i]</font></td>
</tr>
</table>
<p>&nbsp;</p>
<table border="0" cellpadding="0" cellspacing="0">
<caption align="top"><font size="3">Insert 5 bits at
underlined cp with gap (no shifting required)</font></caption>
<tr>
<td>&nbsp;</td>
<td><font size="2" face="Courier New">i</font></td>
<td>&nbsp;</td>
<td><font size="2" face="Courier New">(j)</font></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><font size="2" face="Courier New">1. </font></td>
<td><font size="2" face="Courier New">1<u>1</u>11 </font></td>
<td><font size="2" face="Courier New">1111</font></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><font size="2" face="Courier New">Produce h=0111 and
l=1000</font></td>
</tr>
<tr>
<td><font size="2" face="Courier New">2.</font></td>
<td><font size="2" face="Courier New">1<u>1</u>11</font></td>
<td><font size="2" face="Courier New">xxxx </font></td>
<td><font size="2" face="Courier New">xxxx </font></td>
<td><font size="2" face="Courier New">1111 </font></td>
<td><font size="2" face="Courier New">c = (5+3)/4; Insert
c elems at [i+1]</font></td>
</tr>
<tr>
<td><font size="2" face="Courier New">3.</font></td>
<td><font size="2" face="Courier New">1000</font></td>
<td><font size="2" face="Courier New">xxxx</font></td>
<td><font size="2" face="Courier New">0111</font></td>
<td><font size="2" face="Courier New">1111</font></td>
<td><font size="2" face="Courier New">j = i+c; Move l to
[i]; Move h to [j]</font></td>
</tr>
<tr>
<td><font size="2" face="Courier New">4.</font></td>
<td><font size="2" face="Courier New">1<u>000</u></font></td>
<td><font size="2" face="Courier New"><u>0</u>xxx</font></td>
<td><font size="2" face="Courier New"><u>0</u>111</font></td>
<td><font size="2" face="Courier New">1111</font></td>
<td><font size="2" face="Courier New">ibGap =
cp+(5/4)*RSIZE; cbGap = c*RSIZE - 5; </font></td>
</tr>
</table>
<p>&nbsp;</p>
<table border="0" cellpadding="0" cellspacing="0">
<caption align="top">Delete 7 bits at underlined cp</caption>
<tr>
<td>&nbsp;</td>
<td><font size="2" face="Courier New">i</font></td>
<td><font size="2" face="Courier New">(j)</font></td>
<td><font size="2" face="Courier New">k</font></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><font size="2" face="Courier New">1. </font></td>
<td><font size="2" face="Courier New">111<u>x</u> </font></td>
<td><font size="2" face="Courier New"><u>xxxx</u> </font></td>
<td><font size="2" face="Courier New"><u>xx</u>11 </font></td>
<td><font size="2" face="Courier New">0000 </font></td>
<td><font size="2" face="Courier New">Produce h=0011 and
l=1110</font></td>
</tr>
<tr>
<td><font size="2" face="Courier New">2.</font></td>
<td><font size="2" face="Courier New"><u>xxxx</u></font></td>
<td><font size="2" face="Courier New"><u>xx</u>11</font></td>
<td><font size="2" face="Courier New">0000</font></td>
<td>&nbsp;</td>
<td><font size="2" face="Courier New">Delete 7/4 elems at
[i]</font></td>
</tr>
<tr>
<td><font size="2" face="Courier New">3.</font></td>
<td><font size="2" face="Courier New">0000</font></td>
<td><font size="2" face="Courier New">0011</font></td>
<td><font size="2" face="Courier New">0000</font></td>
<td>&nbsp;</td>
<td><font size="2" face="Courier New">j = k-7/4; Zero out
[i] &amp; move h to [j]</font></td>
</tr>
<tr>
<td><font size="2" face="Courier New">4.</font></td>
<td><font size="2" face="Courier New">0001</font></td>
<td><font size="2" face="Courier New">1000</font></td>
<td><font size="2" face="Courier New">0---</font></td>
<td>&nbsp;</td>
<td><font size="2" face="Courier New">Shift down 7%4 bits
starting at [i]</font></td>
</tr>
<tr>
<td><font size="2" face="Courier New">5.</font></td>
<td><font size="2" face="Courier New">1111</font></td>
<td><font size="2" face="Courier New">1000</font></td>
<td><font size="2" face="Courier New">0---</font></td>
<td>&nbsp;</td>
<td><font size="2" face="Courier New">Or l to [i]</font></td>
</tr>
</table>
<p>&nbsp;</p>
<table border="0" cellpadding="0" cellspacing="0">
<caption align="top">Delete 7 bits at underlined cp with gap
(no shifting required)</caption>
<tr>
<td>&nbsp;</td>
<td><font size="2" face="Courier New">i</font></td>
<td><font size="2" face="Courier New">(j)</font></td>
<td><font size="2" face="Courier New">k</font></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><font size="2" face="Courier New">1. </font></td>
<td><font size="2" face="Courier New">111<u>x</u> </font></td>
<td><font size="2" face="Courier New"><u>xxxx</u> </font></td>
<td><font size="2" face="Courier New"><u>xx</u>11 </font></td>
<td><font size="2" face="Courier New">0000 </font></td>
<td><font size="2" face="Courier New">Produce h=0011 and
l=1110</font></td>
</tr>
<tr>
<td><font size="2" face="Courier New">2.</font></td>
<td><font size="2" face="Courier New"><u>xxxx</u></font></td>
<td><font size="2" face="Courier New"><u>xx</u>11</font></td>
<td><font size="2" face="Courier New">0000</font></td>
<td>&nbsp;</td>
<td><font size="2" face="Courier New">c = 7/4; Delete c
elems at [i]</font></td>
</tr>
<tr>
<td><font size="2" face="Courier New">3.</font></td>
<td><font size="2" face="Courier New">1110</font></td>
<td><font size="2" face="Courier New">0011</font></td>
<td><font size="2" face="Courier New">0000</font></td>
<td>&nbsp;</td>
<td><font size="2" face="Courier New">j = k-c; Zero [i];
Move h to [j]; Or l to [i]</font></td>
</tr>
<tr>
<td><font size="2" face="Courier New">4.</font></td>
<td><font size="2" face="Courier New">111x</font></td>
<td><font size="2" face="Courier New">xx11</font></td>
<td><font size="2" face="Courier New">0000</font></td>
<td>&nbsp;</td>
<td><font size="2" face="Courier New">ibGap = cp; cbGap =
7%4;</font></td>
</tr>
</table>
</body>
</html>