LUBs and x86 registers.

main
Joshua Potter 2024-08-19 20:04:22 -06:00
parent 906ef40bc6
commit a35309911d
9 changed files with 652 additions and 12 deletions

View File

@ -502,7 +502,7 @@
"set/axioms.md": "063955bf19c703e9ad23be2aee4f1ab7",
"_journal/2024-05-14.md": "f6ece1d6c178d57875786f87345343c5",
"_journal/2024-05/2024-05-13.md": "71eb7924653eed5b6abd84d3a13b532b",
"x86-64/registers.md": "4bcc04cea66b37d404ac430b0f034697",
"x86-64/registers.md": "e55217fb711495490546975a7828e8f1",
"_journal/2024-05-15.md": "4e6a7e6df32e93f0d8a56bc76613d908",
"_journal/2024-05/2024-05-14.md": "f6ece1d6c178d57875786f87345343c5",
"_journal/2024-05-16.md": "580c7ec61ec56be92fa8d6affcf0a5f6",
@ -576,7 +576,7 @@
"_journal/2024-06-09.md": "935b3ddf65c51e680ac5c000c7e380af",
"_journal/2024-06/2024-06-08.md": "9e1ebc8882a395b96ca765ad5c982d68",
"_journal/2024-06-10.md": "84d27300b97c8544ab4ec68b06edd824",
"_journal/2024-06/2024-06-09.md": "4c336a39775846b416aa73278435065f",
"_journal/2024-06/2024-06-09.md": "7c197f5f2ce193cfbc60f9c8168c9996",
"_journal/2024-06-11.md": "48f46f654a1b8dfeebc01b3adb2bc1d1",
"_journal/2024-06/2024-06-10.md": "1fe3a8beb03b1cc9af188b85933339e4",
"_journal/2024-06-12.md": "8cc810c0f594093768117f57461e2e9e",
@ -647,7 +647,7 @@
"_journal/2024-07/2024-07-11.md": "298cc3688675ee669b5a51d545fd61b5",
"_journal/2024-07/2024-07-10.md": "a0fe22d8be519bf435a5949999eeb4de",
"_journal/2024-07-13.md": "13b5101306b5542b8a1381a6477378ca",
"_journal/2024-07/2024-07-12.md": "6603ed8a3f9a9e87bf40e81b03e96356",
"_journal/2024-07/2024-07-12.md": "8073584fae2fe7bffcd4b69a7cd29058",
"hashing/static.md": "3ec6eaee73fb9b599700f5a56b300b83",
"hashing/addressing.md": "01b33abe25aae285e1641fa43470065b",
"ontology/index.md": "0994403dcd84415f1459752129b55f65",
@ -747,12 +747,15 @@
"_journal/2024-08/2024-08-15.md": "7c3a96a25643b62b0064bf32cb17d92f",
"_journal/2024-08-17.md": "b06a551560c377f61a1b39286cd43cee",
"_journal/2024-08/2024-08-16.md": "096d9147a9e3e7a947558f8dec763a2c",
"set/order.md": "373f4336d4845a3c2188d2215ac5fbc4",
"set/order.md": "49fcebf2e20a6f73571fea5ff09f0753",
"_journal/2024-08-18.md": "6f8aec69e00401b611db2a377a3aace5",
"ontology/philosophy/properties.md": "41b32249d3e4c23d73ddb3a417d65a4c",
"_journal/2024-08-19.md": "e233a2225fdf95a161614e0bc22fce20",
"_journal/2024-08-19.md": "82d3bfa01b4187a56a418f6e33bd10b3",
"_journal/2024-08/2024-08-18.md": "6f8aec69e00401b611db2a377a3aace5",
"_journal/2024-08/2024-08-17.md": "b06a551560c377f61a1b39286cd43cee"
"_journal/2024-08/2024-08-17.md": "b06a551560c377f61a1b39286cd43cee",
"calculus/bounds.md": "4add5fb7591087d0b3383c53dc62e365",
"calculus/index.md": "5ee4d950533ae330ca5ef9e113fe87f3",
"x86-64/instructions/conditions.md": "c5571deac40ac2eeb8666f2d3b3c278e"
},
"fields_dict": {
"Basic": [

View File

@ -8,4 +8,4 @@ title: "2024-06-09"
- [ ] Sheet Music (10 min.)
- [ ] Korean (Read 1 Story)
* Notes on [[registers|condition code registers]] and a [[condition-codes|few instruction classes]] that explicitly update them.
* Notes on [[registers|condition code registers]] and a [[conditions|few instruction classes]] that explicitly update them.

View File

@ -9,5 +9,5 @@ title: "2024-07-12"
- [ ] Korean (Read 1 Story)
* Notes on [[set#Index Sets|index sets]] and [[set#Function Sets|function sets]].
* Notes on a few of the [[condition-codes#SET|set]] instructions.
* Notes on a few of the [[conditions#SET|set]] instructions.
* Small collection of notes on [[hashing/index#Static Hashing|static hashing]].

View File

@ -4,6 +4,10 @@ title: "2024-08-19"
- [x] Anki Flashcards
- [x] KoL
- [ ] OGS
- [x] OGS
- [ ] Sheet Music (10 min.)
- [ ] Korean (Read 1 Story)
- [ ] Korean (Read 1 Story)
* [[bounds|Notes]] on (least) upper bounds and (greatest) lower bounds.
* Finished exercises 3.13 and 3.14 in "Computer systems a programmer's perspective".
* Add notes on `%rax` and `%rsp` registers.

421
notes/calculus/bounds.md Normal file
View File

@ -0,0 +1,421 @@
---
title: Bounds
TARGET DECK: Obsidian::STEM
FILE TAGS: calculus::bounds
tags:
- calculus
---
## Overview
Suppose $S$ is a nonempty set of real numbers and suppose there are numbers $L$ and $U$ such that $L \leq x \leq U$ for all $x \in S$. Then $S$ is said to be **bounded below** by $L$ and **bounded above** by $U$. The number $L$ is said to be a **lower bound** for $S$; the number $U$ is said to be an **upper bound** for $S$.
%%ANKI
Basic
Let $\varnothing \subset S \subseteq \mathbb{R}$. What does it mean for $S$ to be bounded below by $B$?
Back: For all $x \in S$, $B \leq x$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115133063-->
END%%
%%ANKI
Basic
What does it mean for $\varnothing \subseteq \mathbb{R}$ to be bounded above by $B$?
Back: N/A.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115335382-->
END%%
%%ANKI
Basic
Suppose $S \subseteq \mathbb{R}$ is bounded below by $B$. What kind of mathematical object is $S$?
Back: A nonempty set.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115335387-->
END%%
%%ANKI
Basic
Suppose $S \subseteq \mathbb{R}$ is unbounded above. What kind of mathematical object is $S$?
Back: A set (possibly empty).
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115335393-->
END%%
%%ANKI
Basic
Is the set of positive real numbers bounded below?
Back: Yes.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115133068-->
END%%
%%ANKI
Basic
Let $\varnothing \subset S \subseteq \mathbb{R}$. What does it mean for $S$ to be bounded above by $B$?
Back: For all $x \in S$, $x \leq B$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115133071-->
END%%
%%ANKI
Basic
Is the set of positive real numbers bounded above?
Back: No.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115133074-->
END%%
%%ANKI
Basic
What are the upper bounds of interval $[0, 1] \subseteq \mathbb{R}$?
Back: All real numbers $x \geq 1$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115133077-->
END%%
%%ANKI
Basic
What are the upper bounds of interval $(0, 1) \subseteq \mathbb{R}$?
Back: All real numbers $x \geq 1$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115133080-->
END%%
%%ANKI
Basic
What are the lower bounds of interval $[0, 1] \subseteq \mathbb{R}$?
Back: All real numbers $x \leq 0$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115133084-->
END%%
%%ANKI
Basic
What are the lower bounds of interval $(0, 1) \subseteq \mathbb{R}$?
Back: All real numbers $x \leq 0$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115133087-->
END%%
If $L \in S$, then $L$ is the **minimum element** of $S$ (denoted $L = \mathop{\text{min}} S$). Likewise, if $U \in S$, then $U$ is the **maximum element** of $S$ (denoted $U = \mathop{\text{max}}S$). A set with no lower bound is said to be **unbounded below**. A set with no upper bound is said to be **unbounded above**.
%%ANKI
Basic
What is a maximum element of set $\varnothing \subset S \subseteq \mathbb{R}$?
Back: A member of $S$ that is also an upper bound.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115133090-->
END%%
%%ANKI
Basic
What is the maximum element of interval $[0, 1] \subseteq \mathbb{R}$?
Back: $1$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115133094-->
END%%
%%ANKI
Basic
What is the maximum element of interval $(0, 1) \subseteq \mathbb{R}$?
Back: N/A.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115133110-->
END%%
%%ANKI
Basic
What is a minimum element of set $\varnothing \subset S \subseteq \mathbb{R}$?
Back: A member of $S$ that is also a lower bound.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115133099-->
END%%
%%ANKI
Basic
What is the minimum element of interval $(0, 1) \subseteq \mathbb{R}$?
Back: N/A.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115133103-->
END%%
%%ANKI
Basic
What is the minimum element of interval $[0, 1] \subseteq \mathbb{R}$?
Back: $0$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115133106-->
END%%
%%ANKI
Basic
How is a maximum element of $\varnothing \subset S \subseteq \mathbb{R}$ denoted?
Back: As $\mathop{\text{max}} S$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115335395-->
END%%
%%ANKI
Basic
How is a minimum element of $\varnothing \subset S \subseteq \mathbb{R}$ denoted?
Back: As $\mathop{\text{min}} S$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115335390-->
END%%
## Least Upper Bounds
A number $B$ is called a **least upper bound** (or **supremum**) of a nonempty set $S$ if $B$ is an upper bound for $S$ and no number less than $B$ is an upper bound for $S$. This is denoted as $B = \mathop{\text{lub}}S$ or $B = \mathop{\text{sup}} S$.
%%ANKI
Basic
Let $\varnothing \subset S \subseteq \mathbb{R}$. What is a least upper bound of $S$?
Back: An upper bound $B$ for $S$ such that no number less than $B$ is also an upper bound for $S$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953300-->
END%%
%%ANKI
Basic
What is an alternative term for a least upper bound of $S$?
Back: A supremum of $S$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953329-->
END%%
%%ANKI
Basic
How is a least upper bound for $S$ denoted?
Back: As $\mathop{\text{lub}} S$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953335-->
END%%
%%ANKI
Basic
How is a supremum for $S$ denoted?
Back: As $\mathop{\text{sup}} S$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953341-->
END%%
%%ANKI
Basic
What distinguishes a supremum from a least upper bound?
Back: They are synonyms of one another.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953346-->
END%%
%%ANKI
Basic
What distinguishes a supremum from a maximum?
Back: A supremum is not necessarily a member of the reference set.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953352-->
END%%
%%ANKI
Basic
What is the least upper bound of interval $[0, 1] \subseteq \mathbb{R}$?
Back: $1$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953358-->
END%%
%%ANKI
Basic
What is the supremum of interval $(0, 1) \subseteq \mathbb{R}$?
Back: $1$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953364-->
END%%
%%ANKI
Basic
How many upper bounds can a nonempty subset of $\mathbb{R}$ have?
Back: $0$ or more.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953369-->
END%%
%%ANKI
Basic
How many supremums can a nonempty subset of $\mathbb{R}$ have?
Back: $0$ or $1$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953375-->
END%%
%%ANKI
Basic
Is a maximum of a nonempty subset $S$ of $\mathbb{R}$ a supremum of $S$?
Back: Yes.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953380-->
END%%
%%ANKI
Basic
Is a least upper bound of a nonempty subset $S$ of $\mathbb{R}$ a maximum of $S$?
Back: Not necessarily.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953386-->
END%%
### Completeness Axiom
Every nonempty set $S$ of real numbers which is bounded above has a supremum; that is, there is a real number $B$ such that $B = \mathop{\text{sup}} S$.
%%ANKI
Basic
What does the completeness axiom of real numbers state?
Back: Every nonempty set of real numbers bounded above has a supremum.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724116323038-->
END%%
%%ANKI
Basic
Consider $\varnothing \subseteq \mathbb{R}$. Why doesn't the completeness axiom of real numbers apply?
Back: It only applies to nonempty sets.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724116323044-->
END%%
%%ANKI
Basic
Consider $(0, 1) \subseteq \mathbb{R}$. Why doesn't the completeness axiom of real numbers apply?
Back: N/A. It does.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724116323046-->
END%%
%%ANKI
Basic
Consider $\mathbb{R}^+$. Why doesn't the completeness axiom apply?
Back: It only applies to nonempty sets that are bounded above.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724116323049-->
END%%
%%ANKI
Basic
Consider $(-\infty, 0)$. Why doesn't the completeness axiom apply?
Back: N/A. It does.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724116323052-->
END%%
%%ANKI
Basic
What arbitrary decision was made when formulating the completeness axiom of real numbers?
Back: Whether to use supremums or infimums.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724116323055-->
END%%
## Greatest Lower Bounds
A number $B$ is called a **greatest lower bound** (or **infimum**) of a nonempty set $S$ if $B$ is a lower bound for $S$ and no number greater than $B$ is a lower bound for $S$. This is denoted as $B = \mathop{\text{glb}} S$ or $B = \mathop{\text{inf}} S$.
%%ANKI
Basic
Let $\varnothing \subset S \subseteq \mathbb{R}$. What is a greatest upper bound of $S$?
Back: A lower bound $B$ for $S$ such that no number greater than $B$ is also a lower bound for $S$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953392-->
END%%
%%ANKI
Basic
What is an alternative term for a greatest lower bound of $S$?
Back: An infimum of $S$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953397-->
END%%
%%ANKI
Basic
How is a greatest lower bound for $S$ denoted?
Back: As $\mathop{\text{glb}} S$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953402-->
END%%
%%ANKI
Basic
How is an infimum for $S$ denoted?
Back: As $\mathop{\text{inf}} S$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953408-->
END%%
%%ANKI
Basic
What distinguishes a greatest lower bound from an infimum?
Back: They are synonyms of one another.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953417-->
END%%
%%ANKI
Basic
What distinguishes an infimum from a minimum?
Back: A supremum is not necessarily a member of the reference set.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953422-->
END%%
%%ANKI
Basic
What is the infimum of interval $[0, 1] \subseteq \mathbb{R}$?
Back: $0$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953428-->
END%%
%%ANKI
Basic
What is the greatest lower bound of interval $(0, 1) \subseteq \mathbb{R}$?
Back: $0$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953433-->
END%%
%%ANKI
Basic
How many lower bounds can a nonempty subset of $\mathbb{R}$ have?
Back: $0$ or more.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953438-->
END%%
%%ANKI
Basic
How many greatest lower bounds can a nonempty subset of $\mathbb{R}$ have?
Back: $0$ or $1$.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953443-->
END%%
%%ANKI
Basic
Is an infimum of a nonempty subset $S$ of $\mathbb{R}$ a minimum of $S$?
Back: Not necessarily.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953448-->
END%%
%%ANKI
Basic
Is a minimum of a nonempty subset $S$ of $\mathbb{R}$ a greatest lower bound of $S$?
Back: Yes.
Reference: Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).
<!--ID: 1724115953452-->
END%%
## Bibliography
* Tom M. Apostol, _Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra_, 2nd ed. (New York: Wiley, 1980).

3
notes/calculus/index.md Normal file
View File

@ -0,0 +1,3 @@
---
title: Calculus
---

View File

@ -647,7 +647,7 @@ END%%
Basic
What name is given to a member of a partition of a set?
Back: A cell.
Reference: “Partition of a Set,” in _Wikipedia_, June 18, 2024, [https://en.wikipedia.org/w/index.php?title=Partition_of_a_set](https://en.wikipedia.org/w/index.php?title=Partition_of_a_set&oldid=1229656401).
Reference: John B. Fraleigh, _A First Course in Abstract Algebra_, Seventh edition, Pearson new international edition (Harlow: Pearson, 2014).
<!--ID: 1721696946377-->
END%%
@ -959,6 +959,7 @@ END%%
* “Equivalence Relation,” in _Wikipedia_, July 21, 2024, [https://en.wikipedia.org/w/index.php?title=Equivalence_relation](https://en.wikipedia.org/w/index.php?title=Equivalence_relation&oldid=1235801091).
* Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
* John B. Fraleigh, _A First Course in Abstract Algebra_, Seventh edition, Pearson new international edition (Harlow: Pearson, 2014).
* “Partially Ordered Set,” in _Wikipedia_, June 22, 2024, [https://en.wikipedia.org/w/index.php?title=Partially_ordered_set](https://en.wikipedia.org/w/index.php?title=Partially_ordered_set&oldid=1230452839).
* “Partition of a Set,” in _Wikipedia_, June 18, 2024, [https://en.wikipedia.org/w/index.php?title=Partition_of_a_set](https://en.wikipedia.org/w/index.php?title=Partition_of_a_set&oldid=1229656401).
* “Preorder,” in _Wikipedia_, July 21, 2024, [https://en.wikipedia.org/w/index.php?title=Preorder](https://en.wikipedia.org/w/index.php?title=Preorder&oldid=1235839474).

View File

@ -1,5 +1,5 @@
---
title: Condition Code Operations
title: Condition Operations
TARGET DECK: Obsidian::STEM
FILE TAGS: x86-64
tags:
@ -8,6 +8,10 @@ tags:
## Overview
A number of instructions operate with respect to the [[registers#Condition Codes|condition code registers]].
## CMP and TEST
| Instruction | Operands | Based On | Description |
| ------------ | ---------- | --------------------- | ----------- |
| `cmp[bwlq]` | $S_1, S_2$ | $S_2 - S_1$ | Compare |

View File

@ -83,6 +83,210 @@ Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Program
<!--ID: 1713212889874-->
END%%
%%ANKI
Basic
How many bytes make up the `%rax` register?
Back: $8$.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420029-->
END%%
%%ANKI
Basic
How many bytes make up the `%ax` register?
Back: $2$.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420032-->
END%%
%%ANKI
Basic
How many bytes make up the `%al` register?
Back: $1$.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420035-->
END%%
%%ANKI
Basic
How many bytes make up the `%eax` register?
Back: $4$.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420039-->
END%%
%%ANKI
Cloze
{1:Double words} are to {2:`%eax`} whereas {2:quad words} are to {1:`%rax`}.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420043-->
END%%
%%ANKI
Cloze
{1:Words} are to {2:`%ax`} whereas {2:bytes} are to {1:`%al`}.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420047-->
END%%
%%ANKI
Basic
How do you access the low-order 2 bytes of `%rax`?
Back: By using `%ax`.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420052-->
END%%
%%ANKI
Basic
How do you access the low-order 4 bytes of `%rax`?
Back: By using `%eax`.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420056-->
END%%
%%ANKI
Basic
How do you access the low-order byte of `%rax`?
Back: By using `%al`.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420060-->
END%%
%%ANKI
Cloze
By convention, register {`%rax`} is used for {return values}.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420064-->
END%%
%%ANKI
Basic
How many bytes make up the `%rsp` register?
Back: $8$.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420068-->
END%%
%%ANKI
Basic
How many bytes make up the `%sp` register?
Back: $2$.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420071-->
END%%
%%ANKI
Basic
How many bytes make up the `%spl` register?
Back: $1$.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420075-->
END%%
%%ANKI
Basic
How many bytes make up the `%esp` register?
Back: $4$.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420079-->
END%%
%%ANKI
Cloze
{1:Words} are to {2:`%sp`} whereas {2:double words} are to {1:`%esp`}.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420082-->
END%%
%%ANKI
Cloze
{1:Bytes} are to {2:`%spl`} whereas {2:quad words} are to {1:`%rsp`}.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420086-->
END%%
%%ANKI
Basic
How do you access the low-order 2 bytes of `%rsp`?
Back: By using `%sp`.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420090-->
END%%
%%ANKI
Basic
How do you access the low-order 4 bytes of `%rsp`?
Back: By using `%esp`.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420093-->
END%%
%%ANKI
Basic
How do you access the low-order byte of `%rsp`?
Back: By using `%spl`.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420096-->
END%%
%%ANKI
Cloze
By convention, register {`%rsp`} is used for {the stack pointer}.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420100-->
END%%
%%ANKI
Cloze
Which register should I use for an 2 byte return value?
Back: `%ax`
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420103-->
END%%
%%ANKI
Cloze
Which register should I use for a 1 byte stack pointer?
Back: `%spl`
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420106-->
END%%
%%ANKI
Cloze
Which register should I use for a 4 byte stack pointer?
Back: `%esp`
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420109-->
END%%
%%ANKI
Cloze
Which register should I use for an 8 byte return value?
Back: `%rax`
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420113-->
END%%
%%ANKI
Basic
From smallest to largest, list the four "return value" registers.
Back: `%al`, `%ax`, `%eax`, and `$rax`.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420117-->
END%%
%%ANKI
Basic
From smallest to largest, list the four "stack pointer" registers.
Back: `%spl`, `%sp`, `%esp`, and `$rsp`.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1724119420122-->
END%%
## Condition Codes
The CPU also maintains a set of single-bit **condition code** registers describing attributes of the most recent arithmetic or logical operation.
Code | Name | Description