mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2026-01-31 16:14:33 +01:00
publish2
This commit is contained in:
@@ -1 +1 @@
|
||||
body{font-family:Verdana;font-size:.8em;padding:20px 100px 0 100px;margin:0}.expression,.indicator,.mono{font-family:monospace}code{font-size:1.2em;font-weight:700}.links{float:right;position:absolute;right:10px;top:10px}.mono{font-size:1.3em}.expressionInput{width:500px;padding:3px;border:solid 1px #d3d3d3}.result{margin:10px 10px 30px}.result .input{margin-bottom:10px}.result .content{padding-left:10px}.result .cur{color:#d3d3d3;margin-right:5px}.expression .label{font-weight:700;padding-right:5px;text-align:right}.expression .bin{letter-spacing:3px}.expression .byte{margin:0 3px}.expression .result td{border-top:dotted 1px gray}.expression{font-size:1.5em}.help{padding:10px}.help ul{list-style-type:none;margin:0;padding:0}.help p{margin-top:0}.indicator{padding:2px 5px;font-size:1.3em;background:0 0;border:none;cursor:pointer}.error{color:maroon}#view{padding:10px}.light{background:#fafafa}.light .one{color:#000}.light .zero{color:#888}.light .indicator{color:#ddd}.light .on{color:#121212}.dark,.dark .expressionInput{background:#121212;color:#fff}.dark a,.dark a:visited{color:#fff}.dark .indicator{color:#555}.dark .on{color:#fff}.dark .zero{color:#999}
|
||||
body{font-family:Verdana;font-size:.8em;padding:20px 100px 0 100px;margin:0}.expression,.indicator,.mono{font-family:monospace}code{font-size:1.2em;font-weight:700}.links{float:right;position:absolute;right:10px;top:10px}.mono{font-size:1.3em}.expressionInput{width:500px;padding:3px;border:solid 1px #d3d3d3}.result{margin:10px 10px 30px}.result .input{margin-bottom:10px}.result .content{padding-left:10px}.result .cur{color:#d3d3d3;margin-right:5px}.expression .label{font-weight:700;padding-right:5px;text-align:right}.expression .bin{letter-spacing:3px}.expression .byte{margin:0 3px}.expression .result td{border-top:dotted 1px gray}.expression{font-size:1.5em}.expression .prefix{font-weight:400;display:none;font-size:.9em}.expression .other{font-size:.9em}.hex .prefix{display:inline}.help{padding:10px}.help ul{list-style-type:none;margin:0;padding:0}.help p{margin-top:0}.indicator{padding:2px 5px;font-size:1.3em;background:0 0;border:none;cursor:pointer}.error{color:maroon}#view{padding:10px}.light{background:#fafafa}.light .one{color:#000}.light .zero{color:#888}.light .indicator{color:#ddd}.light .on{color:#121212}.light .prefix{color:#888}.light .other{color:#bbb}.dark,.dark .expressionInput{background:#121212;color:#fff}.dark a,.dark a:visited{color:#fff}.dark .indicator{color:#555}.dark .on{color:#fff}.dark .prefix,.dark .zero{color:#999}.dark .other{color:#444}
|
||||
72
index.html
72
index.html
@@ -54,13 +54,21 @@
|
||||
</div>
|
||||
<div class="float:left">
|
||||
<p class="section">
|
||||
<strong>Supported Bitwise Operations</strong>
|
||||
<strong>Supported Bitwise Operations</strong><br/>
|
||||
<small>
|
||||
<a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators">
|
||||
as implemented in JavaScript engine
|
||||
</a>
|
||||
</small>
|
||||
<ul>
|
||||
<li><code>&</code> — bitwise AND</li>
|
||||
<li><code>|</code> — bitwise inclusive OR</li>
|
||||
<li><code>^</code> — bitwise exclusive XOR</li>
|
||||
<li><code><<</code> — left shift</li>
|
||||
<li><code>>></code> — right shift</li>
|
||||
<li><code>~</code> — bitwise NOT</li>
|
||||
<li><code><<</code> — left shift</li>
|
||||
<li><code>>></code> — sign propagating right shift</li>
|
||||
<li><code>>>></code> — zero-fill right shift</li>
|
||||
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
@@ -86,38 +94,69 @@
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script data-template="shiftExpressionView" type="text/template">
|
||||
<script data-template="shiftExpressionView" data-compiled="" type="text/template">
|
||||
<table class="expression">
|
||||
<tr>
|
||||
<td class="label">{operand1}</td>
|
||||
<td class="bin">{operand1Binary}</td>
|
||||
<td class="label">{m.operand1.input}</td>
|
||||
<td class="bin">{m.operand1.bin.padLeft(m.bitsSize, '0')}</td>
|
||||
<td class="other">{m.operand1.other}</td>
|
||||
</tr>
|
||||
<tr class="result">
|
||||
<td class="label">{operand1}{sign}{operand2}={result}</td>
|
||||
<td class="bin">{resultBinary}</td>
|
||||
<td class="label">{m.string.replace(/\s/g,'')}={m.result.input}</td>
|
||||
<td class="bin">{m.result.bin.padLeft(m.bitsSize, '0')}</td>
|
||||
<td class="other">{m.result.other}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</script>
|
||||
|
||||
<script data-template="binaryExpressionView" type="text/template">
|
||||
<script data-template="notExpressionView" data-compiled="" type="text/template">
|
||||
<table class="expression">
|
||||
<tr>
|
||||
<td class="label">{m.operand1.input}</td>
|
||||
<td class="bin">{m.operand1.bin.padLeft(m.bitsSize, '0')}</td>
|
||||
<td class="other">{m.operand1.other}</td>
|
||||
</tr>
|
||||
<tr class="result">
|
||||
<td class="label">{m.sign}{m.operand1.input}={m.result.input}</td>
|
||||
<td class="bin">{m.result.bin.padLeft(m.bitsSize, '0')}</td>
|
||||
<td class="other">{m.result.other}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</script>
|
||||
|
||||
<script data-template="binaryExpressionView" data-compiled="" type="text/template">
|
||||
<table class="expression">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="label">{operand1}</td>
|
||||
<td class="bin">{operand1Binary}</td>
|
||||
<td class="label">{m.operand1.input}</td>
|
||||
<td class="bin">{m.operand1.bin.padLeft(m.bitsSize, '0')}</td>
|
||||
<td class="other">{m.operand1.other}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{sign}</td>
|
||||
<td class="label">{operand2}</td>
|
||||
<td class="bin">{operand2Binary}</td>
|
||||
<td>{m.sign}</td>
|
||||
<td class="label">{m.operand2.input}</td>
|
||||
<td class="bin">{m.operand2.bin.padLeft(m.bitsSize, '0')}</td>
|
||||
<td class="other">{m.operand2.other}</td>
|
||||
</tr>
|
||||
<tr class="result">
|
||||
<td>=</td>
|
||||
<td class="label">{result}</td>
|
||||
<td class="bin">{resultBinary}</td>
|
||||
<td class="label">{m.result.input}</td>
|
||||
<td class="bin">{m.result.bin.padLeft(m.bitsSize, '0')}</td>
|
||||
<td class="other">{m.result.other}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</script>
|
||||
<script data-template="numbersList" data-compiled="" type="text/template">
|
||||
<table class="expression">
|
||||
{each op in m.operands}
|
||||
<tr>
|
||||
<td class="label">{op.input}</td>
|
||||
<td class="bin">{op.bin.padLeft(m.bitsSize, '0')}</td>
|
||||
<td class="other">{op.other}</td>
|
||||
</tr>
|
||||
{/}
|
||||
</table>
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -136,6 +175,7 @@
|
||||
else {
|
||||
|
||||
cmd.execute('1|2');
|
||||
cmd.execute('1<<0x2a');
|
||||
cmd.execute('2 4 8 16 32');
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user