mirror of
https://github.com/mytechnotalent/Embedded-Hacking.git
synced 2026-07-12 23:26:33 +02:00
75 lines
3.5 KiB
XML
75 lines
3.5 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800">
|
|
<style>
|
|
.bg{fill:#0a0a0f}.pnl{fill:#12121a;stroke:#1a1a2e}.hdr{fill:#12121a}
|
|
.title{font:bold 42px 'Courier New',monospace;fill:#00ff41}
|
|
.sub{font:bold 28px 'Courier New',monospace;fill:#00d4ff}
|
|
.txt{font:24px 'Courier New',monospace;fill:#c0c0c0}
|
|
.dim{font:20px 'Courier New',monospace;fill:#888}
|
|
.grn{font:bold 24px 'Courier New',monospace;fill:#00ff41}
|
|
.red{font:bold 24px 'Courier New',monospace;fill:#ff0040}
|
|
.cyn{font:bold 24px 'Courier New',monospace;fill:#00d4ff}
|
|
.amb{font:bold 24px 'Courier New',monospace;fill:#ffaa00}
|
|
.badge{stroke:#00ff41;rx:14}
|
|
</style>
|
|
<rect class="bg" width="1200" height="800"/>
|
|
|
|
<!-- Title -->
|
|
<text x="600" y="52" text-anchor="middle" class="title">Double Precision</text>
|
|
<text x="600" y="88" text-anchor="middle" class="dim">IEEE 754 64-bit Floating Point</text>
|
|
|
|
<!-- Bit Layout -->
|
|
<rect x="40" y="110" width="1120" height="175" rx="8" class="pnl"/>
|
|
<text x="600" y="148" text-anchor="middle" class="sub">64-Bit Layout</text>
|
|
|
|
<rect x="60" y="168" width="80" height="72" rx="4" fill="#ff0040" stroke="#ff0040" stroke-width="1" opacity="0.3"/>
|
|
<text x="100" y="197" text-anchor="middle" class="red">Sign</text>
|
|
<text x="100" y="218" text-anchor="middle" class="dim">1 bit</text>
|
|
|
|
<rect x="160" y="168" width="300" height="72" rx="4" fill="#ffaa00" stroke="#ffaa00" stroke-width="1" opacity="0.2"/>
|
|
<text x="310" y="197" text-anchor="middle" class="amb">Exponent</text>
|
|
<text x="310" y="218" text-anchor="middle" class="dim">11 bits (bias 1023)</text>
|
|
|
|
<rect x="480" y="168" width="660" height="72" rx="4" fill="#00ff41" stroke="#00ff41" stroke-width="1" opacity="0.2"/>
|
|
<text x="810" y="197" text-anchor="middle" class="grn">Mantissa (Fraction)</text>
|
|
<text x="810" y="218" text-anchor="middle" class="dim">52 bits</text>
|
|
|
|
<text x="60" y="272" class="dim">Formula: (-1)^S x 1.Mantissa x 2^(Exp-1023)</text>
|
|
|
|
<!-- 42.52525 Example -->
|
|
<rect x="40" y="305" width="1120" height="190" rx="8" class="pnl"/>
|
|
<text x="600" y="340" text-anchor="middle" class="sub">Encoding 42.52525</text>
|
|
|
|
<text x="60" y="378" class="cyn">Sign:</text>
|
|
<text x="170" y="378" class="txt">0 (positive)</text>
|
|
|
|
<text x="60" y="408" class="amb">Exponent:</text>
|
|
<text x="230" y="408" class="txt">5 + 1023 = 1028</text>
|
|
<text x="530" y="408" class="dim">= 0x404 (hex)</text>
|
|
|
|
<text x="60" y="438" class="grn">Mantissa:</text>
|
|
<text x="230" y="438" class="txt">0101010000110011...</text>
|
|
|
|
<text x="60" y="468" class="dim">Full 64-bit hex:</text>
|
|
<text x="310" y="468" class="grn">0x4045433B645A1CAC</text>
|
|
|
|
<!-- Float vs Double Comparison -->
|
|
<rect x="40" y="515" width="540" height="265" rx="8" class="pnl"/>
|
|
<text x="310" y="553" text-anchor="middle" class="sub">Float (32-bit)</text>
|
|
|
|
<text x="60" y="590" class="txt">Size: 4 bytes</text>
|
|
<text x="60" y="620" class="txt">Exp: 8 bits</text>
|
|
<text x="60" y="650" class="txt">Mantissa: 23 bits</text>
|
|
<text x="60" y="680" class="txt">Precision: ~7 digits</text>
|
|
<text x="60" y="710" class="txt">Bias: 127</text>
|
|
<text x="60" y="740" class="dim">1 register (ARM)</text>
|
|
|
|
<rect x="620" y="515" width="540" height="265" rx="8" class="pnl"/>
|
|
<text x="890" y="553" text-anchor="middle" class="sub">Double (64-bit)</text>
|
|
|
|
<text x="640" y="590" class="grn">Size: 8 bytes</text>
|
|
<text x="640" y="620" class="grn">Exp: 11 bits</text>
|
|
<text x="640" y="650" class="grn">Mantissa: 52 bits</text>
|
|
<text x="640" y="680" class="grn">Precision: ~15 digits</text>
|
|
<text x="640" y="710" class="grn">Bias: 1023</text>
|
|
<text x="640" y="740" class="dim">2 registers (r2:r3)</text>
|
|
</svg> |