Add multilingual language and systems learning tracks
This commit is contained in:
1 parent
07338189fc
commit
d8d1c40118
844 files changed
+6061
No files matched your search
@@ -0,0 +1,9 @@
|
||||
# CPU Architecture & Portability · 1
|
||||
|
||||
[Agila University track](https://edu.agilaos.com/track.php?track=22&lang=en)
|
||||
|
||||
About 15 minutes per lesson. Predict, run, change, explain, then complete the check in University.
|
||||
|
||||
- [Lesson 1: Source, machine code, and ISA](lesson-1/lesson.html)
|
||||
- [Lesson 2: Bits, bytes, and integer width](lesson-2/lesson.html)
|
||||
- [Lesson 3: Endianness is a byte-order rule](lesson-3/lesson.html)
|
||||
@@ -0,0 +1,3 @@
|
||||
<!doctype html><html lang="en"><meta charset="utf-8"><title>Source, machine code, and ISA</title><h1>Source, machine code, and ISA</h1><p>15-minute session: read for 3 minutes, trace for 3, experiment for 7, and complete the check for 2. Spend longer whenever you need.</p><p>A CPU executes instructions from its instruction-set architecture (ISA). Source text needs a compiler or interpreter. The same Python source may work on x86-64 and Arm64 when each has a compatible interpreter; a compiled x86-64 executable is a different artifact. Print the lab machine’s architecture, then write a table separating source language, ISA, operating system, and runtime. An emulator implements another machine’s behavior and is not the same as recompilation.</p><pre><code class="language-python">import platform
|
||||
print(platform.machine())
|
||||
</code></pre><h3>Practice and evidence</h3><p>Keep three notes: your prediction, the actual result, and why they match or differ. The completion check grades understanding; the practice task builds skill.</p><p><a href="https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html">Language reference: www.intel.com</a></p><p><a href="https://developer.arm.com/Architectures/Learn%20the%20Architecture">Language reference: developer.arm.com</a></p><p><a href="https://docs.riscv.org/">Language reference: docs.riscv.org</a></p></html>
|
||||
@@ -0,0 +1,2 @@
|
||||
import platform
|
||||
print(platform.machine())
|
||||
@@ -0,0 +1,5 @@
|
||||
<!doctype html><html lang="en"><meta charset="utf-8"><title>Bits, bytes, and integer width</title><h1>Bits, bytes, and integer width</h1><p>15-minute session: read for 3 minutes, trace for 3, experiment for 7, and complete the check for 2. Spend longer whenever you need.</p><p>Eight bits represent 256 bit patterns. Unsigned 8-bit values range from 0 to 255. The model uses modulo arithmetic to wrap 256 to zero; Python integers do not naturally have this fixed width. Compare signed and unsigned interpretations of 255. Predict the range for 16 bits. Do not infer pointer size or a language’s integer size solely from a CPU’s marketing name.</p><pre><code class="language-python">bits=8
|
||||
print(2**bits)
|
||||
print((255+1) % (2**bits))
|
||||
</code></pre><p><strong>Expected result:</strong> <code>256
|
||||
0</code></p><h3>Practice and evidence</h3><p>Keep three notes: your prediction, the actual result, and why they match or differ. The completion check grades understanding; the practice task builds skill.</p><p><a href="https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html">Language reference: www.intel.com</a></p><p><a href="https://developer.arm.com/Architectures/Learn%20the%20Architecture">Language reference: developer.arm.com</a></p><p><a href="https://docs.riscv.org/">Language reference: docs.riscv.org</a></p></html>
|
||||
@@ -0,0 +1,3 @@
|
||||
bits=8
|
||||
print(2**bits)
|
||||
print((255+1) % (2**bits))
|
||||
@@ -0,0 +1,5 @@
|
||||
<!doctype html><html lang="en"><meta charset="utf-8"><title>Endianness is a byte-order rule</title><h1>Endianness is a byte-order rule</h1><p>15-minute session: read for 3 minutes, trace for 3, experiment for 7, and complete the check for 2. Spend longer whenever you need.</p><p>The number 0x1234 can be stored as bytes 34 12 in little-endian order or 12 34 in big-endian order. The number is unchanged; the representation changes. Run both conversions and decode them back. A file or network protocol must specify byte order instead of copying a host struct blindly. C struct padding and alignment are separate concerns.</p><pre><code class="language-python">value=0x1234
|
||||
print(value.to_bytes(2,"little").hex())
|
||||
print(value.to_bytes(2,"big").hex())
|
||||
</code></pre><p><strong>Expected result:</strong> <code>3412
|
||||
1234</code></p><h3>Practice and evidence</h3><p>Keep three notes: your prediction, the actual result, and why they match or differ. The completion check grades understanding; the practice task builds skill.</p><p><a href="https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html">Language reference: www.intel.com</a></p><p><a href="https://developer.arm.com/Architectures/Learn%20the%20Architecture">Language reference: developer.arm.com</a></p><p><a href="https://docs.riscv.org/">Language reference: docs.riscv.org</a></p></html>
|
||||
@@ -0,0 +1,3 @@
|
||||
value=0x1234
|
||||
print(value.to_bytes(2,"little").hex())
|
||||
print(value.to_bytes(2,"big").hex())
|
||||
Reference in new issue
Block a user