Compare commits

...

21 Commits

Author SHA1 Message Date
alexander
f73195234f added complex komonent list
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 23s
2026-02-04 08:42:11 +01:00
alexander
c169e3eca4 Added float diagram
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 22s
2026-02-03 23:15:10 +01:00
alexander
fb472fb022 Added raw blocks for nice view
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 21s
2026-02-03 22:20:27 +01:00
alexander
5356c01c04 Fixed range error
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 20s
2026-02-03 19:25:15 +01:00
alexander
b5998fe513 Fixed Type in CT
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 20s
2026-02-03 19:24:26 +01:00
alexander
7e30cfee79 Added CT good to know sheet
Some checks failed
Build Typst PDFs (Docker) / build-typst (push) Has been cancelled
2026-02-03 19:24:07 +01:00
alexander
83aa6764fe Merge branch 'main' of gitea.mintcalc.com:alexander/TUM-Formelsammlungen
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 22s
2026-02-02 14:46:23 +01:00
alexander
ad2c7f2919 started table 2026-02-02 14:45:59 +01:00
levi
c9a3cdfcdb added eintor liste
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 19s
2026-02-02 12:47:10 +01:00
levi
0d05a1a593 eintor liste 2026-02-02 12:45:39 +01:00
alexander
68b599eea4 Fixed complex
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 21s
2026-02-02 12:40:23 +01:00
alexander
d3e4df0a3f Moved Math macros to seperte file
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 20s
2026-02-02 07:34:12 +01:00
alexander
446be9a38f removed allgemein from LinearAlgebra
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 20s
2026-02-01 23:56:42 +01:00
alexander
72e31ef355 Added alot of linAlg
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 22s
2026-02-01 23:56:11 +01:00
alexander
d7703597bb Added Qullen Plot
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 25s
2026-02-01 11:49:45 +01:00
alexander
1573913f3f Added verschaltung
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 20s
2026-01-31 19:17:45 +01:00
alexander
1c19402b01 Change stuff
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 20s
2026-01-30 23:58:13 +01:00
alexander
d113b66dcd Added a lot of shit
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 19s
2026-01-30 21:47:21 +01:00
alexander
5a8d8dff75 started cmos in digitaltechnik
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 16s
2026-01-30 18:41:47 +01:00
alexander
636eeb2b9a updated schaltungstheorie
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 16s
2026-01-30 11:21:02 +01:00
alexander
3f9811c454 started adding verlustleistung to schaltungstheorie 2026-01-30 09:44:14 +01:00
13 changed files with 2232 additions and 322 deletions

View File

@@ -43,6 +43,11 @@ jobs:
continue-on-error: true continue-on-error: true
run: typst compile --root src src/cheatsheets/Digitaltechnik.typ "build/sem1-Digitaltechnik.pdf" run: typst compile --root src src/cheatsheets/Digitaltechnik.typ "build/sem1-Digitaltechnik.pdf"
- name: Compile CT
continue-on-error: true
run: typst compile --root src src/cheatsheets/CT.typ "build/sem1-Computertechnik.pdf"
- name: Create Gitea Release - name: Create Gitea Release
continue-on-error: true continue-on-error: true
uses: akkuman/gitea-release-action@v1 uses: akkuman/gitea-release-action@v1

View File

@@ -1,9 +1,7 @@
#import "../lib/common_rewrite.typ" : *
#import "@preview/mannot:0.3.1" #import "@preview/mannot:0.3.1"
#show math.integral: it => math.limits(math.integral) #import "../lib/common_rewrite.typ" : *
#show math.sum: it => math.limits(math.sum) #import "../lib/mathExpressions.typ" : *
#let lim = $limits("lim")$
#set text(7.5pt) #set text(7.5pt)
@@ -106,9 +104,8 @@
// Complex Zahlen // Complex Zahlen
#bgBlock(fill: colorAllgemein)[ #bgBlock(fill: colorAllgemein)[
#subHeading(fill: colorAllgemein)[Complexe Zahlen] #subHeading(fill: colorAllgemein)[Complexe Zahlen]
$z = r dot e^(phi i) = r (cos(phi) + i sin(phi))$
$z^n = r^n dot e^(phi i dot n) = r^n (cos(n phi) + i sin(n phi))$ #ComplexNumbersSection()
#grid( #grid(
columns: (1fr, 1fr), columns: (1fr, 1fr),

154
src/cheatsheets/CT.typ Normal file
View File

@@ -0,0 +1,154 @@
#import "../lib/styles.typ" : *
#import "../lib/common_rewrite.typ" : *
#import "@preview/cetz:0.4.2"
#set page(
paper: "a4",
margin: (
bottom: 10mm,
top: 5mm,
left: 5mm,
right: 5mm
),
flipped:true,
numbering: "— 1 —",
number-align: center
)
#set text(size: 8pt)
#place(top+center, scope: "parent", float: true, heading(
[Computer Technik/Programmierpraktikum EI]
))
#let Allgemein = color.hsl(105.13deg, 92.13%, 75.1%)
#let colorProgramming = color.hsl(330.19deg, 100%, 68.43%)
#let colorNumberSystems = color.hsl(202.05deg, 92.13%, 75.1%)
// #let colorVR = color.hsl(280deg, 92.13%, 75.1%)
// #let colorAbbildungen = color.hsl(356.92deg, 92.13%, 75.1%)
// #let colorGruppen = color.hsl(34.87deg, 92.13%, 75.1%)
#let SeperatorLine = line(length: 100%, stroke: (paint: black, thickness: 0.3mm))
#let MathAlignLeft(e) = {
align(left, block(e))
}
#columns(2, gutter: 2mm)[
#bgBlock(fill: colorNumberSystems)[
#subHeading(fill: colorNumberSystems)[ASCII Ranges]
#table(
columns: (1fr, 1fr, 1fr),
[Range], [Hex], [Bits],
[Upper Case], raw("0x41-0x5A"), [#raw("010XXXXX") (bit 6)],
[Lower Case], raw("0x61-0x7A"), [#raw("011XXXXX") (bit 6)],
[Numbers (0-9)], raw("0x30-0x39"), [#raw("0011XXXX")],
[Ganz ASCII], raw("0x00-0x7F"), [#raw("0XXXXXXX")],
)
]
#bgBlock(fill: colorNumberSystems)[
#subHeading(fill: colorNumberSystems)[Einer-Kompilment, Zweier-Kompliment, Float (IEEE 754)]
*Float (IEEE 754)*
#cetz.canvas({
import cetz.draw : *
let cell_size = 0.3;
let manntise_stop = 22;
let exponent_start = 23;
let exponent_stop = 30;
let sign_bit = 31;
let total_bits = sign_bit + 1;
for i in range(total_bits) {
let bit = 31 - i;
rect((i*cell_size, 0), (i*cell_size+cell_size, 0.5),
fill: if bit == sign_bit { rgb("#8fff57") } else {
if ( bit >= exponent_start and bit <= exponent_stop) { rgb("#ffe057") } else { if (bit <= manntise_stop) {rgb("#57a5ff")} else { white } }
},
stroke: (thickness: 0.2mm)
)
content((i*cell_size + 0.5*cell_size, 0.25), raw(str(0)))
}
content((cell_size, 0.7), [sign], anchor: "east")
content((5*cell_size, 0.7), [Exponent (#str(exponent_stop - exponent_start + 1) bit)])
content((20*cell_size, 0.7), [Mantisse/Wert (#str(manntise_stop+1) bit)])
rect((0,0), (32*cell_size, 0.5))
content((cell_size*(total_bits - sign_bit), -0.2), anchor: "south", raw(str(sign_bit)), angle: 90deg)
content((cell_size*(total_bits - exponent_stop), -0.2), anchor: "south", raw(str(exponent_stop)), angle: 90deg)
content((cell_size*(total_bits - exponent_start), -0.2), anchor: "south", raw(str(exponent_start)), angle: 90deg)
content((cell_size*(total_bits - manntise_stop), -0.2), anchor: "south", raw(str(manntise_stop)), angle: 90deg)
content((cell_size*(total_bits), -0.2), anchor: "south", raw(str(0)), angle: 90deg)
})
#cetz.canvas({
import cetz.draw : *
let cell_size = 0.21;
let manntise_stop = 51;
let exponent_start = 52;
let exponent_stop = 62;
let sign_bit = 63;
let total_bits = sign_bit + 1;
for i in range(total_bits) {
let bit = sign_bit - i;
rect((i*cell_size, 0), (i*cell_size+cell_size, 0.5),
fill: if bit == sign_bit { rgb("#8fff57") } else {
if ( bit >= exponent_start and bit <= exponent_stop) { rgb("#ffe057") } else { if (bit <= manntise_stop) {rgb("#57a5ff")} else { white } }
},
stroke: (thickness: 0.2mm)
)
content((i*cell_size + 0.5*cell_size, 0.25), raw(str(0)))
}
content((cell_size, 0.7), [sign], anchor: "east")
content((7*cell_size, 0.7), [Exponent (#str(exponent_stop - exponent_start + 1) bit)])
content((20*cell_size, 0.7), [Mantisse/Wert (#str(manntise_stop+1) bit)])
rect((0,0), (total_bits*cell_size, 0.5))
content((cell_size*(total_bits - sign_bit), -0.2), anchor: "south", raw(str(sign_bit)), angle: 90deg)
content((cell_size*(total_bits - exponent_stop), -0.2), anchor: "south", raw(str(exponent_stop)), angle: 90deg)
content((cell_size*(total_bits - exponent_start), -0.2), anchor: "south", raw(str(exponent_start)), angle: 90deg)
content((cell_size*(total_bits - manntise_stop), -0.2), anchor: "south", raw(str(manntise_stop)), angle: 90deg)
content((cell_size*(total_bits), -0.2), anchor: "south", raw(str(0)), angle: 90deg)
})
]
#bgBlock(fill: colorProgramming)[
#subHeading(fill: colorProgramming)[C]
#table(
columns: (auto, 1fr),
fill: white,
raw("restrict", lang: "c"), [
Funktions Argument modifier
Gibt compiler den hint, das eine Pointer nur in der Funktion verwedent wird. Kann besser optimiert werden
],
raw("volatile", lang: "c"), [
Zwingt Compiler den Funktion/Variable nicht wegzuoptimieren
]
)
]
]

View File

@@ -1,6 +1,10 @@
#import "../lib/common_rewrite.typ" : *
#import "@preview/mannot:0.3.1" #import "@preview/mannot:0.3.1"
#import "@preview/cetz:0.4.2" #import "@preview/cetz:0.4.2"
#import "@preview/zap:0.5.0"
#import "../lib/common_rewrite.typ" : *
#import "../lib/truthtable.typ" : *
#import "../lib/fetModel.typ" : *
#show math.integral: it => math.limits(math.integral) #show math.integral: it => math.limits(math.integral)
#show math.sum: it => math.limits(math.sum) #show math.sum: it => math.limits(math.sum)
@@ -20,11 +24,15 @@
columns: (1fr, 1fr, 1fr), columns: (1fr, 1fr, 1fr),
[#align(left, datetime.today().display("[day].[month].[year]"))], [#align(left, datetime.today().display("[day].[month].[year]"))],
[#align(center, counter(page).display("- 1 -"))], [#align(center, counter(page).display("- 1 -"))],
[Thanks to Daniel for the circuit Symbols],
[#align(right, image("../images/cc0.png", height: 5mm,))] [#align(right, image("../images/cc0.png", height: 5mm,))]
) )
], ],
) )
#let pTypeFill = rgb("#dd5959").lighten(10%);
#let nTypeFill = rgb("#5997dd").lighten(10%);
#place(top+center, scope: "parent", float: true, heading( #place(top+center, scope: "parent", float: true, heading(
[Digitaltechnik] [Digitaltechnik]
)) ))
@@ -173,18 +181,290 @@
*KDNF:* Kanonische DNF\ *KDNF:* Kanonische DNF\
*KKNF:* Kanonische KNF *KKNF:* Kanonische KNF
*DMF:* Disjunktive #underline("Minimal")-Form: \
$ --> LNot(x_0)x_1 + LNot(x_1)$\
*KMF:* Konjunktive #underline("Minimal")-Form: \
$ --> (LNot(x_0) + x_1) dot LNot(x_1)$
$f(underline(x)) -->$ *KKNF* / *KDNF* mit Boolsche Expansion $f(underline(x)) -->$ *KKNF* / *KDNF* mit Boolsche Expansion
] ]
// Dotierung
#bgBlock(fill: colorRealsierung)[
#table(
columns: (auto, 1fr),
[N-Type],
[
- Dotierung: Phosphor (V)
- Negative Ladgunsträger ($e^-$)
- mehr Elektron als Si
],
[P-Type],
[
- Dotierung: Bor (III)
- Postive Landsträger (Löcher)
- mehr Löcher als Si
]
)
#zap.circuit({
import cetz.draw : *
import zap : *
diode("A", (0,1.7), (3,1.7), fill: black, i: (content: $i_d$, anchor: "south"))
rect((0,0),(1,1), fill: pTypeFill, stroke: none)
rect((2,0),(3,1), fill: nTypeFill, stroke: none)
rect((1,0), (1.5,1), fill: color.lighten(pTypeFill, 50%), stroke: none)
rect((1.5,0), (2,1), fill: color.lighten(nTypeFill, 50%), stroke: none)
line((2, 0), (2, 1), stroke: (dash: "dotted"))
line((1, 0), (1, 1), stroke: (dash: "dotted"))
line((1.5, 0), (1.5, 1), stroke: (dash: "densely-dotted"))
cetz.decorations.brace((2,-0.1),(1,-0.1))
content((1.5, -0.6), "RLZ")
content((2.5, 0.5), "N")
content((0.5, 0.5), "P")
content((1.25, 0.5), "-")
content((1.75, 0.5), "+")
})
#grid(
columns: (1fr, 1fr),
column-gutter: 6mm,
align: center,
[#align(center)[*NMOS*]], [#align(center)[*PMOS*]],
grid.cell(inset: 2mm,
align(center,
zap.circuit({
import "../lib/circuit.typ" : *
registerAllCustom();
fet("T", (0,0), type: "N", scale: 150%);
})
)
),
grid.cell(inset: 2mm,
align(center,
zap.circuit({
import "../lib/circuit.typ" : *
registerAllCustom();
fet("T", (0,0), type: "P", scale: 150%);
}),
)
),
scale(
x: 75%, y: 75%,
zap.circuit({
import cetz.draw : *
import zap : *
rect((1.5,0),(4-1.5, 0.1), fill: rgb("#535353"), stroke: none)
rect((0,0),(4,-1), fill: pTypeFill, stroke: none)
rect((0.5,-0),(1.5, -0.5), fill: nTypeFill, stroke: none)
rect((4 - 1.5,-0),(4-0.5, -0.5), fill: nTypeFill, stroke: none)
rect((1.5,-0),(2.5, -0.5), fill: none, stroke: (paint: black, dash: "dotted", thickness: 0.06))
line((3, 0.3), (3, 0))
line((1, 0.3), (1, 0))
line((2, 0.3), (2, 0.1))
cetz.decorations.brace((2.5,-0.6),(1.5,-0.6))
content((2, -1.3), "Channel")
content((3, -0.25), $"n"^+$)
content((1, -0.25), $"n"^+$)
content((0.5, -0.75), "p")
content((3, 0.5), "S")
content((1, 0.5), "D")
content((2, 0.5), "G")
})
),
scale(
x: 75%, y: 75%,
zap.circuit({
import cetz.draw : *
import zap : *
rect((1.5,0),(4-1.5, 0.1), fill: rgb("#535353"), stroke: none)
rect((0,0),(4,-1), fill: nTypeFill, stroke: none)
rect((0.5,-0),(1.5, -0.5), fill: pTypeFill, stroke: none)
rect((4 - 1.5,-0),(4-0.5, -0.5), fill: pTypeFill, stroke: none)
rect((1.5,-0),(2.5, -0.5), fill: none, stroke: (paint: black, dash: "dotted", thickness: 0.06))
line((3, 0.3), (3, 0))
line((1, 0.3), (1, 0))
line((2, 0.3), (2, 0.1))
cetz.decorations.brace((2.5,-0.6),(1.5,-0.6))
content((2, -1.3), "Channel")
content((3, -0.25), $"p"^+$)
content((1, -0.25), $"p"^+$)
content((0.5, -0.75), "n")
content((3, 0.5), "S")
content((1, 0.5), "D")
content((2, 0.5), "G")
})
),
)
*Drain Strom:*
NMOS: $I_"Dn" = cases(
gap: #0.6em,
0 & 0 < U_"GS" < U_t,
beta_n (U_"GS" - U_t - U_"DS" / 2) U_"DS" quad & cases(delim: #none, U_"GS" >= U_t, 0 < U_"DS" < U_"GS" - U_t),
beta_n/2 (U_"GS" - U_"th")^2 & cases(delim: #none, U_"GS" >= U_t, U_"DS" > U_"GS" - U_t)
)$
PMOS: $I_"Dp" = cases(
gap: #0.6em,
0 & 0 > U_"GS" > U_t,
beta_p (U_"GS" - U_t - U_"DS" / 2) U_"DS" quad & cases(delim: #none, U_"GS" <= U_t, 0 > U_"DS" > U_"GS" - U_t),
beta_p/2 (U_"GS" - U_"th")^2 & cases(delim: #none, U_"GS" <= U_t, U_"DS" < U_"GS" - U_t)
)
$
]
// Quine McCluskey
#bgBlock(fill: colorOptimierung)[ #bgBlock(fill: colorOptimierung)[
#subHeading(fill: colorOptimierung)[Quine McCluskey] #subHeading(fill: colorOptimierung)[Quine McCluskey]
] ]
// NMOS/PMOS
#bgBlock(fill: colorRealsierung)[ #bgBlock(fill: colorRealsierung)[
#subHeading(fill: colorRealsierung)[NMOS/PMOS] #subHeading(fill: colorRealsierung)[CMOS]
$hat(=)$ Complemntary MOS
#table(
columns: (1fr, 1fr),
zap.circuit({
import zap : *
import cetz.draw : content
import "../lib/circuit.typ" : *
set-style(wire: (stroke: (thickness: 0.025)))
registerAllCustom();
fet("N0", (0,0), type: "N", angle: 90deg);
fet("P0", (0,1), type: "P", angle: 90deg);
wire("N0.G", (rel: (-0.1, 0)), (horizontal: (), vertical: "P0.G"), "P0.G")
node("outNode", (0,0.5))
node("inNode", (-0.6,0.5))
wire((-1, 0.5), "inNode")
wire((0.2, 0.5), "outNode")
node("N2", (0,-0.5))
node("N2", (0,1.5))
wire((-1, -0.5), (0.5, -0.5))
wire((-1, 1.5), (0.5, 1.5))
content((-1, 0.5), scale($"X"$, 60%), anchor: "east")
content((0.45, 0.5), scale($overline("X")$, 60%), anchor: "east")
content((-0.9, 1.5), scale($"U"_"DD"$, 60%), anchor: "east")
content((-0.9, -0.5), scale($"GND"$, 60%), anchor: "east")
}),
[
*Inverter*
$overline(X)$
],
zap.circuit({
import zap : *
import cetz.draw : content
import "../lib/circuit.typ" : *
set-style(wire: (stroke: (thickness: 0.025)))
registerAllCustom();
fet("P0", (0.5,0.25), type: "P", angle: 90deg);
fet("P1", (0.5,1.25), type: "P", angle: 90deg);
fet("N0", (0,-1), type: "N", angle: 90deg);
fet("N1", (1,-1), type: "N", angle: 90deg);
content((-0.7, 1.75), scale($"V"_"DD"$, 60%), anchor: "east")
content((-0.7, -1.5), scale($"GND"$, 60%), anchor: "east")
content("N0.G", scale($"B"$, 60%), anchor: "east")
content("P0.G", scale($"B"$, 60%), anchor: "east")
content("N1.G", scale($"A"$, 60%), anchor: "east")
content("P1.G", scale($"A"$, 60%), anchor: "east")
wire((-0.75, -1.5), (1.5, -1.5))
wire((-0.75, 1.75), (1.5, 1.75))
wire("N0.S", "N1.S")
node("N2", "P0.D")
wire("N2", (horizontal: (), vertical: "N0.S"))
node("N3", "N0.D")
node("N4", "N1.D")
node("N5", "P1.S")
node("N6", (horizontal: (), vertical: "N0.S"))
wire("N2", (horizontal: (rel: (0.5, 0)), vertical: "N2"))
content((horizontal: (rel: (0.65, 0)), vertical: "N2"), scale($"Y"$, 60%))
}),
[
*NOR*
$overline(A +B) = Y$
],
zap.circuit({
import zap : *
import cetz.draw : content
import "../lib/circuit.typ" : *
set-style(wire: (stroke: (thickness: 0.025)))
registerAllCustom();
content((-0.7, 0.5), scale($"V"_"DD"$, 60%), anchor: "east")
content((-0.7, -2.75), scale($"GND"$, 60%), anchor: "east")
fet("P0", (0, 0), type: "P", angle: 90deg);
fet("P1", (1, 0), type: "P", angle: 90deg);
fet("N0", (0.5,-1.25), type: "N", angle: 90deg);
fet("N1", (0.5,-2.25), type: "N", angle: 90deg);
wire((-0.75, 0.5), (1.5, 0.5))
wire((-0.75, -2.75), (1.5, -2.75))
wire("P0.D", "P1.D")
node("N2", (horizontal: "N1.D", vertical: "P0.D"))
node("N3", "N0.S")
wire("N2", "N3")
wire("N3", (rel: (0.5, 0)))
content((horizontal: (rel: (0.65, 0)), vertical: "N3"), scale($"Z"$, 60%))
node("4", "P0.S")
node("4", "P1.S")
node("4", "N1.D")
content("N0.G", scale($"B"$, 60%), anchor: "east")
content("P0.G", scale($"B"$, 60%), anchor: "east")
content("N1.G", scale($"A"$, 60%), anchor: "east")
content("P1.G", scale($"A"$, 60%), anchor: "east")
}),
[
*NAND*
$overline(A dot B) = Z$
],
)
] ]
// CMOS
#bgBlock(fill: colorRealsierung)[ #bgBlock(fill: colorRealsierung)[
#subHeading(fill: colorRealsierung)[CMOS Verzögerung] #subHeading(fill: colorRealsierung)[CMOS Verzögerung]
@@ -287,10 +567,7 @@
(cycle_start,signal_hight), (cycle_time*(t_setup + 2), signal_hight), (cycle_start,signal_hight), (cycle_time*(t_setup + 2), signal_hight),
(cycle_time*(t_setup + 2) + switch_offset, 0), (cycle_end + switch_offset, 0), stroke: signal_storke (cycle_time*(t_setup + 2) + switch_offset, 0), (cycle_end + switch_offset, 0), stroke: signal_storke
) )
}) })
] ]
@@ -302,4 +579,47 @@
#bgBlock(fill: colorState)[ #bgBlock(fill: colorState)[
#subHeading(fill: colorState)[Zustandsautomaten] #subHeading(fill: colorState)[Zustandsautomaten]
] ]
]
#colbreak()
#bgBlock(fill: colorRealsierung)[
#subHeading(fill: colorRealsierung)[Verlustleistung/Verzögerung]
$t_p ~ C_L / (V_"DD" - V_"Tn")$
$P_"stat" ~ e^(-V_T)$
$P_"dyn"~ V_"DD"^2$
*Dynamisch:* Bei Schlaten \
- Quer/Kurzschluss Strom $i_q$ \
$P_"short" = a_01 f beta_n tau (V_"DD" - 2 V_"Tn")^3$ \
$tau$: Kurzschluss/Schaltzeit
- Lade Strome des $C_L$ $i_c$
$P_"cap" = alpha_01 f C_L V_"DD"^2$
*Statisch:* Konstant
- Leckstom (weil Diode)
- Gatestrom
*Schaltrate*
$alpha_"clk" = 100%$
$alpha_"logic" = 50%$
]
]
#place(bottom,
truth-table(
outputs: (
("NAND", (1, 1, 1, 0)),
("NOR", (1, 0, 0, 0)),
("XNOR", (1, 0, 0, 1)),
("XOR", (0, 1, 1, 0)),
("AND", (0, 0, 0, 1)),
("OR", (0, 1, 1, 1)),
),
inputs: ("A", "B")
),
float: true
)

View File

@@ -1,7 +1,11 @@
#import "@preview/biceps:0.0.1" : * #import "@preview/biceps:0.0.1" : *
#import "@preview/mannot:0.3.1" #import "@preview/mannot:0.3.1"
#import "@preview/fletcher:0.5.8"
#import "@preview/cetz:0.4.2"
#import "../lib/styles.typ" : * #import "../lib/styles.typ" : *
#import "../lib/common_rewrite.typ" : * #import "../lib/common_rewrite.typ" : *
#import "../lib/mathExpressions.typ" : *
#set page( #set page(
paper: "a4", paper: "a4",
@@ -23,8 +27,9 @@
)) ))
#let colorAllgemein = color.hsl(105.13deg, 92.13%, 75.1%) #let colorAllgemein = color.hsl(105.13deg, 92.13%, 75.1%)
#let colorMatrixVerfahren = color.hsl(330.19deg, 100%, 68.43%)
#let colorMatrix = color.hsl(202.05deg, 92.13%, 75.1%) #let colorMatrix = color.hsl(202.05deg, 92.13%, 75.1%)
#let colorReihen = color.hsl(280deg, 92.13%, 75.1%) #let colorVR = color.hsl(280deg, 92.13%, 75.1%)
#let colorAbbildungen = color.hsl(356.92deg, 92.13%, 75.1%) #let colorAbbildungen = color.hsl(356.92deg, 92.13%, 75.1%)
#let colorGruppen = color.hsl(34.87deg, 92.13%, 75.1%) #let colorGruppen = color.hsl(34.87deg, 92.13%, 75.1%)
@@ -35,9 +40,11 @@
} }
#columns(4, gutter: 2mm)[ #columns(4, gutter: 2mm)[
#bgBlock(fill: colorAllgemein)[ #bgBlock(fill: colorAllgemein)[
#subHeading(fill: colorAllgemein)[Notation] #subHeading(fill: colorAllgemein)[Komplexe Zahlen]
#ComplexNumbersSection()
#sinTable
] ]
#bgBlock(fill: colorGruppen)[ #bgBlock(fill: colorGruppen)[
@@ -75,8 +82,6 @@
- $(R, dot)$ Halbgruppe - $(R, dot)$ Halbgruppe
- $(a + b) dot c = (a dot c) + (a dot b) space$ (Distributiv Gesetz) - $(a + b) dot c = (a dot c) + (a dot b) space$ (Distributiv Gesetz)
#colbreak()
*Körper:* Menge $K$ mit: *Körper:* Menge $K$ mit:
- $(K, +), (K without {0} , dot)$ kommutativ Gruppe \ - $(K, +), (K without {0} , dot)$ kommutativ Gruppe \
($0$ ist Neutrales Element von $+$) ($0$ ist Neutrales Element von $+$)
@@ -84,8 +89,8 @@
_Beweiß durch Überprüfung der Eigneschaften_ _Beweiß durch Überprüfung der Eigneschaften_
] ]
#bgBlock(fill: colorReihen)[ #bgBlock(fill: colorVR)[
#subHeading(fill: colorReihen)[Vektorräume (VR)] #subHeading(fill: colorVR)[Vektorräume (VR)]
$(V, plus.o, dot.o)$ ist ein über Körper $K$ $(V, plus.o, dot.o)$ ist ein über Körper $K$
- $+: V times V -> V, (v,w) -> v + w$ - $+: V times V -> V, (v,w) -> v + w$
- $dot: K times V -> V, (lambda,v) -> lambda v$ - $dot: K times V -> V, (lambda,v) -> lambda v$
@@ -102,8 +107,8 @@
- $(U inter W) subset V$ - $(U inter W) subset V$
] ]
#bgBlock(fill: colorReihen)[ #bgBlock(fill: colorVR)[
#subHeading(fill: colorReihen)[Basis und Dim] #subHeading(fill: colorVR)[Basis und Dim]
*Linear Abbildung:* $Phi: V -> V$ *Linear Abbildung:* $Phi: V -> V$
- $Phi(0) = 0$ - $Phi(0) = 0$
- $Phi(lambda v + w) = lambda Phi(v) + Phi(w)$ - $Phi(lambda v + w) = lambda Phi(v) + Phi(w)$
@@ -154,6 +159,7 @@
*Vektorraum-Homomorphismus:* linear Abbildung zwischen VR *Vektorraum-Homomorphismus:* linear Abbildung zwischen VR
] ]
// Spann und Bild, Kern
#bgBlock(fill: colorAbbildungen)[ #bgBlock(fill: colorAbbildungen)[
#subHeading(fill: colorAbbildungen)[Spann und Bild] #subHeading(fill: colorAbbildungen)[Spann und Bild]
*Spann:* *Spann:*
@@ -173,131 +179,252 @@
*Rang* *Rang*
$op("Rang") f := dim op("Bild") f$ $op("Rang") f := dim op("Bild") f$
*Dimensionssatz:* Sei $A$ lineare Abbildung \
$dim(V) = dim(kern(A)) + dim(Bild(A))$ \
$dim(V) = dim(kern(A)) + Rang(A)$ \
$dim(V) = dim(Bild(A)) "oder" dim(kern(A)) = 0 \ <=> A "bijektiv" <=> "invertierbar"$
] ]
#bgBlock(fill: colorAbbildungen)[
#subHeading(fill: colorAbbildungen)[Determinate und Bilinearform]
]
#bgBlock(fill: colorVR)[
#subHeading(fill: colorVR)[Eukldische Vektorräume]
]
#bgBlock(fill: colorVR)[
#subHeading(fill: colorVR)[Unitair Vektorräume ]
]
// Matrix Typem
#bgBlock(fill: colorMatrix)[ #bgBlock(fill: colorMatrix)[
#let colred(x) = text(fill: red, $#x$)
#let colblue(x) = text(fill: blue, $#x$)
#subHeading(fill: colorMatrix)[Matrix Typen] #subHeading(fill: colorMatrix)[Matrix Typen]
#align(center, scale($colred(m "Zeilen") colblue(n "Splate")\ A in KK^(colred(m) times colblue(n))$, 120%)) #grid(columns: (1fr, 1fr),
$quad mat(
a_11, a_12, ..., a_(1n);
a_21, a_22, ..., a_(2n);
dots.v, dots.v, dots.down, dots.v;
a_(m 1), a_(m 2), ..., a_(m n)
)
$,
cetz.canvas({
import cetz.draw : *
*Einheits Matrix* $I,E$ rect((0, 0), (1, 1), fill: rgb("#9292926b"))
*Diagonalmatrix* set-style(mark: (end: (symbol: "straight")))
line((0, -0.2), (1, -0.2), stroke: (paint: blue, thickness: 0.3mm))
line((-0.2, 1), (-0.2, 0), stroke: (paint: red, thickness: 0.3mm))
*Symetrisch* $S$: \ content((-0.45, 0.5), $colred(bold(m))$)
$A A^T$ ist symetrisch content((0.5, -0.35), $colblue(bold(n))$)
content((0.5, 0.5), $A$)
*Orthogonal* $O$: })
)
*Unitair:* #table(
columns: (auto, 1fr),
inset: 2mm,
fill: (x, y) => if (calc.rem(y, 2) == 0) { tableFillLow } else { tableFillHigh },
[*Einheits Matrix*\ $I,E$], [],
[*Diagonalmatrix* \ $Sigma,D$], [
Nur Einträger auf Hauptdiagonalen \
$det(D) = d_00 dot d_11 dot d_22 dot ...$
],
[*Symetrisch*\ $S$], [
$S = S^T$, $S in KK^(n times n)$\
$A A^T$, $A^T A$ ist symetrisch \
$S$ immer diagonaliserbar \
EW immer $in RR$, EV orthogonal
],
[*Invertierbar*], [
$exists A^(-1) : A A^(-1) = A^(-1) A = E$ \
*postiv-semi-definit* \ *Invertierbar wenn:* \
$forall$ Eigenwerte $>= 0$ $A$ bijektiv, $det(A) = 0$ \
$"Spalten Vekoren lin. unabhänig"$ \
$det(A) = 0$ \
*Nicht Invertierbar wenn:*\
$exists$ EW $!= 0 => not "invertierbar"$
Keine Qudratische Matrix
],
[*Orthogonal*\ $O$], [
$O^T = O^(-1)$ \
$ip(O v, O w) = ip(v, w)$
],
[*Unitair*], [
$V^* )$
],
[*Diagonaliserbar*], [
$exists A = B D B^(-1)$, $D$ diagonal,
$B$: Splaten sind EV von $A$
- Selbst-Adujunkte diagonalisierbar
- Symetrisch Matrix
- $A in KK^(n times n) "AND" alg(lambda) = geo(lambda)$
],
[*postiv-semi-definit*], [
$forall$ EW $>= 0$
],
)
] ]
#colbreak() #bgBlock(fill: colorMatrixVerfahren)[
#bgBlock(fill: colorMatrix)[ #subHeading(fill: colorMatrixVerfahren)[Eigenwert und Eigenvektoren ]
#subHeading(fill: colorMatrix)[Eigenwert und Eigenvektoren ]
$A in CC^(n times n):$ $n$ Complexe Eigenwerte \ $A in CC^(n times n):$ $n$ Complexe Eigenwerte \
$A in RR^(n times n)$ $A in RR^(n times n)$
*Eigentwete bestimmen* *1. Eigentwete bestimmen*
$A v = lambda v$ $A v = lambda v => det(A-E lambda) = 0$
Lösen: $0 = det mat(#mannot.markhl($x_11 - lambda_1$, color: red), x_12, ..., x_(1n); $0 = det mat(#mannot.markhl($x_11 - lambda_1$, color: red), x_12, ..., x_(1n);
x_21, #mannot.markhl($x_22 - lambda_2$, color: red), ..., x_(2n); x_21, #mannot.markhl($x_22 - lambda_2$, color: red), ..., x_(2n);
dots.v, dots.v, dots.down, dots.v; dots.v, dots.v, dots.down, dots.v;
x_(n 1), x_(n 2), ..., #mannot.markhl($x_(n n) -lambda_n$, color: red) x_(n 1), x_(n 2), ..., #mannot.markhl($x_(n n) -lambda_n$, color: red)
)$ )$
Charakteristisches Polynom: $chi_(A)$ $--> chi_A = (lambda_0 - lambda)^(n_0) dot (lambda_1 - lambda)^(n_1) ... $
*Eigenvektor bestimmen* $lambda_0, lambda_1, ... = $ Nst von $chi_A$
*2. Eigenvektor bestimmen*
Eigentwerte einsetzen: $lambda in {lambda_1, lambda_2, ... lambda}$ $Eig(lambda_k) = kern(A - lambda_k E)$
$mat(#mannot.markhl($x_11 - lambda_k$, color: red), x_12, ..., x_(1n);
x_21, #mannot.markhl($x_22 - lambda_k$, color: red), ..., x_(2n);
dots.v, dots.v, dots.down, dots.v;
x_(n 1), x_(n 2), ..., #mannot.markhl($x_(n n) -lambda_k$, color: red)
) vec(v_1, v_2, dots.v, v_n) = vec(0, 0, dots.v, 0)$
*Algebrasche Vielfacheit:* \
$sum$ Häufikeit der Nsts von $chi_A$
*Geometrische Vielfacheit:*\ *Algebrasche Vielfacheit:* $alg(lambda) = n_0 + n_1 + ...$ \
$dim(op("spann")(v_lambda_1, v_lambda_2 ..., v_lambda_n))$ \ *Geometrische Vielfacheit:* $geo(lambda) = dim("Eig"_A (lambda))$ \
Anzahl der linearunabhänige $v_lambda_i$ $1 <= geo(lambda) <= alg(lambda)$
$"Geometrische" <= "Algebrasche"$ ]
#bgBlock(fill: colorMatrixVerfahren)[
#subHeading(fill: colorMatrixVerfahren)[Gram-Schmit ONB]
]
#bgBlock(fill: colorMatrixVerfahren)[
#subHeading(fill: colorMatrixVerfahren)[Diagonalisierung]
$A = R D R^(-1)$
*Rezept Diagonalisierung*
1. EW bestimmen: $det(A - lambda I) = 0$ \
$=> chi_A = (lambda_1 - lambda)^(m 1) (lambda_2 - lambda)^(m 2) ...$
2. EV bestimmen: $spann(kern(A - lambda_i I))$: $r_0, r_1, ...$
3. \
#grid(columns: (1fr, 1fr),
[
Diagnoalmatrix: $D$
$mat(
lambda_1, 0, 0,...;
0, lambda_1, 0, ...;
0, 0, lambda_2, ...;
dots.v, dots.v, dots.v, dots.down
)
$
],
[
Basiswechselmatrix: $R$
$mat(
|, | , ..., |;
r_0, r_1, ..., r_n;
|, |, ..., |
)$
]
)
]
#bgBlock(fill: colorMatrixVerfahren)[
#subHeading(fill: colorMatrixVerfahren)[Schur-Zerlegung]
immer anwendbar;
]
#bgBlock(fill: colorMatrixVerfahren)[
#subHeading(fill: colorMatrixVerfahren)[SVD]
$A in RR^(m times n)$ zerlegbar in $A = L S R^T$ \
$L in RR^(m times m)$ Orthogonal \
$S in RR^(m times n)$ Diagonal \
$R in RR^(n times n)$ Orthogonal
1. $A A^T$ berechnen $A A^T in RR^(m times m)$
2. $A A^T$ diagonalisieren in $R$, $D$
3. Singulärwere berechen: $sigma_i = sqrt(lambda_i) $
4. $l_i = 1/sigma_i A v_(lambda i) quad quad L = mat( |, |, ..., |; l_0, l_1, ..., l_m; |, |, ..., |)$ \
(Evt. zu ONB ergenze mit Gram-Schmit/Kreuzprodukt)
5. $S in RR^(n times m)$ (wie $A$): \
$S = mat(sigma_0, 0; 0, sigma_1; dots.v, dots.v; 0, 0) quad quad quad S = mat(sigma_0, 0, dots, 0; 0, sigma_1, ..., 0)$
]
#bgBlock(fill: colorMatrix)[
#subHeading(fill: colorMatrix)[Matrix Normen]
$|| dot ||_M$ Matrix Norm, $|| dot ||_V$ Vektornorm
Generisch Vektor Norm: $|| v ||_p = root(p, sum_(k=1)^n (x_k)^p)$
- submultiplikativ: $||A B||_"M" <= ||A||||B||$
- verträglich mit einer Vektornorm: $||A v||_"V" <= ||A||_"M" ||v||_"V"$
*Frobenius-Norm* $||A||_"M" = sqrt(sum_(i=1)^m sum_(j=1)^n a_(m n)^2)$
*Induzierte Norm* $||A||_"M" = sup_(v in V without {0}) (||A v||_V)/(||v||_V)$\
$ = sup_(||v|| = 1) (||A v||_V)/(||v||_V)$
- submultiplikativ
- verträglich mit einer Vektornorm $||dot||_V$
*maximale Spaltensumme* $||A||_r = max_(1<= i <= n) sum_(j=1)^n |a_(j)|$
]
#bgBlock(fill: colorMatrix)[
#subHeading(fill: colorMatrix)[Rekursive Folgen]
E.g: $a_1 x_(n-1) + a_2 x_(n) = x_(n+1)$
1. Als Matrix Schreiben $F: vec(x_(n-1), x_(n)) = vec(x_n, x_(n+1))$ \
$F s_(n-1) = s_(n)$
2. Diagonaliseren: $F = R D R^(-1) $ \
3. Wiederholte Anwendung: $F^n = R D^n R^(-1)$
] ]
#bgBlock(fill: colorMatrix)[ #bgBlock(fill: colorMatrix)[
#subHeading(fill: colorMatrix)[Diagonalisierung] #subHeading(fill: colorMatrix)[Differenzialgleichungen]
$A = R D R^T$
$D$: Diagonalmatrix
] ]
#bgBlock(fill: colorMatrix)[
#subHeading(fill: colorMatrix)[Schur-Zerlegung]
immer anwendbar;
$A in RR^(n times n)\/CC^(n times n)$ zerlegbar in $O^T R O$
Orthogonal $O,O^T$, Dreiecksmatrix $R$
$R = mat(lambda_1, *, *,..., *;
0, lambda_2, *, ..., *;
0, 0, lambda_3, ..., *;
dots.v, dots.v, dots.v, dots.down, dots.v;
0, 0, 0, ..., lambda_n;
)$
1. Eigenwerte bestimmen $lambda_1, lambda_2, ... lambda_n$
2. Eigenvektor $v_lambda_1, v_lambda_2 ..., v_lambda_n$
3.
]
#colbreak()
#bgBlock(fill: colorMatrix)[
#subHeading(fill: colorMatrix)[SVD]
$A in RR^(n times m)$ zerlegbar in $A = L S R^T$ \
$L$ Orthogonal, $S$ Diagonalmatrix, $R$ Orthogonal \
$A^T = R S^T L^T$
*1. $A A^T$ berechnen* $A A^T in RR^(n times n) $
*2. Eigenwerte von $A A^T$ bestimmen* $lambda_1, lambda_2, ... lambda_n$
*3. $S$ aufstellen* ($S$ hat gleiche Form wie $A$)
$sigma_i = sqrt(lambda_i) = S in RR^(n x m) =\ mat(
sigma_1, 0, 0, ..., 0, 0, ..., 0;
0, sigma_2, 0, ..., 0, 0, ..., 0;
0, 0, sigma_3, ..., 0, 0, ..., 0;
dots.v, dots.v, dots.v, dots.down, dots.v, dots.v, dots.down, dots.v;
0, 0, 0, ..., sigma_m, 0, ... , 0
)$
*4. $R$ bestimmen*
$op("Eig")(lambda_i) = op("kern")(A A^T - lambda_i) ->$
$A A^T - lambda_i = 0$ (Gaußverfahren)
$R = 1/sqrt(lambda_i)$
*5. $L$ bestimmen*
$L = 1/sqrt(lambda_i) $
]
] ]

File diff suppressed because it is too large Load Diff

View File

@@ -3,16 +3,6 @@
#import zap: interface #import zap: interface
#let registerAllCustom() = { #let registerAllCustom() = {
cetz.draw.set-ctx(ctx => {
ctx.zap.style.insert("einTor", (
scale: auto,
fill: auto,
height: 3mm,
width: 6mm,
))
ctx
})
cetz.draw.set-ctx(ctx => { cetz.draw.set-ctx(ctx => {
ctx.zap.style.insert("zweiTor", ( ctx.zap.style.insert("zweiTor", (
scale: auto, scale: auto,
@@ -20,8 +10,39 @@
height: 10mm, height: 10mm,
width: 10mm, width: 10mm,
)) ))
ctx.zap.style.insert("einTor", (
scale: auto,
fill: none,
height: 3mm,
width: 6mm,
))
ctx.zap.style.insert("fet", (
scale: auto,
fill: none,
height: 5mm,
width: 10mm,
))
for it in ("lnot", "land", "lnand", "lor", "lnor", "lxor", "lxnor") {
ctx.zap.style.insert(it, (
width: 0.7,
min-height: 0.9,
spacing: 0.4,
padding: 0.25,
fill: white,
stroke: auto,
)
)
}
ctx ctx
}) })
} }
#let einTor(name, node, flip: false, ..params) = { #let einTor(name, node, flip: false, ..params) = {
@@ -83,4 +104,53 @@
// Component call // Component call
component("zweiTor", name, node, draw: draw, ..params) component("zweiTor", name, node, draw: draw, ..params)
}
#let fet(name, node, type: "N", scale: 1, angle: 0, thickness: 0.5pt, ..params) = {
import cetz.draw: line, circle, anchor, rotate
import zap: component
// Drawing function
let draw(ctx, position, style) = {
let zap-style = ctx.zap.style
let height = style.height * scale;
let width = style.width * scale;
let wireThink = ctx.zap.style.wire.stroke.thickness;
rotate(angle);
if(type == "N") {
line((0, height), (0, height*(1-0.45)), stroke: (thickness: wireThink))
} else {
line((0, height), (0, height*(1-0.2)), stroke: (thickness: wireThink))
circle((0, height*(1-0.3) - thickness/2), radius: (height/2)*0.2, stroke: (thickness: wireThink))
}
line(
(width/2, 0),
(width*0.4/2, 0),
(width*0.4/2, 0),
(width*0.4/2, height*(1-0.6)),
(-width*0.4/2, height*(1-0.6)),
(-width*0.4/2, 0),
(-width/2, 0), stroke: (thickness: wireThink)
)
line(
(width*0.42/2, height*(1-0.45)),
(-width*0.42/2, height*(1-0.45)),
stroke: (thickness: wireThink)
)
anchor("G", (0, height))
anchor("D", (-width/2, 0))
anchor("S", (width/2, 0))
interface((-width / 2, -height / 2), (width / 2, height / 2), io: true)
}
// Component call
component("fet", name, node, draw: draw, ..params)
} }

View File

@@ -1,4 +1,4 @@
#let bgBlock(body, fill: color, width: 100%) = block(body, fill:fill.lighten(80%), width: width, inset: (bottom: 2mm)) #let bgBlock(body, fill: color, width: 100%) = block(body, fill:fill.lighten(80%), width: width, inset: (bottom: 2mm, left: 2mm, right: 2mm,))
#let SeperatorLine = line(length: 100%, stroke: (paint: black, thickness: 0.3mm)) #let SeperatorLine = line(length: 100%, stroke: (paint: black, thickness: 0.3mm))
#let MathAlignLeft(e) = { #let MathAlignLeft(e) = {
@@ -6,7 +6,7 @@
} }
#let subHeading(body, fill: color) = { #let subHeading(body, fill: color) = {
box( move(dx: -2mm, dy: 0mm, box(
align( align(
top+center, top+center,
text( text(
@@ -17,16 +17,19 @@
) )
), ),
fill: fill, fill: fill,
width: 100%, width: 100% + 4mm,
inset: 1mm, inset: 1mm,
height: auto height: auto
) ))
} }
#let MathAlignLeft(e) = { #let MathAlignLeft(e) = {
align(left, block(e)) align(left, block(e))
} }
#let tableFillHigh = white
#let tableFillLow = color.lighten(gray, 50%)
#let sinTable = [ #let sinTable = [
#let data = json("../sintable.json") #let data = json("../sintable.json")
#table( #table(
@@ -34,10 +37,11 @@
rows: data.keys().len(), rows: data.keys().len(),
stroke: none, stroke: none,
table.hline(stroke: (thickness: 0.3mm)), table.hline(stroke: (thickness: 0.3mm)),
fill: (x, y) => if (calc.rem(y, 2) == 0) { color.lighten(gray, 50%) } else { white }, fill: (x, y) => if (calc.rem(y, 2) == 0) { tableFillLow } else { tableFillHigh },
..for (label) in data.keys() { table.vline(),
([*#eval(label, mode: "math")*], ) ..for (i, label) in data.keys().enumerate() {
([*#eval(label, mode: "math")*], if i > 0 { table.vline() } else { table.vline(stroke: none) })
}, },
table.hline(stroke: (thickness: 0.3mm)), table.hline(stroke: (thickness: 0.3mm)),
@@ -46,6 +50,24 @@
for (col) in data.keys() { for (col) in data.keys() {
(eval(data.at(col).at(i), mode: "math"),) (eval(data.at(col).at(i), mode: "math"),)
} }
} },
table.hline(stroke: (thickness: 0.3mm)),
) )
]
#let ComplexNumbersSection(i: $i$) = [
$1/#i = #i^(-1) = -#i quad quad #i^2=-1 quad quad sqrt(#i) = 1/sqrt(2) + 1/sqrt(2)#i$
$z in CC = a + b #i quad quad quad z = r dot e^(#i phi)$ \
$z_0 + z_1 = (a_0 + a_1) + (b_0 + b_1) #i$\
$z_0 dot z_1 = (a_1 a_2 - b_1 b_2) + #i (a_1b_2 + a_2 b_1) = r_0 r_1 e^(#i (phi_0 + phi_1))$\
$z^x = r^x dot e^(phi #i dot x) quad x in RR$ \
$z_0/z_1 = r_0/r_1 e^(#i (phi_0 - phi_1)) quad quad quad$
$z^* = a - #i b = r e^(-#i phi)$
$r = abs(z) quad phi = cases(
+ arccos(a/r) space : space a >= 0,
- arccos(a/r) space : space a < 0,
)$
] ]

290
src/lib/fetModel.typ Normal file
View File

@@ -0,0 +1,290 @@
#import "@preview/zap:0.5.0"
#import "@preview/cetz-plot:0.1.3"
#set page(width: auto, height: auto)
#let FetModelSubstrate = zap.circuit({
import zap: *
import cetz.draw: *
rect(
(0, 0),
(12, 4),
fill: rgb("#ffb1b1"),
name: "p",
)
rect((0, -0.05), (12, -0.05), stroke: 3pt, name: "substrate")
earth("g1", (11.5, 0))
content("substrate", [Bulk], anchor: "north", padding: 0.2)
})
#let FetModel1 = zap.circuit({
import zap: *
import cetz.draw: *
rect(
(0, 0),
(12, 4),
fill: rgb("#ffb1b1"),
name: "p",
)
rect((0, -0.05), (12, -0.05), stroke: 3pt, name: "substrate")
earth("g1", (11.5, 0))
rect((2.75, 3), (5.25, 4), fill: rgb("#61ff9f"), name: "kanal1", radius: (
south: 0.2,
))
rect((6.75, 3), (9.25, 4), fill: rgb("#61ff9f"), name: "kanal2", radius: (
south: 0.2,
))
content("kanal1", [n+], anchor: "center", padding: 0.2)
content("kanal2", [n+], anchor: "center", padding: 0.2)
content("substrate", [Bulk], anchor: "north", padding: 0.2)
})
#let FetModel2 = zap.circuit({
import zap: *
import cetz.draw: *
rect(
(0, 0),
(12, 4),
fill: rgb("#ffb1b1"),
name: "p",
)
rect((0, -0.05), (12, -0.05), stroke: 3pt, name: "substrate")
earth("g1", (11.5, 0))
rect((2.75, 3), (5.25, 4), fill: rgb("#61ff9f"), name: "kanal1", radius: (
south: 0.2,
))
rect((6.75, 3), (9.25, 4), fill: rgb("#61ff9f"), name: "kanal2", radius: (
south: 0.2,
))
content("kanal1", [n+], anchor: "center", padding: 0.2)
content("kanal2", [n+], anchor: "center", padding: 0.2)
content("substrate", [Bulk], anchor: "north", padding: 0.2)
rect((0, 4), (12, 4.5), fill: rgb("#fffc61"), name: "isolator")
content("isolator.west", [Isolator ($"SiO"_2$)], anchor: "west", padding: .2)
})
#let FetModel3 = zap.circuit({
import zap: *
import cetz.draw: *
rect(
(0, 0),
(12, 4),
fill: rgb("#ffb1b1"),
name: "p",
)
rect((0, -0.05), (12, -0.05), stroke: 3pt, name: "substrate")
earth("g1", (11.5, 0))
rect((2.75, 3), (5.25, 4), fill: rgb("#61ff9f"), name: "kanal1", radius: (
south: 0.2,
))
rect((6.75, 3), (9.25, 4), fill: rgb("#61ff9f"), name: "kanal2", radius: (
south: 0.2,
))
content("kanal1", [n+], anchor: "center", padding: 0.2)
content("kanal2", [n+], anchor: "center", padding: 0.2)
content("substrate", [Bulk], anchor: "north", padding: 0.2)
rect((0, 4), (3, 4.5), fill: rgb("#fffc61"), name: "isolator2")
rect((5, 4), (7, 4.5), fill: rgb("#fffc61"))
rect((9, 4), (12, 4.5), fill: rgb("#fffc61"), name: "isolator")
rect((3, 4), (5, 4.25), fill: gray)
rect((7, 4), (9, 4.25), fill: gray)
rect((5.1, 4.5), (6.9, 4.75), fill: gray)
content("isolator", [$"SiO"_2$])
content("isolator2", [Isolator])
})
#let FetModel(type: "N", s: 100%) = zap.circuit({
import zap: *
import cetz.draw: rect, content
cetz.draw.scale(s)
let pTypeFill = rgb("#ffb1b1");
let pTypeFill = rgb("#ffb1b1");
let nTypeFill = rgb("#61ff9f")
rect(
(0, 0),
(12, 4),
fill: if(type == "N") { pTypeFill } else { nTypeFill },
name: "p",
)
rect((0, -0.05), (12, -0.05), stroke: 3pt, name: "substrate")
earth("g1", (11.5, 0))
wire((13, 5.5), (13, 0), mark: (end: ">"))
node("n-r1", (13, 5.75))
wire((6, 4.5), (6, 5.75))
node("n-g1", (6, 5.75))
wire("n-g1", "n-r1")
node("n-s1", (4, 5))
wire("n-s1", (4, 4.25))
node("n-d1", (8, 5))
wire("n-d1", (8, 4.25))
rect((0, 4), (3, 4.5), fill: rgb("#fffc61"), name: "isolator2")
rect((5, 4), (7, 4.5), fill: rgb("#fffc61"))
rect((9, 4), (12, 4.5), fill: rgb("#fffc61"), name: "isolator")
rect((3, 4), (5, 4.25), fill: gray)
rect((7, 4), (9, 4.25), fill: gray)
rect((5.1, 4.5), (6.9, 4.75), fill: gray)
content("n-g1", [*G*\ate], anchor: "south", padding: 0.2, auto-scale: true)
content("n-s1", [*S*\ource], anchor: "south", padding: 0.2)
content("n-d1", [*D*\rain], anchor: "south", padding: 0.2, auto-scale: true)
content("substrate", [Bulk], anchor: "north", padding: 0.2, auto-scale: true)
content("p", if type == "N" [p] else [n], auto-scale: true)
content("isolator", [$"SiO"_2$], auto-scale: true)
content("isolator2", [Isolator], auto-scale: true)
rect((2.75, 3), (5.25, 4), fill: if(type == "N") { nTypeFill } else { pTypeFill }, name: "kanal1", radius: (
south: 0.2,
))
rect((6.75, 3), (9.25, 4), fill: if(type == "N") { nTypeFill } else { pTypeFill }, name: "kanal2", radius: (
south: 0.2,
))
content("kanal1", if type == "N" [n+] else [p+], anchor: "center", padding: 0.2, auto-scale: true)
content("kanal2", if type == "N" [n+] else [p+], anchor: "center", padding: 0.2, auto-scale: true)
})
#let FetModelConducting = zap.circuit({
import zap: *
import cetz.draw: *
rect(
(0, 0),
(12, 4),
fill: rgb("#ffb1b1"),
name: "p",
)
rect((0, -0.05), (12, -0.05), stroke: 3pt, name: "substrate")
earth("g1", (11.5, 0))
wire((13, 5.5), (13, 0), mark: (end: ">"))
node("n-r1", (13, 5.75))
wire((6, 4.5), (6, 5.75))
node("n-g1", (6, 5.75))
wire("n-g1", "n-r1")
node("n-s1", (4, 5))
wire("n-s1", (4, 4.25))
node("n-d1", (8, 5))
wire("n-d1", (8, 4.25))
rect((0, 4), (3, 4.5), fill: rgb("#fffc61"), name: "isolator2")
rect((5, 4), (7, 4.5), fill: rgb("#fffc61"))
rect((9, 4), (12, 4.5), fill: rgb("#fffc61"), name: "isolator")
rect((3, 4), (5, 4.25), fill: gray)
rect((7, 4), (9, 4.25), fill: gray)
rect((5.1, 4.5), (6.9, 4.75), fill: gray)
content("n-g1", [*G*\ate], anchor: "south", padding: 0.2)
content("n-s1", [*S*\ource], anchor: "south", padding: 0.2)
content("n-d1", [*D*\rain], anchor: "south", padding: 0.2)
content("substrate", [Bulk], anchor: "north", padding: 0.2)
content("p", [p])
content("isolator", [$"SiO"_2$])
content("isolator2", [Isolator])
rect((2.75, 3), (5.25, 4), fill: rgb("#61ff9f"), name: "kanal1", radius: (
south: 0.2,
))
rect((6.75, 3), (9.25, 4), fill: rgb("#61ff9f"), name: "kanal2", radius: (
south: 0.2,
))
rect((5.20, 3.99), (6.8, 3.9), fill: rgb("#61ff9f"), stroke: none)
content("kanal1", [n+], anchor: "center", padding: 0.2)
content("kanal2", [n+], anchor: "center", padding: 0.2)
rect((0.5, -1), (1, -0.70), fill: gray, stroke: none, name: "metal")
content("metal", [metal], anchor: "west", padding: 0.3)
rect((0.5, -1.2), (1, -1.5), fill: rgb("#61ff9f"), stroke: none, name: "n")
content("n", [n+], anchor: "west", padding: 0.3)
rect(
(2.5, -1),
(3, -0.7),
fill: rgb("#ffb1b1"),
stroke: none,
name: "p-substrate",
)
content("p-substrate", [p], anchor: "west", padding: 0.3)
rect((2.5, -1.2), (3, -1.5), fill: rgb("#fffc61"), stroke: none, name: "siO2")
content("siO2", [oxide], anchor: "west", padding: 0.3)
})
#let FetPlot() = {
let u_gs = 1
let beta = 1
cetz.canvas({
import cetz-plot: plot
import cetz: draw.content
cetz.draw.set-style(axes: (
shared-zero: false,
overshoot: 0.2,
x: (mark: (end: ">", fill: black, scale: 0.6)),
y: (mark: (end: ">", fill: black, scale: 0.6)),
))
plot.plot(
size: (2, 2),
name: "plot",
axis-style: "school-book",
x-min: 0,
x-tick-step: none,
y-tick-step: none,
x-label: $U_"GS"$,
y-label: $U_"DS"$,
{
plot.add-fill-between(domain: (1, 6), ((1, 0), (1, 5)), u_gs => u_gs - u_t)
plot.add(domain: (0, 5), fill: true, axes: ("y", "x"), _ => 1)
plot.add(domain: (1, 6), fill: true, u_gs => u_gs - u_t)
plot.add-anchor("I", (0.5, 2.5))
plot.add-anchor("II", (4.5, 1.5))
plot.add-anchor("III", (2.5, 3.5))
plot.add-anchor("ut", (u_t, 0))
}
)
content("plot.ut", $U_t$, anchor: "north", padding: 0.1)
content("plot.I", [I])
content("plot.II", [II])
content("plot.III", [III])
})
}

62
src/lib/logic.typ Normal file
View File

@@ -0,0 +1,62 @@
#import "@preview/zap:0.5.0": *
#import "@preview/cetz:0.4.2": (
draw.anchor, draw.arc-through, draw.circle, draw.content, draw.line, draw.rect, draw.rotate, draw.get-ctx, draw.bezier
)
#let logic(name, node, text: $"&"$, invert: false, mirror: false, invert-inputs: (), angle: 0deg, inputs: 2, ..params) = {
assert(inputs >= 1, message: "logic supports minimum one inputs")
let style = (
width: 0.7,
min-height: 0.9,
spacing: 0.4,
padding: 0.25,
fill: white,
stroke: auto,
)
// Drawing function
let draw(ctx, position, _) = {
rotate(angle)
let height = calc.max(style.min-height, (inputs - 1) * style.spacing + 2 * style.padding)
let width = style.width * if mirror { -1 } else { 1 }
interface((-width / 2, -height / 2), (width / 2, height / 2), io: false)
rect((-width / 2, -height / 2), (rel: (width, height)), fill: style.fill, stroke: style.stroke)
content((0, height / 2 - style.padding / 2), text, anchor: "north", angle: angle)
let ball-radius = calc.min(height, width) * 0.1
for input in range(1, inputs + 1) {
let pad = (height - (inputs - 1) * style.spacing) / 2
let y = height / 2 - pad - (input - 1) * style.spacing;
if input in invert-inputs {
circle((-width / 2 - ball-radius, y), radius: ball-radius, stroke: style.stroke, fill: style.fill)
anchor("in" + str(input), (-width / 2, y))
} else {
anchor("in" + str(input), (-width / 2, y))
}
}
if invert {
circle((width / 2 + ball-radius, 0), radius: ball-radius, stroke: style.stroke, fill: style.fill)
anchor("out", (width / 2, 0))
} else {
anchor("out", (width / 2, 0))
}
}
// Component call
component("logic", name, node, draw: draw, ..params)
}
#let lnot(name, node, ..params) = logic(name, node, ..params, text: $1$, invert: true)
#let land(name, node, ..params) = logic(name, node, ..params, text: $"&"$)
#let lnand(name, node, ..params) = logic(name, node, ..params, text: $"&"$, invert: true)
#let lor(name, node, ..params) = logic(name, node, ..params, text: $>=1$)
#let lnor(name, node, ..params) = logic(name, node, ..params, text: $>=1$, invert: true)
#let lxor(name, node, ..params) = logic(name, node, ..params, text: $=1$)
#let lxnor(name, node, ..params) = logic(name, node, ..params, text: $=1$, invert: true)

View File

@@ -0,0 +1,13 @@
// Math macors
#let kern(x) = $op("kern")(#x)$
#let alg(x) = $op("alg")(#x)$
#let geo(x) = $op("geo")(#x)$
#let spann(x) = $op("spann")(#x)$
#let Bild(x) = $op("Bild")(#x)$
#let Rang(x) = $op("Rang")(#x)$
#let Eig(x) = $op("Eig")(#x)$
#let lim = $limits("lim")$
#let ip(x, y) = $lr(angle.l #x, #y angle.r)$
#show math.integral: it => math.limits(math.integral)
#show math.sum: it => math.limits(math.sum)

80
src/lib/table.typ Normal file
View File

@@ -0,0 +1,80 @@
#import "@preview/zap:0.5.0"
#import "logic.typ"
#let circuit(body) = zap.circuit({
import zap: *
set-style(
node: (
radius: 0.04,
)
)
body
})
#table(
columns: (1fr, 1fr),
align: center + horizon,
stroke: (x, y) => (
left: if x > 0 { 0.5pt },
top: if y == 1 { 1pt } else if y > 0 { 0.5pt },
),
table.header([DNF], [KNF]),
circuit({
import zap: *
logic.land("A1", (0, 0.75), invert-inputs: (1,))
logic.land("A2", (0, -0.75), invert-inputs: (2,))
logic.lor("O1", (1.25, 0))
zwire("A1.out", "O1.in1", ratio: 50%)
zwire("A2.out", "O1.in2", ratio: 50%)
wire((-1, 1.25), (-1, -1.25), name: "A")
wire((-0.75, 1.25), (-0.75, -1.25), name: "B")
cetz.draw.content("A.in", [a], anchor: "south", padding: 2pt)
cetz.draw.content("B.in", [b], anchor: "south", padding: 2pt)
node("N4", ("A1.in1", "-|", "A.in"))
wire("A1.in1", "N4")
node("N3", ("A1.in2", "-|", "B.in"))
wire("A1.in2", "N3")
node("N2", ("A2.in1", "-|", "A.in"))
wire("A2.in1", "N2")
node("N1", ("A2.in2", "-|", "B.in"))
wire("A2.in2", "N1")
wire("O1.out", (rel: (0.3, 0)))
}),
circuit({
import zap: *
logic.lor("A1", (0, 0.75))
logic.lor("A2", (0, -0.75), invert-inputs: (1,2))
logic.land("O1", (1.25, 0))
zwire("A1.out", "O1.in1", ratio: 50%)
zwire("A2.out", "O1.in2", ratio: 50%)
wire((-1, 1.25), (-1, -1.25), name: "A")
wire((-0.75, 1.25), (-0.75, -1.25), name: "B")
cetz.draw.content("A.in", [a], anchor: "south", padding: 2pt)
cetz.draw.content("B.in", [b], anchor: "south", padding: 2pt)
node("N4", ("A1.in1", "-|", "A.in"))
wire("A1.in1", "N4")
node("N3", ("A1.in2", "-|", "B.in"))
wire("A1.in2", "N3")
node("N2", ("A2.in1", "-|", "A.in"))
wire("A2.in1", "N2")
node("N1", ("A2.in2", "-|", "B.in"))
wire("A2.in2", "N1")
wire("O1.out", (rel: (0.3, 0)))
})
)

35
src/lib/truthtable.typ Normal file
View File

@@ -0,0 +1,35 @@
#let truth-table(outputs: (), inputs: none) = {
let variables = calc.max(..outputs.map(output => calc.ceil(calc.log(output.at(1).len()) / calc.log(2))))
if inputs == none {
inputs = ($a$, $b$, $c$, $d$).slice(0, variables)
}
assert(outputs.len() >= 1, message: "There has to be at least one output")
assert(inputs.len() == variables, message: "There aren't enough variables to label")
let num-to-bin(x, digits) = {
let bits = ()
while x != 0 {
bits.push(calc.rem(x, 2))
x = calc.floor(x / 2)
}
range(digits).map(x => bits.at(digits - x - 1, default: 0))
}
table(
columns: (auto,) * (variables + outputs.len()),
stroke: (x, y) => (
left: if x == variables { 1pt } else if x > 0 { 0.5pt },
top: if y == 1 { 1pt } else if y > 0 { 0.5pt },
),
inset: 4pt,
if inputs != none { table.header(..inputs.map(x => [#x]), ..outputs.map(((x, _)) => [#x])) },
..range(calc.pow(2, variables))
.map(x => (..num-to-bin(x, variables).map(y => [#y]), ..outputs.map(((_, y)) => [#y.at(x, default: [])])))
.flatten()
)
}