23 lines
273 B
HTML
23 lines
273 B
HTML
<script>
|
|
|
|
|
|
var v = 15390;
|
|
console.log(v.toString(2));
|
|
var m;
|
|
for (var t=0;t<16;t++)
|
|
{
|
|
m = v >> t;
|
|
console.log(m.toString(2), t);
|
|
}
|
|
|
|
for (var t=0;t<16;t++)
|
|
{
|
|
m = v << t;
|
|
console.log(m.toString(2));
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
a[0] | (a[1] << 8)
|