chore: change img paths
This commit is contained in:
parent
3726285fa5
commit
2b1ea69c02
97 changed files with 206 additions and 198 deletions
8
scripts/convert_link_format.sh
Executable file
8
scripts/convert_link_format.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
find /home/thomas/repos/eolas/zk/ -type f -name "*.md" | while
|
||||
read file; do
|
||||
sed -r 's/\[([^\]]+)\]\(\/[^)]+\)/[[\1]]/g'
|
||||
done
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ router.get("/", (req, res) => {
|
|||
|
||||
Our server is now set up:
|
||||
|
||||

|
||||

|
||||
|
||||
> When creating our API this structure of creating handlers for specific routes
|
||||
> will be iterated. Every endpoint will be specified with
|
||||
|
|
|
@ -13,7 +13,7 @@ client. In response to a client request you can then call a
|
|||
[lambda function](/DevOps/AWS/AWS_Lambda/Lambda_handler_function.md) that
|
||||
executes a backend process.
|
||||
|
||||

|
||||

|
||||
|
||||
See
|
||||
[using API Gateway as Lambda trigger](/DevOps/AWS/AWS_Lambda/Practical_walkthrough_Lambda_creation_within_AWS.md)
|
||||
|
|
|
@ -47,4 +47,4 @@ have the Mongo document outputted to the console:
|
|||
|
||||
This will also be reflected in Compass:
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
tags: [algorithms]
|
||||
---
|
||||
|
||||

|
||||

|
||||
_Summary of the main classes of algorithmic complexity_
|
||||
|
||||
## Distinguish algorithms from programs
|
||||
|
@ -117,7 +117,7 @@ following data set:
|
|||
| 5 | 5 |
|
||||
|
||||
If we plotted this as a graph it is clear that this is equivalent to a linear
|
||||
distribution:
|
||||
distribution:
|
||||
|
||||
Algorithms which display this distribution are therefore called **linear
|
||||
algorithms**.
|
||||
|
@ -240,7 +240,7 @@ factor of it. Therefore the runtime is not growing proportional to the size of
|
|||
the input, it is growing proportional to the size of the input squared.
|
||||
|
||||
Graphically this is represented with a curving lines as follows:
|
||||

|
||||

|
||||
|
||||
We can clearly see that as n grows, the runtime gets steeper and more
|
||||
pronounced,
|
||||
|
@ -289,7 +289,7 @@ Back to algorithms: $O(\log n)$ is a really good complexity to have. It is close
|
|||
to O(1) and in between O(1) and O(n). Represented graphically, it starts of with
|
||||
a slight increase in runtime but then quickly levels off:
|
||||
|
||||

|
||||

|
||||
|
||||
Many sorting algorithms run in log n time, as does recursion.
|
||||
|
||||
|
@ -354,7 +354,7 @@ we should keep in mind the following shorthands:
|
|||
|
||||
With this in mind we can break down the `findSum` function like so:
|
||||
|
||||

|
||||

|
||||
|
||||
This gives us:
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ tags: [analogue]
|
|||
Analogue and digital are paradigms for recording information, specifically
|
||||
information about an object or state that obtains in the world.
|
||||
|
||||

|
||||

|
||||
|
||||
## Analogue
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ When we access the local URL we are able to access the Apollo server using the
|
|||
Explorer GUI. This automatically loads our schema and is basically a more fancy
|
||||
version of GraphiQL:
|
||||
|
||||

|
||||

|
||||
|
||||
It makes it easy to read descriptions of the dataypes and to construct queries
|
||||
by clicking to insert fields.
|
||||
|
|
|
@ -91,7 +91,7 @@ awk '/Joe/ {print}' list.txt
|
|||
|
||||
### Lines, records, fields
|
||||
|
||||

|
||||

|
||||
|
||||
When `awk` receives a file it divides the lines into **records**.
|
||||
|
||||
|
|
|
@ -10,4 +10,4 @@ Give that the biconditional means that if $P$ is the case, $Q$ must be the case
|
|||
and if $Q$ is the case, $P$ must be the case, if we have $P \leftrightarrow Q$
|
||||
and $P$, we can derive $Q$ and vice versa.
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -11,4 +11,4 @@ the case, $P$ must be the case. Thus to introduce this operator we must
|
|||
demonstrate both that $Q$ follows from $P$ and that $P$ follows from $Q$. We do
|
||||
this via two sub-proofs.
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -25,7 +25,7 @@ In decimal, 0 is equal to black (zero light intensity) and 255 is equal to white
|
|||
(full light intensity). Some examples of this (including binary and hex
|
||||
representations are below):
|
||||
|
||||

|
||||

|
||||
|
||||
### Colour encoding
|
||||
|
||||
|
@ -42,13 +42,13 @@ Some examples below
|
|||
Red is represented in RGB with all 8 red bits to set to 1 and the remaining 16
|
||||
bits for the other two colours set to 0.
|
||||
|
||||

|
||||

|
||||
|
||||
#### Yellow
|
||||
|
||||
Yellow is represented in RGB with both red and blue set to 1 and the remaining 8
|
||||
green bits set to ):
|
||||
|
||||

|
||||

|
||||
|
||||
## Binary encoding of images
|
||||
|
|
|
@ -101,11 +101,11 @@ equal to: **1 in the two column and 1 in the 4 column → 110**
|
|||
|
||||
More clearly:
|
||||
|
||||

|
||||

|
||||
|
||||
And for comparison:
|
||||
|
||||

|
||||

|
||||
|
||||
Or we can express the binary as:
|
||||
|
||||
|
@ -119,4 +119,4 @@ $$ 2^1 + 2^2 $$
|
|||
|
||||
Let's convert 23 into binary:
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -63,7 +63,7 @@ create your boot process so the two are clearly distinguishable.
|
|||
|
||||
The de facto standard boot loader for Linux is GRUB: Grand Unified Boot Loader.
|
||||
|
||||

|
||||

|
||||
|
||||
You see the GRUB default menu when you first start a Linux machine. It will
|
||||
offer you various options for loading your installed OS or other OSs. GRUB is a
|
||||
|
|
|
@ -43,8 +43,8 @@ link is used to transfer the data from an end to another. On other hand Parallel
|
|||
Transmission is the transmission in which multiple parallel links are used that
|
||||
transmit each bit of data simultaneously.
|
||||
|
||||
<img src="../_img/serial-transmission.jpg" width="800px"/>
|
||||
<img src="../_img/parallel-transmission.jpg" width="800px"/>
|
||||
<img src="../img/serial-transmission.jpg" width="800px"/>
|
||||
<img src="../img/parallel-transmission.jpg" width="800px"/>
|
||||
|
||||
- Serial buses are cheaper to implement than parallel buses
|
||||
- Serial buses operate at greater
|
||||
|
|
|
@ -19,7 +19,7 @@ The CPU comprises three core components:
|
|||
- the Arithmetic Logic Unit (ALU)
|
||||
- the Control Unit (CU)
|
||||
|
||||

|
||||

|
||||
|
||||
> This method of putting together a computer is known as the **Von Neumann
|
||||
> Architecture**. It was devised by John von Neumann in about 1945, well before
|
||||
|
@ -106,7 +106,7 @@ Hertz was the scientist who detected
|
|||
We use Hertz as a measure of the frequency of electromatic wave cycles in a
|
||||
signal.
|
||||
|
||||

|
||||

|
||||
|
||||
As the diagram above shows, a cycle is equal to one ascending and one descending
|
||||
crest. The more cycles per time unit, the greater the Hertz. We see the Hz
|
||||
|
|
|
@ -34,7 +34,7 @@ connection types:
|
|||
|
||||
The table below summarises the relative differences:
|
||||
|
||||

|
||||

|
||||
|
||||
### Series connections
|
||||
|
||||
|
@ -58,12 +58,12 @@ Thus series connections increase voltage but keep current constant.
|
|||
|
||||
_Series battery connection:_
|
||||
|
||||

|
||||

|
||||
|
||||
_Can be represented in a circuit diagram in one of the following two ways: as a
|
||||
series of cells or as a single battery:_
|
||||
|
||||

|
||||

|
||||
|
||||
In the case of **series opposing**, negative terminals are connected to each
|
||||
other and positive terminals are connected to each other in a series. This
|
||||
|
@ -88,11 +88,11 @@ $$
|
|||
|
||||
_Parallel battery connection:_
|
||||
|
||||

|
||||

|
||||
|
||||
_Parallel battery circuit diagram:_
|
||||
|
||||

|
||||

|
||||
|
||||
### Series-parrallel
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ This will apply the changes from the commit with hash `xyz` from thee `main`
|
|||
branch to the `feature` branch. This will create a new SHA on `feature` (pqr)
|
||||
but the changes will be identical.
|
||||
|
||||

|
||||

|
||||
|
||||
The benefit is that you only take the select changes you want, you are not
|
||||
merging the whole `main` branch into feature.
|
||||
|
|
|
@ -18,7 +18,7 @@ accross its terminals. Through the application of
|
|||
[Ohm's Law](/Electronics_and_Hardware/Physics_of_electricity/Ohms_Law.md) we can
|
||||
determine that the maximum current will be 0.9 miliamps.
|
||||
|
||||

|
||||

|
||||
|
||||
## Open and short circuits
|
||||
|
||||
|
@ -42,4 +42,4 @@ current is represented as flowing in a straight line from the voltage source
|
|||
The circuit below is functionally identical to the previous circuit but
|
||||
represented vertically:
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -30,7 +30,7 @@ the reverse (the electrons moving from the voltage source to ground).
|
|||
|
||||
The diagram below shows a pulse cycle of 2Hz.
|
||||
|
||||

|
||||

|
||||
|
||||
## Linking components to the clock
|
||||
|
||||
|
|
|
@ -42,9 +42,9 @@ their infrastructure and applications.
|
|||
CloudWatch can usually be accessed directly from within the dashboard for the
|
||||
given AWS service under the "Monitor" tab. For example with AWS Lambda:
|
||||
|
||||

|
||||

|
||||
|
||||
In addition to graphical metrics, we can also view specific logs for each event
|
||||
and execution of the given service. In the case of a Lambda function:
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -10,4 +10,4 @@ If we have a conditional and we have independently derived its antecedent, we
|
|||
may invoke its consequent. This is often referred to as _Modus ponens_
|
||||
(affirming the antecedent).
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -9,4 +9,4 @@ tags: []
|
|||
If we can show that $Q$ follows from $P$ (typically via a sub-proof) than we can
|
||||
assert that P implies Q. This is also sometimes known as _Conditional Proof_
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -9,4 +9,4 @@ tags: []
|
|||
If a conjunction exists, it means that both conjuncts are the case; therefore we
|
||||
can legitimately extract either one of them. Also known as _Simplification_.
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -7,4 +7,4 @@ tags: []
|
|||
If two conjuncts have each been independently derived then they can be
|
||||
conjoined. Also known more simply as _Conjunction_
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -69,11 +69,11 @@ expenditure and security challenges.
|
|||
|
||||
_Standard userspace_
|
||||
|
||||

|
||||

|
||||
|
||||
_Userspace with containerization_
|
||||
|
||||

|
||||

|
||||
|
||||
## Differences with virtual machines
|
||||
|
||||
|
@ -102,7 +102,7 @@ rest as it would any other process on the OS.
|
|||
| Less portable | More portable |
|
||||
| Slower and more difficult to run | Scale rapidly due to lightweight nature |
|
||||
|
||||

|
||||

|
||||
|
||||
## Why use containers?
|
||||
|
||||
|
|
|
@ -29,4 +29,4 @@ _Compass_ is a graphical interface for viewing and interacting with the data in
|
|||
your Mongo database. It will automatically load to the default Mongo port:
|
||||
`27017`.
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -69,11 +69,11 @@ const course = new Course({
|
|||
});
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
## Outcome
|
||||
|
||||
Having created a database, connected to it with Mongoose, and created a model we
|
||||
will see our collection reflected in Compass:
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -15,7 +15,7 @@ below demonstrates how memory can be created using
|
|||
[NAND](/Electronics_and_Hardware/Digital_circuits/Logic_gates.md#nand-gate)
|
||||
gates. A single bit is stored in memory.
|
||||
|
||||
 Interactive version of circuit:
|
||||
 Interactive version of circuit:
|
||||
|
||||
<iframe src="https://circuitverse.org/simulator/embed/nand-mem?theme=default&display_title=false&clock_time=true&fullscreen=true&zoom_in_out=true" style="border-width:; border-style: solid; border-color:;" name="myiframe" id="projectPreview" scrolling="no" frameborder="1" marginheight="0px" marginwidth="0px" height="500" width="500" allowFullScreen></iframe>
|
||||
|
||||
|
@ -42,7 +42,7 @@ gates. A single bit is stored in memory.
|
|||
|
||||
> Upshot: With **S** `ON`, output is the same as input
|
||||
|
||||

|
||||

|
||||
|
||||
### Second state: both S and I `ON`
|
||||
|
||||
|
@ -59,7 +59,7 @@ gates. A single bit is stored in memory.
|
|||
|
||||
> Upshot: With **S** on, the output is again the same as the input
|
||||
|
||||

|
||||

|
||||
|
||||
> So far we have seen that when **S** is `ON` you can change **I** on and off
|
||||
> and **O** will change with it.
|
||||
|
@ -78,4 +78,4 @@ and at Gate 2: `OFF (Gate 1) + OFF (S) = OFF`
|
|||
This is illustrated in the diagram below. The space occupied by **A** and **B**
|
||||
remains on (note it is illuminated) regardless of the state of **I**.
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -33,7 +33,7 @@ force the **voltage source**.
|
|||
_The diagram below illustrates the flow of current where the circles are
|
||||
electrons knocking into each other and passing current:_
|
||||
|
||||

|
||||

|
||||
|
||||
> Electrons travel very slowly through a conductor. This is in contrast to their
|
||||
> intrinsic motion which of course equal to the speed of light (186, 000 miles
|
||||
|
|
|
@ -17,7 +17,7 @@ single set of tasks according to prewritten instructions. We’ll take the term
|
|||
_computer_ to mean general purpose computer.
|
||||
|
||||
Simplified model of what a computer is:
|
||||

|
||||

|
||||
|
||||
Although the input, output and storage parts of a computer are very important,
|
||||
they will not be the focus of this course. Instead we are going to learn all
|
||||
|
@ -57,9 +57,9 @@ instructions to make calculations.
|
|||
wind, drift, slope and elevation. These were used well into WW2 but they were
|
||||
limited to the particular type of cannon or shell
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
> Before the invention of actual computers, 'computer' was a job-title denoting
|
||||
> people who were employed to conduct complex calculations, sometimes with the
|
||||
|
|
|
@ -15,14 +15,14 @@ disjuncts comprising the disjunction you start out with. If you can derive your
|
|||
target proposition as the conclusion of each subproof then you may invoke the
|
||||
conclusion in the main proof and take it to be derived.
|
||||
|
||||

|
||||

|
||||
|
||||
_Here is an example where Disjunction Elimination is used to derive a new
|
||||
disjunction._
|
||||
|
||||

|
||||

|
||||
|
||||
_Here are two further examples that use Disjunction Elimination to derive
|
||||
singular propositions_
|
||||
|
||||
 
|
||||
 
|
||||
|
|
|
@ -15,4 +15,4 @@ to be true. This is represented in the context of
|
|||
can pass up via either branch of a disjunction pattern. This rule is sometimes
|
||||
also referred to (confusingly) as _Addition_.
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -10,16 +10,16 @@ tags:
|
|||
|
||||
Suppose you have the following shape:
|
||||
|
||||

|
||||

|
||||
|
||||
One part is shaded. This represents one-eighth of the original shape.
|
||||
|
||||

|
||||

|
||||
|
||||
Now imagine there are four instances of the shape and one-eighth remains shaded.
|
||||
How man one-eighths are there in four?
|
||||
|
||||

|
||||

|
||||
|
||||
The shaded proportion represents $\frac{1}{8}$ of the shape. Imagine four of
|
||||
these shapes, how many eighths are there?
|
||||
|
|
|
@ -8,7 +8,7 @@ tags: [docker, containerization]
|
|||
|
||||
## Overview
|
||||
|
||||

|
||||

|
||||
|
||||
- The Docker Client is a thin API for making
|
||||
[REST API](/Databases/REST/RESTful_APIs.md) to the Docker Server. Any CLI
|
||||
|
|
|
@ -144,7 +144,7 @@ docker attach my_container
|
|||
|
||||
## Container lifecycle
|
||||
|
||||

|
||||

|
||||
|
||||
All containers have a lifecycle represented by five distinct states. Each state
|
||||
has an associated command:
|
||||
|
|
|
@ -57,7 +57,7 @@ call this propensity of electrons the **intrinsic magnetic moment** of the
|
|||
electron. It is aggregates of these miniature magnetic behaviours that produce
|
||||
the overall magnetic property of the material.
|
||||
|
||||

|
||||

|
||||
|
||||
In most materials, equal numbers of electrons spin in opposite directions. As a
|
||||
result, their magentic effects are cancelled out. However **in strongly magnetic
|
||||
|
@ -128,7 +128,7 @@ charge, the magnetic field is different:
|
|||
This is illustrated below which shows the magnetic field operating at right
|
||||
angles to the flow of charge within a wire.
|
||||
|
||||
<img src="/home/thomas/repos/eolas/_img/magnetic_field.png" width="300" />
|
||||
<img src="/home/thomas/repos/eolas/img/magnetic_field.png" width="300" />
|
||||
|
||||
## The electromagnetic field
|
||||
|
||||
|
@ -181,7 +181,7 @@ waves form a spectrum based on their frequency and wavelength. For example,
|
|||
'radio waves' are low-frequency / long wavelength electromagnetic waves and
|
||||
gamma rays are high-frequency / short wavelength waves:
|
||||
|
||||

|
||||

|
||||
|
||||
The image below shows the propagation of an electromagnetic wave through space.
|
||||
We can identify the core components as follows
|
||||
|
@ -191,7 +191,7 @@ We can identify the core components as follows
|
|||
which propagates upward along the $y$ axis
|
||||
- The directionality of both waves is forward along the $x$ axis
|
||||
|
||||

|
||||

|
||||
|
||||
## Using magnetism to generate electricity
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ the nucleus.
|
|||
_The diagram below demonstrates shell naming conventions and the maximum number
|
||||
of electrons per shell._
|
||||
|
||||

|
||||

|
||||
|
||||
## Valence
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ tags:
|
|||
Two fractions are equivalent if they represent the same value. To begin with we
|
||||
can represent this visually:
|
||||
|
||||

|
||||

|
||||
|
||||
_Each shaded area is taking up the same proportion of the whole._
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ exception class.
|
|||
The root class is `BaseException` which all errors and exeptions extend as
|
||||
subclasses as demonstrated by this diagram:
|
||||
|
||||

|
||||

|
||||
|
||||
## Exception syntax
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ If there was only one thread, this would be inefficient and unworkable.
|
|||
Therefore the framework will be multi-threaded: multiple request-response cycles
|
||||
can be executed at once by different threads.
|
||||
|
||||

|
||||

|
||||
|
||||
To accomodate the ability to increase the scale of synchronous applications you
|
||||
need to be able to spawn more threads commensurate to increased demand. This
|
||||
|
@ -46,7 +46,7 @@ dispatching them asynchronously. When a request is made it sends it off and
|
|||
continues with its execution and handling new requests. Once these resolve, the
|
||||
data is returned to the main thread.
|
||||
|
||||

|
||||

|
||||
|
||||
## The Event Loop
|
||||
|
||||
|
@ -77,7 +77,7 @@ process exits when there is no more pending work in the Event Loop, or when
|
|||
are tasks queued in the Event Loop, or present on the
|
||||
[call stack](/Software_Engineering/Call_stack.md).
|
||||
|
||||

|
||||

|
||||
|
||||
The phases are as follows:
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ Our `sda1` partition is now mounted at `mountpoint`. We can go ahead and create
|
|||
files. If we now look within the graphical file manager when we click on the
|
||||
`sda1` volume, we will see the new file we have created in `mountpoint`.
|
||||
|
||||

|
||||

|
||||
|
||||
## fstab
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ The possible state changes for the JK Flip-Flop are detailed below:
|
|||
A JK Flip-Flop can execute on either the positive or negative pulse. Below are
|
||||
the diagrams for a rising and falling pulse respectively:
|
||||
|
||||

|
||||

|
||||
|
||||
## T Flip-Flops
|
||||
|
||||
|
@ -59,4 +59,4 @@ Thus the state table for the T Flip-Flop is:
|
|||
| 0 | Pulse | Maintain previous value | Hold |
|
||||
| 0 | Pulse | Inverse of previous value | Toggle |
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -54,11 +54,11 @@ Sub-proofs follow this structure recursively. This is known as _Fitch notation_
|
|||
|
||||
_Schematically_:
|
||||
|
||||

|
||||

|
||||
|
||||
_Applied example_:
|
||||
|
||||

|
||||

|
||||
|
||||
## Sub-proofs
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ three lines
|
|||
|
||||
## Colour outputs
|
||||
|
||||

|
||||

|
||||
|
||||
```bash
|
||||
echo -e "\033[31;40mColoured Text\033[0m"
|
||||
|
|
|
@ -17,7 +17,7 @@ We mark the last good revision and the first bad revision. Bisect will the reset
|
|||
the code to the midpoint between the good and bad versions and let you test it.
|
||||
You mark that as a good or bad version and then bisect repeats the process.
|
||||
|
||||

|
||||

|
||||
|
||||
## Procedure
|
||||
|
||||
|
|
|
@ -24,4 +24,4 @@ terminal of the voltage source.
|
|||
|
||||
The symbol for ground in circuit diagrams:
|
||||
|
||||
<img src="/home/thomas/repos/computer_science/_img/ground-symbol.png" width="300px">
|
||||
<img src="/home/thomas/repos/computer_science/img/ground-symbol.png" width="300px">
|
||||
|
|
|
@ -68,7 +68,7 @@ The diagram below shows the circuit representation of a half-adder and an
|
|||
example calculation. This calculation matches the ones column of the earlier
|
||||
binary addition example: $0011 + 0010$.
|
||||
|
||||

|
||||

|
||||
|
||||
### Implementation with logic gates
|
||||
|
||||
|
@ -112,7 +112,7 @@ And the carry-out bit replicates the truth conditions of
|
|||
It is therefore possible to implement a half-adder with just these two logic
|
||||
gates:
|
||||
|
||||

|
||||

|
||||
|
||||
The digital circuit above has the same inputs and outputs as the half adder
|
||||
diagram above.
|
||||
|
@ -137,7 +137,7 @@ and B) and like the half adder, generates a sum bit and a carry-out bit.
|
|||
| ---------------------------- | ----------------------------- | ------------------------ | ---------------------- | ---------------------------- |
|
||||
| The first number to be added | The second number to be added | The incoming carried bit | The sum bit (A+B+C_in) | The carry-out bit (A+B+C_in) |
|
||||
|
||||

|
||||

|
||||
|
||||
The diagram above is equivalent to the calculation taking place in the fours
|
||||
column. It has received a carry from the twos column ($1 + 1$ results in $1$ as
|
||||
|
|
|
@ -37,7 +37,7 @@ we can learn the main facets of chip design. Its syntax is very similar to VHDL.
|
|||
We will create an HDL program for an XOR gate that is implemented through the
|
||||
following arrangement of NOT, AND, and OR gates:
|
||||
|
||||

|
||||

|
||||
|
||||
### HDL file (`Xor.hdl`):
|
||||
|
||||
|
|
|
@ -32,4 +32,4 @@ Edition)]
|
|||
The design of the diagram below emphasises the role of abstraction and
|
||||
modularity in the movement from transistors to chips:
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -12,7 +12,7 @@ In order to test our
|
|||
them into the hardware simulator program. We will demonstrate this with the
|
||||
following XOR implementation:
|
||||
|
||||

|
||||

|
||||
|
||||
There are several simulation options:
|
||||
|
||||
|
@ -34,7 +34,7 @@ uploaded the `Xor.hdl` file into the simulator and changed the input pins to
|
|||
`a=1, b=0` and clicked the calculator icon (representing "evaluation"). This
|
||||
then shows the output and internal pin values for these inputs.
|
||||
|
||||
<img src="/home/thomas/repos/computer_science/_img/hardware-sim-basic.png" >
|
||||
<img src="/home/thomas/repos/computer_science/img/hardware-sim-basic.png" >
|
||||
|
||||
## Script-based
|
||||
|
||||
|
@ -46,7 +46,7 @@ When this is run it automatically generates an output file in the source
|
|||
directory at `Xor.out`. This can be viewed within the simulator via the 'View'
|
||||
drop down.
|
||||
|
||||

|
||||

|
||||
|
||||
## Comparison-based
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ $$
|
|||
= 15
|
||||
$$
|
||||
|
||||

|
||||

|
||||
|
||||
> Every four bits (or half byte) in binary corresponds to one symbol in
|
||||
> hexadecimal. Therefore **a byte can be easily represented with two hexadecimal
|
||||
|
|
|
@ -26,5 +26,5 @@ to a breadboard.
|
|||
|
||||
_An integrated circuit and its use on a breadboard:_
|
||||
|
||||
<img align="left" width="200" src="/home/thomas/repos/computer_science/_img/integrated-circuit.jpeg">
|
||||
<img width="200" src="/home/thomas/repos/computer_science/_img/breadboard-DIP.jpg">
|
||||
<img align="left" width="200" src="/home/thomas/repos/computer_science/img/integrated-circuit.jpeg">
|
||||
<img width="200" src="/home/thomas/repos/computer_science/img/breadboard-DIP.jpg">
|
||||
|
|
|
@ -19,7 +19,7 @@ git add -i
|
|||
|
||||
This opens an interface:
|
||||
|
||||

|
||||

|
||||
|
||||
We select 2 and it lets us stage by number. If I enter 1, it will stage the
|
||||
first change.
|
||||
|
@ -40,7 +40,7 @@ But it is useful for staging sub-portions of a file, which are called **hunks**.
|
|||
|
||||
We access these via **patch mode**:
|
||||
|
||||

|
||||

|
||||
|
||||
### Splitting hunks
|
||||
|
||||
|
@ -59,7 +59,7 @@ mode. We enter this with `e`.
|
|||
|
||||
This will oped up Vim for the manual work to be done:
|
||||
|
||||

|
||||

|
||||
|
||||
We use the diff symbols `+`, `-` and space to do this.
|
||||
|
||||
|
|
|
@ -27,4 +27,4 @@ in RDB table: units that comprise the collection.
|
|||
|
||||
A document is a container comprising key-value pairs in the manner of an object.
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -93,7 +93,7 @@ ON model.model_id = sales.model_id; -- Specify the match criteria
|
|||
We can represent the logical relationship that obtains between the `sales` and
|
||||
`model` tables as follows:
|
||||
|
||||

|
||||

|
||||
|
||||
## Outer joins
|
||||
|
||||
|
@ -142,7 +142,7 @@ this would give us the following table in return:
|
|||
The logical relationship sustained between `sales` and `model` by a left inner
|
||||
join is represented in the following diagram:
|
||||
|
||||

|
||||

|
||||
|
||||
#### Implementation
|
||||
|
||||
|
@ -185,7 +185,7 @@ performed a right outer join this would give us the following table in return:
|
|||
The logical relationship sustained between `sales` and `model` by a right inner
|
||||
join is represented in the following diagram:
|
||||
|
||||

|
||||

|
||||
|
||||
#### Implementation
|
||||
|
||||
|
@ -227,7 +227,7 @@ generated:
|
|||
|
||||
Represented by the following diagram:
|
||||
|
||||

|
||||

|
||||
|
||||
#### Implementation
|
||||
|
||||
|
|
|
@ -6,4 +6,4 @@ tags: [graphql]
|
|||
|
||||
# The journey of a GraphQL query
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -58,7 +58,7 @@ client application.
|
|||
Client requests are sent over HTTPS and the data is typically returned in the
|
||||
form of JSON:
|
||||
|
||||

|
||||

|
||||
|
||||
## Implementation overview
|
||||
|
||||
|
@ -136,15 +136,15 @@ each individual resource:
|
|||
|
||||
The REST scenario:
|
||||
|
||||

|
||||

|
||||
|
||||
The GraphQL scenario:
|
||||
|
||||

|
||||

|
||||
|
||||
### Abstraction of multiple services
|
||||
|
||||

|
||||

|
||||
|
||||
### Stops overfetching
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ tags: [electricity, circuits]
|
|||
LED' stands for **Light Emitting Diode**, a [circuit]() component that emits
|
||||
light. The symbol for an LED is displayed below:
|
||||
|
||||

|
||||

|
||||
|
||||
A **diode** is a special kind of component that only permits current to flow
|
||||
through it in one direction. To achieve this it has very low resistance in one
|
||||
|
@ -17,7 +17,7 @@ direction to allow current flow and high resistance in the other direction to
|
|||
impede current flow. This feature of diodes is clearly represented in the
|
||||
generic diode circuit symbol:
|
||||
|
||||

|
||||

|
||||
|
||||
An LED diode lights up when the right amount of current flows through it. A
|
||||
standard LED has a maximum current of 20mA. An appropriate
|
||||
|
|
|
@ -47,7 +47,7 @@ The most succinct account of a latch:
|
|||
|
||||
_The representation of an SR Latch in a digital circuit diagram_:
|
||||
|
||||

|
||||

|
||||
|
||||
## Creating a latch circuit
|
||||
|
||||
|
@ -62,7 +62,7 @@ also an input of the other at a single stage in the sequence.
|
|||
|
||||
The circuit is created as follows:
|
||||
|
||||

|
||||

|
||||
|
||||
Interactive version:
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ The final phase is unmounting: when the component is removed from the DOM:
|
|||
|
||||
6. `componentWillUnmount()`
|
||||
|
||||

|
||||

|
||||
|
||||
## Side-effects: why lifecycle phases matter
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ tion) truth functional connective
|
|||
|
||||
### Symbol
|
||||
|
||||

|
||||

|
||||
|
||||
### Truth conditions
|
||||
|
||||
|
@ -114,7 +114,7 @@ tion) truth functional connective
|
|||
|
||||
### Symbol
|
||||
|
||||

|
||||

|
||||
|
||||
### Truth conditions
|
||||
|
||||
|
@ -143,7 +143,7 @@ NANDs alone.
|
|||
|
||||
### Symbol
|
||||
|
||||

|
||||

|
||||
|
||||
### Truth condition
|
||||
|
||||
|
@ -172,7 +172,7 @@ t
|
|||
|
||||
### Symbol
|
||||
|
||||

|
||||

|
||||
|
||||
### Truth conditions
|
||||
|
||||
|
@ -193,7 +193,7 @@ t
|
|||
|
||||
### Symbol
|
||||
|
||||

|
||||

|
||||
|
||||
### Truth conditions
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ A
|
|||
has very important consequences for reasoning because if a set of propositions
|
||||
is inconsistent, any other proposition is derivable from it.
|
||||
|
||||

|
||||

|
||||
|
||||
_A demonstration of the the consequences of deriving a contradiction in a
|
||||
sequence of reasoning._
|
||||
|
|
|
@ -41,4 +41,4 @@ Note that the property of equivalence stated in terms of derivablity above is
|
|||
identical to the derivation rule for the
|
||||
[material biconditional](/Logic/Proofs/Biconditional_Introduction.md):
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -31,7 +31,7 @@ tags: [physics]
|
|||
|
||||
## Atomic particles
|
||||
|
||||
<img src="/home/thomas/repos/computer_science/_img/atom-diagram.svg" width="400" align="right" />
|
||||
<img src="/home/thomas/repos/computer_science/img/atom-diagram.svg" width="400" align="right" />
|
||||
|
||||
- There are three particles comprising atoms: **protons**, **neutrons** and
|
||||
**electrons**.
|
||||
|
|
|
@ -87,7 +87,7 @@ the OS kernel is itself loaded into memory.
|
|||
> sends to the CPU not just the first instruction in the requested file but also
|
||||
> a number of instructions that immediately follow it.
|
||||
|
||||

|
||||

|
||||
|
||||
Every part of the above process - the journey accross the bus, the lookup in the
|
||||
controller, the operations on the DRAM, the journey back accross the bus - takes
|
||||
|
@ -134,7 +134,7 @@ these from slow DRAM to fast SRAM.
|
|||
The diagram below compares the different forms of memory within a computing
|
||||
device in terms of speed, monetary cost and capacity:
|
||||
|
||||

|
||||

|
||||
|
||||
## Memory addresses
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ time that they are utilising. You can also order by memory usage.
|
|||
|
||||
_Here I have pressed `u` to show only the processes associated with my user:_
|
||||
|
||||

|
||||

|
||||
|
||||
### Main commands
|
||||
|
||||
|
@ -130,7 +130,7 @@ using them. Without modifiers it outputs a huge amount of data. The best way to
|
|||
use it is to execute it against a specific PID. For example the below output
|
||||
gives me some useful info about which files VS Code is using:
|
||||
|
||||

|
||||

|
||||
|
||||
## System calls: `strace`
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ tags: [motherboard]
|
|||
|
||||
# Motherboard
|
||||
|
||||
<img src="../_img/motherboard-pi.jpg" width="400px"/>
|
||||
<img src="../img/motherboard-pi.jpg" width="400px"/>
|
||||
|
||||
The motherboard is the foundation of a computer. It allocates power and allows
|
||||
communication to and between the
|
||||
|
|
|
@ -19,7 +19,7 @@ input to a single output line.
|
|||
We have two inputs (A,B) plus a third input SEL (for "select"). Applying a value
|
||||
to SEL toggles the output between A and B.
|
||||
|
||||

|
||||

|
||||
|
||||
Multiplexers can be used to build larger circuits by connecting the output of
|
||||
one multiplexer to the input of another. They are often used to implement data
|
||||
|
@ -38,7 +38,7 @@ As the name suggests, a demultiplexer reverses the functionality of a
|
|||
multiplexer. It receives a single input and based on the selection of the SEL
|
||||
input it channels it to either an A or a B output.
|
||||
|
||||

|
||||

|
||||
|
||||
We can think of it as a distributor of a value into one of several possible
|
||||
channels.
|
||||
|
|
|
@ -13,4 +13,4 @@ with a true proposition from which you derive a contradiction, you start with
|
|||
the negation of a proposition, derive a contradiction and then assert the
|
||||
positive of the negated proposition you started out with.
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -12,4 +12,4 @@ declared in a sub-proof. If you can derive a contradiction from this assumption
|
|||
you are permitted to derive the negation of the auxiliary assumption in the main
|
||||
proof.
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -52,7 +52,7 @@ A cluster is the highest level of organisation within an OpensSearch domain that
|
|||
contains your indexed data. It processes all the search queries and handles
|
||||
tasks like indexing, searching, and managing documents.
|
||||
|
||||

|
||||

|
||||
|
||||
A cluster comprises **nodes**. Nodes are individual servers that hold part of
|
||||
the cluster's data. Each node participates in the indexing and searching of the
|
||||
|
|
|
@ -32,7 +32,7 @@ We can pinpoint specific dependencies in the `package.json`, e.g.
|
|||
See whether your dependency version is out of date use `npm outdated`. This
|
||||
gives us a table, for example:
|
||||
|
||||

|
||||

|
||||
|
||||
- _Latest_ tells us the latest release available from the developers
|
||||
- _Wanted_ tells us the version that our `package.json` rules target. To take
|
||||
|
|
|
@ -11,17 +11,17 @@ tags: [AWS, aws-lambda, node-js]
|
|||
|
||||
First we name the function and accept the defaults:
|
||||
|
||||

|
||||

|
||||
|
||||
This presents us with the function dashboard - a graphical representation of the
|
||||
Lambda showing [triggers]() as an input and destination as an output:
|
||||
|
||||

|
||||

|
||||
|
||||
Beneath this we have a code editor with the handler function with a basic
|
||||
boilerplate:
|
||||
|
||||

|
||||

|
||||
|
||||
## Adding a trigger
|
||||
|
||||
|
@ -31,15 +31,15 @@ execute the handler.
|
|||
We will do this using [AWS API Gateway](/DevOps/AWS/AWS_API_Gateway.md). We
|
||||
select "Add trigger" from the dashboard view and input basic settings:
|
||||
|
||||

|
||||

|
||||
|
||||
Now we see this step displayed in the dashboard:
|
||||
|
||||

|
||||

|
||||
|
||||
With the endpoint and other settings displayed:
|
||||
|
||||

|
||||

|
||||
|
||||
If we go to the endpoint URL
|
||||
(`https://4kjqwbvd7g.execute-api.us-east-1.amazonaws.com/default/myFirstFunction`),
|
||||
|
@ -77,4 +77,4 @@ We get `Hello Thomas` as output.
|
|||
For a more advanced API with multiple endpoints and parameters, it's easiest to
|
||||
use Postman:
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -19,11 +19,11 @@ main approaches to this:
|
|||
> $n$. We then repeat this process with the resulting factors working
|
||||
> recursively until the numbers we are left with are primes.
|
||||
|
||||

|
||||

|
||||
_The prime factors of 27 are 2, 3, 3_
|
||||
|
||||
it doesn't matter which products we choose as the interim factors, we should
|
||||
always reach the same outcome:
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
|
|
@ -9,7 +9,7 @@ tags:
|
|||
|
||||
_Visualization of the queue data structure_
|
||||
|
||||

|
||||

|
||||
|
||||
## A queue is a sequential data structure and most similar to a stack
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ is evident from the following automatic commit message that is generated:
|
|||
Merge branch B of github.com:thomasabishop/remote-repository into A
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
In this scenario the merge commit has two or more parent commits each
|
||||
representing the history of the merged branches. The resulting history of A will
|
||||
|
@ -28,7 +28,7 @@ include the commits of B. Basically the two histories are combined.
|
|||
This would give us a history that looks like the following, with different
|
||||
colours for the separate SHAs of each merged branch:
|
||||
|
||||

|
||||

|
||||
|
||||
If we were to create a rebase branch of A from B, there would be a new singular
|
||||
history without distinguishing multiple parents that combines the commits of A
|
||||
|
@ -41,12 +41,12 @@ of commits in a single branch.
|
|||
When a rebase is applied, it will put the diverging B commits at the tip of A
|
||||
like so:
|
||||
|
||||

|
||||

|
||||
|
||||
And then rebrand the previous A commits to be continuous with B presenting a
|
||||
flat and linear Git history like the following:
|
||||
|
||||

|
||||

|
||||
|
||||
## Benefits, use-cases
|
||||
|
||||
|
@ -162,7 +162,7 @@ recent. This will open an interactive rebase window, listing the commits. You
|
|||
can then use the keywords to decide what you want to do with them. In our case
|
||||
this will be `s` for squash.
|
||||
|
||||

|
||||

|
||||
|
||||
### Example
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ another example. Also fractals display recursive properties.
|
|||
## Schema
|
||||
|
||||
The general structure of a recursive function is as follows:
|
||||

|
||||

|
||||
|
||||
## Why use recursive functions?
|
||||
|
||||
|
@ -131,4 +131,4 @@ if (num > 0) {
|
|||
}
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -93,7 +93,7 @@ A better method is to utilise [prime factorization](Prime%20factorization.md)
|
|||
combined with the canceling technique.
|
||||
|
||||
First we find the prime factors of both the numerator and denominator:
|
||||

|
||||

|
||||
|
||||
This gives us:
|
||||
|
||||
|
@ -163,7 +163,7 @@ _Reduce the following fraction to its lowest terms: $$\frac{14y^5}{-35y^3}$$_
|
|||
|
||||
- Apply [Prime factorization](Prime%20factorization.md):
|
||||
|
||||

|
||||

|
||||
|
||||
- Cancel the coefficients and variable parts
|
||||
|
||||
|
@ -179,7 +179,7 @@ $$\frac{- 12xy^2}{ - 18xy^2}$$_
|
|||
|
||||
- Apply [Prime factorization](Prime%20factorization.md):
|
||||
|
||||

|
||||

|
||||
|
||||
- Cancel the coefficients and variable parts
|
||||
|
||||
|
|
|
@ -11,4 +11,4 @@ within the main proof or a more deeply nested sub-proof. Reiteration allows us
|
|||
to reuse any assumptions, or propositions derived from assumptions, without
|
||||
having to introduce a new dependency with another assumption.
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -28,7 +28,7 @@ is the first instruction that the CPU fetches and this is what allows the kernel
|
|||
to play its mediatory role. However most of the fetch, decode, execute cycles of
|
||||
the CPU take place independently of the kernel.
|
||||
|
||||

|
||||

|
||||
|
||||
> Fetch decode and execute refer to processor pipeline stages. They occur
|
||||
> automatically as part of normal processor operation, the kernel doesn’t
|
||||
|
|
|
@ -8,7 +8,7 @@ tags: [relational-databases]
|
|||
|
||||
Tables, fields and records are the basic building blocks of databases
|
||||
|
||||

|
||||

|
||||
|
||||
## Table
|
||||
|
||||
|
|
|
@ -35,12 +35,12 @@ simple algorithm at work to generate the complement for 4-bit number:
|
|||
values, so $0$ becomes $1$ and $1$ becomes $0$.
|
||||
2. Add one
|
||||
|
||||

|
||||

|
||||
|
||||
To translate a signed number to an unsigned number you flip them back and still
|
||||
add one:
|
||||
|
||||

|
||||

|
||||
|
||||
### Formal expresssion: $2^n - x$
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@ tags:
|
|||
- data-structures
|
||||
---
|
||||
|
||||
_A stack visualised vertically_ 
|
||||
_A stack visualised vertically_ 
|
||||
|
||||
_A stack visualised horizontally_ 
|
||||
_A stack visualised horizontally_ 
|
||||
|
||||
## A stack is a linear data structure that observes LIFO
|
||||
|
||||
|
|
|
@ -40,11 +40,11 @@ The diagram below shows the definition of a given state machine. On the left is
|
|||
the JSON specification. On the right is a diagramatic representation that shows
|
||||
the control flow and all possible steps that comprise a given pathway / state:
|
||||
|
||||

|
||||

|
||||
|
||||
For each execution of the state machine (each time it is triggered) you can
|
||||
review the runtime. The flow diagram will highlight green to show the given
|
||||
pathway, and you can also see the inputs and outputs for each step and any
|
||||
errors:
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -58,7 +58,7 @@ in the first conjunct. We can get this simply but applying
|
|||
|
||||
So far we have:
|
||||
|
||||

|
||||

|
||||
|
||||
Now we just need to get $D$ from the proposition at line 3. This is easy since
|
||||
we already have access to the consequent of the biconditional at line 1.
|
||||
|
@ -66,7 +66,7 @@ Therefore we can apply
|
|||
[Biconditional Elimination](/Logic/Proofs/Biconditional_Elimination.md)) at line
|
||||
3 to get $D$. We are now halfway there:
|
||||
|
||||

|
||||

|
||||
|
||||
Next we need to turn our attention to deriving $L \lor A$. How can we obtain $L$
|
||||
? Well it is contained within the first conjunct of the assumption on line 2.
|
||||
|
@ -77,7 +77,7 @@ $\lnot N$ as an assumption on the first line, so we can use
|
|||
[Conditional Elimination](/Logic/Proofs/Conditional_Elimination.md) to derive
|
||||
$L$. These two steps give us:
|
||||
|
||||

|
||||

|
||||
|
||||
Now we need to get from $L$ to $L \lor A$. This is really straightforward
|
||||
because by using
|
||||
|
@ -87,7 +87,7 @@ constituent parts of the conjunction that is the conclusion, we can combine them
|
|||
with [Conjunction Introduction](/Logic/Proofs/Conjunction_Introduction.md) as we
|
||||
had planned at the outset.
|
||||
|
||||

|
||||

|
||||
|
||||
### A further example
|
||||
|
||||
|
@ -109,7 +109,7 @@ approach is therefore to seek to derive the antecedent ($\lnot L$) and then use
|
|||
[Biconditional Elimination](/Logic/Proofs/Biconditional_Elimination.md) to
|
||||
extract the target sentence which is the consequent.
|
||||
|
||||

|
||||

|
||||
|
||||
## Proving theorems
|
||||
|
||||
|
@ -127,13 +127,13 @@ Our strategy here is to identify the main connective in the proposition we want
|
|||
to derive (the material conditional). We then assume the antecedent and attempt
|
||||
to derive the consequent from it.
|
||||
|
||||

|
||||

|
||||
|
||||
## A complex theorem proof
|
||||
|
||||
_Prove_ $\vdash (\lnot A \lor \lnot B) \leftrightarrow \lnot(A \land B)$
|
||||
|
||||

|
||||

|
||||
|
||||
### Walkthrough
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ computer that works on Von Neuman principles. It has all the CPU components we
|
|||
have detailed above. It is programmed in machine code but for simplicity it uses
|
||||
the denary rather than the binary number system.
|
||||
|
||||

|
||||

|
||||
|
||||
On the left is the instruction set. Each number constitutes and execution
|
||||
routine and the `xx` stand for the address in RAM that the execution will work
|
||||
|
|
|
@ -13,7 +13,7 @@ empty.
|
|||
|
||||
_Demonstration_
|
||||
|
||||

|
||||

|
||||
|
||||
We see in this example that there is no starting set and thus no primary
|
||||
assumptions. Instead we start with nothing other than the proposition we wish to
|
||||
|
|
|
@ -58,7 +58,7 @@ since the only state change we need is a single bit toggle three times that
|
|||
retains its value.
|
||||
|
||||
Using these pulse patterns we can construct a circuit as follows:
|
||||

|
||||

|
||||
|
||||
<iframe src="https://circuitverse.org/simulator/embed/3-bit-counter-d33846e3-7538-427d-b4cc-dc64fdaf0af3?theme=default&display_title=false&clock_time=true&fullscreen=true&zoom_in_out=true" style="border-width:; border-style: solid; border-color:;" name="myiframe" id="projectPreview" scrolling="no" frameborder="1" marginheight="0px" marginwidth="0px" height="500" width="600" allowFullScreen></iframe>
|
||||
|
||||
|
|
|
@ -25,13 +25,13 @@ it acts like an open circuit and no current can flow.
|
|||
|
||||
We can combine switches in a circuit to create analogs to logic gates.
|
||||
|
||||

|
||||

|
||||
|
||||
In the example above a simple AND gate is implemented with switches. Each switch
|
||||
is a conjunct and the current only flows if both switches are on, closing the
|
||||
circuit.
|
||||
|
||||

|
||||

|
||||
|
||||
In the example above is a circuit implementing an OR gate. The current flows
|
||||
just if one of the switches are on or if both of the switches are on but not if
|
||||
|
@ -53,7 +53,7 @@ set parameters.
|
|||
There are different types of transistors but the simplest for the purposes of
|
||||
explanation are **bipolar junction transistors**.
|
||||
|
||||

|
||||

|
||||
|
||||
A transistor works as follows: applying a small amount of current at the base
|
||||
allows a larger current to flow from the collector to the emitter. Relating this
|
||||
|
@ -63,9 +63,9 @@ Removing this current is like turning the switch off.
|
|||
The diagrams below show a transistor being used in a circuit to create 'on' and
|
||||
'off' switch states alongside a switch based circuit.
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
- $V^{in}$ is the voltage that electrically controls the switch-as-transistor
|
||||
- $V^{out}$ is the voltage we want to control: it will be high when the
|
||||
|
@ -100,11 +100,11 @@ collector of one to the emitter of the other. If either voltage input is low
|
|||
then the voltage of the combined line is low (equivalent to the circuit being
|
||||
broken) and there is no current flowing.
|
||||
|
||||

|
||||

|
||||
|
||||
Below, an
|
||||
[OR](/Electronics_and_Hardware/Digital_circuits/Logic_gates.md#or-gate) has been
|
||||
constructed with transistors. If a voltage is applied to the base of either
|
||||
transistor, the current reaches the V-out terminal.
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -116,7 +116,7 @@ inconsistency in terms of truth trees:
|
|||
|
||||
The following is a truth tree for the set ${P \lor Q, \sim P }$:
|
||||
|
||||

|
||||

|
||||
|
||||
### Interpretation
|
||||
|
||||
|
@ -161,7 +161,7 @@ not the right hand side.
|
|||
The following is a truth tree for the set
|
||||
${A & \sim B, C, \sim A \lor \sim B }$.
|
||||
|
||||

|
||||

|
||||
|
||||
### Interpretation
|
||||
|
||||
|
@ -201,19 +201,19 @@ of each of the main connectives and these rules rely on logical equivalences
|
|||
|
||||
### Negated negation decomposition: `~~D`
|
||||
|
||||

|
||||

|
||||
|
||||
Truth passes only if $P$ is true
|
||||
|
||||
### Conjunction decomposition: `&D`
|
||||
|
||||

|
||||

|
||||
|
||||
Truth passes only $P$ and $Q$ are both true.
|
||||
|
||||
### Negated Conjunction decomposition: `~&D`
|
||||
|
||||

|
||||

|
||||
|
||||
Truth passes if either $\sim P$ or $\sim Q$ is true. This rule is a consequence
|
||||
of the equivalence between $\sim (P & Q)$ and $\sim P \lor \sim Q$ , the first
|
||||
|
@ -221,13 +221,13 @@ of DeMorgan’s Laws.
|
|||
|
||||
### Disjunction decomposition: `vD`
|
||||
|
||||

|
||||

|
||||
|
||||
Truth passes if either $P$or $Q$ are true.
|
||||
|
||||
### Negated Disjunction decomposition: `~vD`
|
||||
|
||||

|
||||

|
||||
|
||||
Truth passes if both $P$ and $Q$ are false. This rule is a consequence of the
|
||||
equivalence between $\sim (P \lor Q)$ and $\sim P & \sim Q$, the second of
|
||||
|
@ -235,7 +235,7 @@ DeMorgan’s Laws.
|
|||
|
||||
### Conditional decomposition: `⊃D`
|
||||
|
||||

|
||||

|
||||
|
||||
Truth passes if either $\sim P$ or $Q$ are true. This rule is a consequence of
|
||||
the equivalence between $P \supset Q$ and $\sim P \lor Q$ therefore this branch
|
||||
|
@ -246,11 +246,11 @@ has the shape of a disjunction with $\sim P$ , $Q$ as its disjuncts.
|
|||
Truth passes if both $P$ and $\sim Q$ are true. This is a consequence of the
|
||||
equivalence between $\sim (P \supset Q)$ and $P & \sim Q$.
|
||||
|
||||

|
||||

|
||||
|
||||
### Biconditional decomposition: `≡D`
|
||||
|
||||

|
||||

|
||||
|
||||
Truth passes if either $P$ and $Q$ are true or $\sim P & \sim Q$ are true. This
|
||||
is an interesting rule because it combines the disjunction and conjunction tree
|
||||
|
@ -258,7 +258,7 @@ shapes.
|
|||
|
||||
### Negated biconditional decomposition: `~≡D`
|
||||
|
||||

|
||||

|
||||
|
||||
Truth passes if either $P$ and $\sim Q$ is true or if $\sim P$ and $Q$ is true.
|
||||
|
||||
|
@ -279,7 +279,7 @@ following heuristic techniques followed in order, facilitate this:
|
|||
|
||||
Here are some examples of these rules applied:
|
||||
|
||||

|
||||

|
||||
|
||||
Observe that here we don’t bother to decompose the sentence on line 1. This is
|
||||
because, having decomposed the sentences on lines 2 and 3 we have arrived at a
|
||||
|
@ -318,7 +318,7 @@ A logically false sentence cannot be true on any assignment. This is the same
|
|||
thing as an inconsistent set. Thus it will be represented in a truth tree as
|
||||
inconsistency which is disclosed via a closed tree.
|
||||
|
||||

|
||||

|
||||
|
||||
### Logical truth
|
||||
|
||||
|
@ -367,7 +367,7 @@ equivalent.
|
|||
> Sentences $P$ and $Q$ are truth-functionally equivalent if and only if the set
|
||||
> $\sim (P \equiv Q)$ has a closed tree
|
||||
|
||||

|
||||

|
||||
|
||||
### Logical entailment and validity
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ cell of the tape is a head, which can either move left or right, and can read
|
|||
the symbols written in the cells. The head is also capable of erasing symbols
|
||||
and writing new symbols into the cells.
|
||||
|
||||
 The direction that the
|
||||
 The direction that the
|
||||
head moves, which values it erases, and which values it writes in, are dependent
|
||||
on a set of instructions provided to the machine.0
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ accessing the real memory blocks. This reduces complexity because often memory
|
|||
will be allocated in places that are non-contiguous with similar running
|
||||
processes or be located in the cache or swap memory on the disk.
|
||||
|
||||

|
||||

|
||||
|
||||
It would require considerable processing work for the kernel to be tracing these
|
||||
disparate memory sources at every instance. By working on an idealised
|
||||
|
|
|
@ -91,7 +91,7 @@ Kirchoff's Voltage Law:
|
|||
|
||||
The application of the Law is illustrated in the following diagram:
|
||||
|
||||

|
||||

|
||||
|
||||
The explanation for the voltage drop at the positions $V^{A}$ and $V^{D}$ are
|
||||
obvious enough: they are at the beginning and end of the loop so are equal to
|
||||
|
|
|
@ -22,7 +22,7 @@ can write to and read from.
|
|||
|
||||
The following diagram represents the basic anatomy of a disk device.
|
||||
|
||||

|
||||

|
||||
|
||||
- A disk is divided up into [partitions](/Operating_Systems/Disks/Partitions.md)
|
||||
which are subsections of the overall disk. The kernel presents each partition
|
||||
|
|
|
@ -17,7 +17,7 @@ to represent two states: on (1) and off (0) which corresponds to the switch on
|
|||
an electrical circuit. A single circuit representing the binary values of 1 and
|
||||
0:
|
||||
|
||||

|
||||

|
||||
|
||||
It would be much more complicated to have to represent ten different states
|
||||
under the decimal number system, although denary computers do exist.
|
||||
|
@ -27,7 +27,7 @@ represent as large a binary number as we need. We just need one switch for every
|
|||
digit we want to represent. The switches used in modern computers are so cheap
|
||||
and so small that billions can be fitted on a single circuit board.
|
||||
|
||||

|
||||

|
||||
|
||||
When we use the term 'switch' we actually mean the transistor components of a
|
||||
circuit. We don't need to know the physical details at this level but we can say
|
||||
|
|
|
@ -12,7 +12,7 @@ track of all [kernel](/Operating_Systems/The_Kernel.md) processes. It is
|
|||
invaluable when tracing the source of problems and errors that may arise on the
|
||||
system level. It keeps a track of all kernal processes.
|
||||
|
||||

|
||||

|
||||
|
||||
## `journalctl`
|
||||
|
||||
|
|
|
@ -77,13 +77,13 @@ at `/usr/lib/systemd/system`. You shouldn't change or manipulate these files or
|
|||
attempt to add new config files here since they will be overwritten by the
|
||||
system.
|
||||
|
||||
 _`systemd` global unit files_
|
||||
 _`systemd` global unit files_
|
||||
|
||||
Local definitions that relate to the specific user and where the user herself
|
||||
can define units are located in the _system configuration_ directory:
|
||||
`/etc/systemd/system`.
|
||||
|
||||

|
||||

|
||||
|
||||
_`systemd` local unit files, specific to the currently logged-in user_
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue