-
+
+
- Serial buses are cheaper to implement than parallel buses
- Serial buses operate at greater [latency](/Computer_Architecture/Bus.md#latency) than parallel buses
diff --git a/Computer_Architecture/CPU/CPU_architecture.md b/Computer_Architecture/CPU/CPU_architecture.md
index 11b9f69..cab81fb 100644
--- a/Computer_Architecture/CPU/CPU_architecture.md
+++ b/Computer_Architecture/CPU/CPU_architecture.md
@@ -42,7 +42,7 @@ This is the heart of the CPU; all the other components on the CPU chip are appen
Below is a schematic of a series of logical circuits within the CPU core:
-
+
### Processor cores
@@ -74,6 +74,6 @@ Each "cycle" is the execution of a process that commences once the [kernel](/Ope
Hertz was the scientist who detected electromagentic waves and more broadly in science, we use Hertz to measure 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 increase as the number of cycles increases over time.
diff --git a/Computer_Architecture/CPU/The_Little_Man_computer.md b/Computer_Architecture/CPU/The_Little_Man_computer.md
index 02922b8..a17c93e 100644
--- a/Computer_Architecture/CPU/The_Little_Man_computer.md
+++ b/Computer_Architecture/CPU/The_Little_Man_computer.md
@@ -10,7 +10,7 @@ tags: [CPU, processors]
The [Little Man Computer](https://peterhigginson.co.uk/lmc/) is a simplified 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 on.
diff --git a/Computer_Architecture/Hardware_Description_Language.md b/Computer_Architecture/Hardware_Description_Language.md
new file mode 100644
index 0000000..b3cb55a
--- /dev/null
+++ b/Computer_Architecture/Hardware_Description_Language.md
@@ -0,0 +1,84 @@
+---
+categories:
+ - Computer Architecture
+ - Hardware
+tags: [HDL, nand-to-tetris]
+---
+
+# Hardware Description Language
+
+An HDL is a declarative programming language used to describe the behaviour or structure of [digital circuits](/Electronics_and_Hardware/Digital_circuits/Integrated_circuits.md). They are used to simulate the circuit and check its response.
+
+The hardware designer specifies a chip's logic by writing an HDL program which is then rigorously tested. At this stage, a [hardware simulator](/Computer_Architecture/Hardware_simulation.md) takes the HDL program as input and creates a software representation of the chip logic. The designer can instruct the simulator to test the virtual chip on various sets of inputs. This is done to check the chip's functionality but also to benchmark a variety of other parameters such as speed of computation and energy consumption.
+
+There are many HDLs but the most popular are VHDL ("very high speed integrated-circuit description language") and Verilog.
+
+## Usage in _NAND to Tetris_
+
+We won't use an actual HDL language, instead we will use a simplified toy language called HDL that is simple enough that when it is used with a simulator, we can learn the main facets of chip design. Its syntax is very similar to VHDL.
+
+## Demonstration of HDL program
+
+### Boolean function to enact
+
+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`):
+
+Here is our HDL file:
+
+```vhdl
+/* Xor gate
+ If a!=b out=1 else out=0
+*/
+CHIP Xor {
+ IN a, b;
+ OUT out;
+ PARTS:
+ Not (in=a, out=nota);
+ Not (in=b, out=notb);
+ And (a=a, b=notb, out=w1);
+ And (a=nota, b=b, out=w2);
+ Or (a=w1, b=w2, out=out)
+}
+```
+
+#### Interface (`CHIP, IN, OUT`)
+
+At the top level of the HDL program, the `CHIP` name and `IN`/`OUT` declaration is the _interface_ of the chip. Here we specify our naming convention for the `IN` and `OUT` values which we will refer to in the implementation declaration in `PARTS`.
+
+#### Implementation (`PARTS`)
+
+Everything under the `PARTS` section is the chip _implementation_. We can draw on composite gates in the `PARTS` declaration (e.g. `Not`, `And`, `Or`). The convention is to work from left to right when transcribing from a digital circuit diagram
+
+#### Pins
+
+In an HDL program we distinguish internal pins along with the standard [input and output pins](/Electronics_and_Hardware/Digital_circuits/Integrated_circuits.md). At the level of the interface, we are concerned only with input and output pins (in the example program these are `a`, `b` and `out`). It is at the level of the implementation that internal pins are encountered. In the example these are the connections between, e.g. the AND and NOT gates such as `And (a=a, b-notb, out=w1)`. This means the AND gate is receiving through its `a` pin the input `a` value and through its `b` pin the value of `b` inverted by a NOT. `out` is the value that is computed based on the input pins of `a` and `b`.
+
+### Test file (`Xor.tst`)
+
+Along with the HDL file we also create a test file. This runs the chip against the inputs we supply, these will typically be equivalent to the (left-hand) truth-values column in a truth table which is the same as the parameters passed to a [Boolean function](/Logic/Propositional_logic/Boolean_functions.md), for example:
+
+```vhdl
+load Xor.hdl
+output-list a, b, out;
+set a 0, set b 0, eval, output;
+set a 0, set b 1, eval, output;
+set a 1, set b 0, eval, output;
+set a 1, set b =, eval, output;
+```
+
+### Output file (`Xor.out`)
+
+When the test file is run against the HDL file it will generate an output file. This is effectively the result of the unit test. And will take the form of a truth table:
+
+```
+a | b | out
+-----------
+0 | 0 | 0
+0 | 1 | 1
+1 | 0 | 1
+1 | 1 | 0
+```
diff --git a/Computer_Architecture/Hardware_abstraction_and_modularity.md b/Computer_Architecture/Hardware_abstraction_and_modularity.md
index 33eed68..81fd361 100644
--- a/Computer_Architecture/Hardware_abstraction_and_modularity.md
+++ b/Computer_Architecture/Hardware_abstraction_and_modularity.md
@@ -2,7 +2,7 @@
categories:
- Computer Architecture
- Hardware
-tags: [abstraction, modules]
+tags: [abstraction, modules, nand-to-tetris]
---
# Hardware abstraction and modularity
@@ -24,4 +24,4 @@ When using a module as a building block you are to focus exclusively on the modu
The design of the diagram below emphasises the role of abstraction and modularity in the movement from transistors to chips:
-
+
diff --git a/Computer_Architecture/Hardware_simulation.md b/Computer_Architecture/Hardware_simulation.md
new file mode 100644
index 0000000..2d05168
--- /dev/null
+++ b/Computer_Architecture/Hardware_simulation.md
@@ -0,0 +1,57 @@
+---
+categories:
+ - Computer Architecture
+ - Hardware
+tags: [HDL, nand-to-tetris]
+---
+
+# Hardware simulation
+
+In order to test our [HDL](/Computer_Architecture/Hardware_Description_Language.md) files we load them into the hardware simulator program. We will demonstrate this with the following XOR implementation:
+
+
+
+There are several simulation options:
+
+- interactive
+- script-based (where we load a test script into the simulator along with the HDL file
+- comparative (running the HDL program against our intended output specified in the `.cmp` file)
+
+The use-cases for each mode are based on the complexity of the chip you are evaluating. For a small chip, interactive and script-based testing would be sufficient but for much larger components like an ALU a comparative approach would be more manageable and efficient.
+
+## Interactive
+
+The image below shows a basic interactive usage of the simulator. We have 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.
+
+
+
+## Script-based
+
+This time we have clicked the script icon to load `Xor.tst`. This loads the test script into the main GUI panel on the left. We can step through each line of the test file and we will see the pin values update in accordance with the test.
+
+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
+
+With a comparison-based approach to chip testing we run a comparison against the `.out` file that the simulator generates when running the HDL program against a `.cmp` comparison file that we provide. Both are simply truth-tables. For XOR if the program matched the comparison specification both `Xor.out` and `Xor.cmp` would look like the following:
+
+```
+a | b | out
+-----------
+0 | 0 | 0
+0 | 1 | 1
+1 | 0 | 1
+1 | 1 | 0
+```
+
+You don't have to do anything to apply the comparison since the compare file will already be loaded as part of the test file's set up:
+
+```vhdl
+load Xor.hdl
+output file Xor.out
+compare-to Xor.cmp
+output-list a, b, out;
+set ...
+```
diff --git a/Computer_Architecture/Memory/Memory.md b/Computer_Architecture/Memory/Memory.md
index 900b44a..1fc13f4 100644
--- a/Computer_Architecture/Memory/Memory.md
+++ b/Computer_Architecture/Memory/Memory.md
@@ -43,7 +43,7 @@ The table below details the relative speeds of the different types of memory and
The diagram below compares the different forms of memory within a computing device in terms of speed, monetary cost and capacity:
-
+
## References
diff --git a/Computer_Architecture/Memory/Role_of_memory_in_computation.md b/Computer_Architecture/Memory/Role_of_memory_in_computation.md
index 5dc7388..51bbd60 100644
--- a/Computer_Architecture/Memory/Role_of_memory_in_computation.md
+++ b/Computer_Architecture/Memory/Role_of_memory_in_computation.md
@@ -15,7 +15,7 @@ The following steps outline the way in which memory interacts with the processor
> This is a simplified account; it is not the case that only single requests are passed back and forth. This would be inefficient and time-wasting. The kernel 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 muliple CPU clock cycles.
diff --git a/Data_Structures/Queue.md b/Data_Structures/Queue.md
index c8e1cf0..3df2f75 100644
--- a/Data_Structures/Queue.md
+++ b/Data_Structures/Queue.md
@@ -8,7 +8,7 @@ tags:
_Visualization of the queue data structure_
-
+
## A queue is a sequential data structure and most similar to a stack
diff --git a/Data_Structures/Recursion.md b/Data_Structures/Recursion.md
index ee34ce4..6cdac93 100644
--- a/Data_Structures/Recursion.md
+++ b/Data_Structures/Recursion.md
@@ -13,7 +13,7 @@ More generally recursion means when a thing is defined in terms of itself. There
## Schema
The general structure of a recursive function is as follows:
-
+
## Why use recursive functions?
@@ -111,4 +111,4 @@ if (num > 0) {
}
```
-
+
diff --git a/Data_Structures/Stacks.md b/Data_Structures/Stacks.md
index 1805469..82169ac 100644
--- a/Data_Structures/Stacks.md
+++ b/Data_Structures/Stacks.md
@@ -6,10 +6,10 @@ tags:
---
_A stack visualised vertically_
-
+
_A stack visualised horizontally_
-
+
## A stack is a linear data structure that observes LIFO
diff --git a/Databases/GraphQL/Apollo/Apollo_Server.md b/Databases/GraphQL/Apollo/Apollo_Server.md
index 84f130c..8bb1ea1 100644
--- a/Databases/GraphQL/Apollo/Apollo_Server.md
+++ b/Databases/GraphQL/Apollo/Apollo_Server.md
@@ -72,7 +72,7 @@ server.listen().then(() => {
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.
diff --git a/Databases/GraphQL/Journey_of_GraphQL_query.md b/Databases/GraphQL/Journey_of_GraphQL_query.md
index 64c1122..2ddd1a3 100644
--- a/Databases/GraphQL/Journey_of_GraphQL_query.md
+++ b/Databases/GraphQL/Journey_of_GraphQL_query.md
@@ -6,4 +6,4 @@ tags: [graphql]
# The journey of a GraphQL query
-
+
diff --git a/Databases/GraphQL/Key_characteristics_of_GraphQL.md b/Databases/GraphQL/Key_characteristics_of_GraphQL.md
index 670c688..838a780 100644
--- a/Databases/GraphQL/Key_characteristics_of_GraphQL.md
+++ b/Databases/GraphQL/Key_characteristics_of_GraphQL.md
@@ -26,7 +26,7 @@ From the point of view of the backend, GraphQL is a **runtime** that provides a
Client requests are sent over HTTPS and the data is typically returned in the form of JSON:
-
+
## Implementation overview
@@ -83,15 +83,15 @@ With a REST API if you require multiple resources you have to make multiple requ
The REST scenario:
-
+
The GraphQL scenario:
-
+
### Abstraction of multiple services
-
+
### Stops overfetching
diff --git a/Databases/MongoDB/Adding_documents_to_a_collection.md b/Databases/MongoDB/Adding_documents_to_a_collection.md
index 5f104b1..d560cc9 100644
--- a/Databases/MongoDB/Adding_documents_to_a_collection.md
+++ b/Databases/MongoDB/Adding_documents_to_a_collection.md
@@ -44,4 +44,4 @@ When we run this, we call the `save` method on the Mongoose schema. We will then
This will also be reflected in Compass:
-
+
diff --git a/Databases/MongoDB/Create_database.md b/Databases/MongoDB/Create_database.md
index 1c6cc92..0cb16ff 100644
--- a/Databases/MongoDB/Create_database.md
+++ b/Databases/MongoDB/Create_database.md
@@ -25,4 +25,4 @@ This will run continuously in the terminal and should say somewhere that it is w
_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`.
-
+
diff --git a/Databases/MongoDB/Creating_a_schema_and_model.md b/Databases/MongoDB/Creating_a_schema_and_model.md
index ad94983..d45be46 100644
--- a/Databases/MongoDB/Creating_a_schema_and_model.md
+++ b/Databases/MongoDB/Creating_a_schema_and_model.md
@@ -61,10 +61,10 @@ 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:
-
+
diff --git a/Databases/MongoDB/Introduction.md b/Databases/MongoDB/Introduction.md
index f701ea4..2f693a7 100644
--- a/Databases/MongoDB/Introduction.md
+++ b/Databases/MongoDB/Introduction.md
@@ -16,4 +16,4 @@ Although Mongo is not a relational database it has a structure that we can under
A document is a container comprising key-value pairs in the manner of an object.
-
+
diff --git a/Databases/Relational_Databases/Relational_database_architecture.md b/Databases/Relational_Databases/Relational_database_architecture.md
index 7743cdb..8a21548 100644
--- a/Databases/Relational_Databases/Relational_database_architecture.md
+++ b/Databases/Relational_Databases/Relational_database_architecture.md
@@ -8,7 +8,7 @@ tags: [relational-database]
Tables, fields and records are the basic building blocks of databases
-
+
## Table
diff --git a/Databases/SQL/Joins_in_SQL.md b/Databases/SQL/Joins_in_SQL.md
index 3cdeb83..16db1fd 100644
--- a/Databases/SQL/Joins_in_SQL.md
+++ b/Databases/SQL/Joins_in_SQL.md
@@ -76,7 +76,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
@@ -118,7 +118,7 @@ In the context of our dataset, in the _sales_ database we have a row where there
The logical relationship sustained between `sales` and `model` by a left inner join is represented in the following diagram:
-
+
#### Implementation
@@ -153,7 +153,7 @@ In the context of our dataset, in the _model_ database we have a row where there
The logical relationship sustained between `sales` and `model` by a right inner join is represented in the following diagram:
-
+
#### Implementation
@@ -191,7 +191,7 @@ In the context of our dataset it would result in the following table being gener
Represented by the following diagram:
-
+
#### Implementation
diff --git a/Electronics_and_Hardware/Analogue_and_digital.md b/Electronics_and_Hardware/Analogue_and_digital.md
index 41fec29..27f18d2 100644
--- a/Electronics_and_Hardware/Analogue_and_digital.md
+++ b/Electronics_and_Hardware/Analogue_and_digital.md
@@ -9,7 +9,7 @@ tags: [analogue, digital]
Analogue and digital are paradigms for recording information, specifically information about an object or state that obtains in the world.
-
+
## Analogue
diff --git a/Electronics_and_Hardware/Analogue_circuits/Cells_and_batteries.md b/Electronics_and_Hardware/Analogue_circuits/Cells_and_batteries.md
index 6ab3a81..bdf3833 100644
--- a/Electronics_and_Hardware/Analogue_circuits/Cells_and_batteries.md
+++ b/Electronics_and_Hardware/Analogue_circuits/Cells_and_batteries.md
@@ -24,7 +24,7 @@ Cells and batteries can be connected to each other in electrical ciruits to incr
The table below summarises the relative differences:
-
+
### Series connections
@@ -43,11 +43,11 @@ 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 doesn't have many applications.
@@ -67,11 +67,11 @@ $$
_Parallel battery connection:_
-
+
_Parallel battery circuit diagram:_
-
+
### Series-parrallel
diff --git a/Electronics_and_Hardware/Analogue_circuits/Circuits.md b/Electronics_and_Hardware/Analogue_circuits/Circuits.md
index d9b251b..2a53a79 100644
--- a/Electronics_and_Hardware/Analogue_circuits/Circuits.md
+++ b/Electronics_and_Hardware/Analogue_circuits/Circuits.md
@@ -10,7 +10,7 @@ An electrical circuit is a set of electrical components connected in such a way
Below is a basic circuit representing a 9-volt [battery](/Electronics_and_Hardware/Analogue_circuits/Cells_and_batteries.md#cells-and-batteries) with a 10,000$\Omega$ [resistor](/Electronics_and_Hardware/Analogue_circuits/Resistance.md) attached 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
@@ -24,4 +24,4 @@ Sometimes circuits can be represented in a vertical manner rather than in an act
The circuit below is functionally identical to the previous circuit but represented vertically:
-
+
diff --git a/Electronics_and_Hardware/Analogue_circuits/Current.md b/Electronics_and_Hardware/Analogue_circuits/Current.md
index 5452c1b..4547806 100644
--- a/Electronics_and_Hardware/Analogue_circuits/Current.md
+++ b/Electronics_and_Hardware/Analogue_circuits/Current.md
@@ -22,7 +22,7 @@ When the terminals are connected to each other via a conductor (e.g. copper wire
_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 per second).
diff --git a/Electronics_and_Hardware/Analogue_circuits/Ground.md b/Electronics_and_Hardware/Analogue_circuits/Ground.md
index 7db5777..aa8954b 100644
--- a/Electronics_and_Hardware/Analogue_circuits/Ground.md
+++ b/Electronics_and_Hardware/Analogue_circuits/Ground.md
@@ -17,4 +17,4 @@ In circuit diagrams with simple DC current, ground is taken to be the negative t
The symbol for ground in circuit diagrams:
-
+
diff --git a/Electronics_and_Hardware/Analogue_circuits/LEDs.md b/Electronics_and_Hardware/Analogue_circuits/LEDs.md
index fba6a1e..6027624 100644
--- a/Electronics_and_Hardware/Analogue_circuits/LEDs.md
+++ b/Electronics_and_Hardware/Analogue_circuits/LEDs.md
@@ -8,10 +8,10 @@ tags: [electricity, electrical-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 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 [resistor](/Electronics_and_Hardware/Analogue_circuits/Resistance.md#resistors) must therefore be added to the circuit to ensure the current doesn't exeedd this amount.
diff --git a/Electronics_and_Hardware/Analogue_circuits/Voltage.md b/Electronics_and_Hardware/Analogue_circuits/Voltage.md
index 44f50da..2abd863 100644
--- a/Electronics_and_Hardware/Analogue_circuits/Voltage.md
+++ b/Electronics_and_Hardware/Analogue_circuits/Voltage.md
@@ -60,7 +60,7 @@ The relationship between voltage rise and voltage drop is expressed in Kirchoff'
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 the maximal voltage rise and minimal voltage drop, respectively.
diff --git a/Electronics_and_Hardware/Binary/Binary_arithmetic.md b/Electronics_and_Hardware/Binary/Binary_arithmetic.md
index 670413e..6ed6fa1 100644
--- a/Electronics_and_Hardware/Binary/Binary_arithmetic.md
+++ b/Electronics_and_Hardware/Binary/Binary_arithmetic.md
@@ -33,7 +33,7 @@ Let's break down each column from the right:
### More examples to practise with
-
+
## Binary multiplication
@@ -64,10 +64,10 @@ When we multiply binary numbers in columns we multiply each of the top numbers b
An important difference is that when we move along the bottom row from the $2^0$, to $2^2$, to $2^4$ etc we must put a zero in the preceding column as a place holder. The sequence is shown below:
-
+
-
+
-
+
-
+
diff --git a/Electronics_and_Hardware/Binary/Binary_colour_encoding.md b/Electronics_and_Hardware/Binary/Binary_colour_encoding.md
index 50c5077..6f76b56 100644
--- a/Electronics_and_Hardware/Binary/Binary_colour_encoding.md
+++ b/Electronics_and_Hardware/Binary/Binary_colour_encoding.md
@@ -16,7 +16,7 @@ We can start with a limited palette: greyscale. Here there is black and white an
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
@@ -28,12 +28,12 @@ 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
diff --git a/Electronics_and_Hardware/Binary/Binary_number_system.md b/Electronics_and_Hardware/Binary/Binary_number_system.md
index 94b4856..d55d53d 100644
--- a/Electronics_and_Hardware/Binary/Binary_number_system.md
+++ b/Electronics_and_Hardware/Binary/Binary_number_system.md
@@ -87,11 +87,11 @@ If we have before us the binary place values ($1, 2, 4, 8$). We know that 6 is e
More clearly:
-
+
And for comparison:
-
+
Or we can express the binary as:
@@ -105,4 +105,4 @@ $$ 2^1 + 2^2 $$
Let's convert 23 into binary:
-
+
diff --git a/Electronics_and_Hardware/Binary/Hexadecimal_number_system.md b/Electronics_and_Hardware/Binary/Hexadecimal_number_system.md
index f22d13a..8fae116 100644
--- a/Electronics_and_Hardware/Binary/Hexadecimal_number_system.md
+++ b/Electronics_and_Hardware/Binary/Hexadecimal_number_system.md
@@ -103,6 +103,6 @@ $$
= 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 symbols, a 16-bit number can be represented with four hex symbols, a 32-bit number can represented with eight hex symbols and so on.**
diff --git a/Electronics_and_Hardware/Binary/Signed_and_unsigned_numbers.md b/Electronics_and_Hardware/Binary/Signed_and_unsigned_numbers.md
index 9e7dcea..f83579d 100644
--- a/Electronics_and_Hardware/Binary/Signed_and_unsigned_numbers.md
+++ b/Electronics_and_Hardware/Binary/Signed_and_unsigned_numbers.md
@@ -19,11 +19,11 @@ For example the two's complement of $0101$ (binary 5) is $1011$. There is a simp
1. Take the unsigned number, and flip the bits. In other words: invert the 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:
-
+
### Advantages
@@ -66,7 +66,7 @@ Thus for a 4-bit number:
Then if we add the decimal equivalents of the place value together, we get our signed number. So in the case of $-3$:
-
+
## Considerations
diff --git a/Electronics_and_Hardware/Binary/Why_computers_use_binary.md b/Electronics_and_Hardware/Binary/Why_computers_use_binary.md
index 2dcbcaf..5bddfa4 100644
--- a/Electronics_and_Hardware/Binary/Why_computers_use_binary.md
+++ b/Electronics_and_Hardware/Binary/Why_computers_use_binary.md
@@ -13,13 +13,13 @@ tags: [binary, bits]
The reason is straight forward: it is the simplest way on the level of pure engineering of representing numerical and logical values; both of which are the basic foundations of programming. An electronic circuit or transistor only needs 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.
If we want more digits, we just need to add in more circuits, and we can 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 that a transistor turns a current on and off. They can also be used to amplify the current.
diff --git a/Electronics_and_Hardware/Digital_circuits/Clock_signals.md b/Electronics_and_Hardware/Digital_circuits/Clock_signals.md
index fa3758f..54320c2 100644
--- a/Electronics_and_Hardware/Digital_circuits/Clock_signals.md
+++ b/Electronics_and_Hardware/Digital_circuits/Clock_signals.md
@@ -10,28 +10,18 @@ tags: [binary, memory, clock, electromagnetism]
In the examples of digital circuits so far (i.e [adders](/Electronics_and_Hardware/Digital_circuits/Half_adder_and_full_adder.md) and [latches](/Electronics_and_Hardware/Digital_circuits/Latches.md)) everything happens in a single instant or over several repeated instances. This is because of how simple the circuits are. In the case of latches only a single bit is updated. And even with rippled adders they are just a series of 1-bit updaters in a chain.
-With more complex circuits that use multiple memory devices which store a series of bits at once, we need a way to ensure that the bits are set at the same time.
-
-We synchronize multiple circuit components with a **clock signal**.
-
-A clock signal alternates its voltage level from high to low on a regular cadence where it is high half the time and low the rest of the time. This gives the wave form a squared appearence.
-
+With more complex circuits that use multiple memory devices which store a series of bits at once, we need a way to ensure that the bits are set at theB
A single iteration of the volatage rising and falling is a **pulse**. A complete oscillation from low to high and back to low is a **cycle**. As with all [electromagnetic](/Electronics_and_Hardware/Physics_of_electricity/Electromagnetism.md) signals we measure the frequency of the wave in Hertz: cylcles per second. We also further distinguish the rising and falling edge of a pulse. Rising represents the signal passing from ground to its maximum voltage and falling is 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
- All components that need to be synchronised are connected to the clock
- State changes in the component occur only when a clock pulse occurs
-- Clock-driven components will typically trigger their state c| J | K | Clock | Q state | Operation |
-|--- |--- |------- |--------------------------- |----------- |
-| 0 | 0 | Pulse | Maintain previous value | Hold |
-| 0 | 1 | Pulse | 0 | Reset |
-| 1 | 0 | Pulse | 1 | Set |
-| 1 | 1 | Pulse | Inverse of previous value | Toggle |hanges on either the rising edge or the falling edge of the pulse.
+- | Clock-driven components will typically trigger their state changes on either the rising edge or the falling edge of the pulse. |
- Components that trigger state changes on the rising pulse are **positive edge-triggered**
- Components that trigger state changes on the falling pulse are **negative edge-triggered**
diff --git a/Electronics_and_Hardware/Digital_circuits/Creating_memory_with_NAND.md b/Electronics_and_Hardware/Digital_circuits/Creating_memory_with_NAND.md
index 59faaba..c6d9670 100644
--- a/Electronics_and_Hardware/Digital_circuits/Creating_memory_with_NAND.md
+++ b/Electronics_and_Hardware/Digital_circuits/Creating_memory_with_NAND.md
@@ -11,7 +11,7 @@ tags: [logic-gates, binary, memory]
The [logic circuit](/Electronics_and_Hardware/Digital_circuits/Digital_circuits.md) 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:
@@ -35,7 +35,7 @@ Interactive version of circuit:
> Upshot: With **S** `ON`, output is the same as input
-
+
### Second state: both S and I `ON`
@@ -48,7 +48,7 @@ Interactive version of circuit:
> 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.
@@ -60,4 +60,4 @@ The specific reason for this is that, if **S** is `OFF`, both **A** and **B** ar
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**.
-
+
diff --git a/Electronics_and_Hardware/Digital_circuits/Flip_flops.md b/Electronics_and_Hardware/Digital_circuits/Flip_flops.md
index 260cc12..02d053a 100644
--- a/Electronics_and_Hardware/Digital_circuits/Flip_flops.md
+++ b/Electronics_and_Hardware/Digital_circuits/Flip_flops.md
@@ -28,7 +28,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:
-
+
@@ -43,7 +43,7 @@ Thus the state table for the T Flip-Flop is:
| 0 | Pulse | Maintain previous value | Hold |
| 0 | Pulse | Inverse of previous value | Toggle |
-
+
diff --git a/Electronics_and_Hardware/Digital_circuits/Four_bit_adder.md b/Electronics_and_Hardware/Digital_circuits/Four_bit_adder.md
index 003a210..17c90ee 100644
--- a/Electronics_and_Hardware/Digital_circuits/Four_bit_adder.md
+++ b/Electronics_and_Hardware/Digital_circuits/Four_bit_adder.md
@@ -22,7 +22,7 @@ We will achieve this by using three full adders and one half adder, moving from
Let's walk through the process:
-
+
1. HA receives the bits $0$ and $1$ as inputs. It outputs $1$ as the sum bit and $0$ as the carry-out.
2. FA1 receives $0$ as the carry-in bit plus $1$ and $1$ as its input. This means it has the following calculation to execute: $1 + 1 + 0$. This gives $0$ as the sum bit and $1$ as the carry-out bit.
diff --git a/Electronics_and_Hardware/Digital_circuits/Half_adder_and_full_adder.md b/Electronics_and_Hardware/Digital_circuits/Half_adder_and_full_adder.md
index 1a1dd67..80e7670 100644
--- a/Electronics_and_Hardware/Digital_circuits/Half_adder_and_full_adder.md
+++ b/Electronics_and_Hardware/Digital_circuits/Half_adder_and_full_adder.md
@@ -50,7 +50,7 @@ The half adder receives two bits (A and B) which are to be added together. It ou
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
@@ -88,7 +88,7 @@ And the carry-out bit replicates the truth conditions of [AND](/Electronics_and_
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.
@@ -104,7 +104,7 @@ The full adder takes in three inputs and has two outputs. It is identical to the
| ---------------------------- | ----------------------------- | ------------------------ | ---------------------- | ---------------------------- |
| 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 a carry) and then adds this together with its own inputs ($0$ and $0$).
diff --git a/Electronics_and_Hardware/Digital_circuits/Integrated_circuits.md b/Electronics_and_Hardware/Digital_circuits/Integrated_circuits.md
index 80f844e..4c6e7c2 100644
--- a/Electronics_and_Hardware/Digital_circuits/Integrated_circuits.md
+++ b/Electronics_and_Hardware/Digital_circuits/Integrated_circuits.md
@@ -10,11 +10,13 @@ tags: [logic-gates]
An integrated circuit (IC) is a single unit that comprises several logic gates designed for the easy construction of [digital circuits](/Electronics_and_Hardware/Digital_circuits/Digital_circuits.md). The terms "integrated circuit" and "chip" are often used interchangeably.
-An IC puts the gates on a single piece of silicon that has electrical contact points called pins. The type we will look at are called **dual in-line packages** (DIPs). They are rectangular wth two parallel rows of pins. The pins make it easy to connect DIPs to a breadboard.
+An IC puts the gates on a single piece of silicon that has electrical contact points called pins. There are two types of pins on an IC: input pins and output pins. Input pins are used to receive signals from other components in the circuit, while output pins are used to send signals to other components. The function of a pin is determined by the connection it has to the rest of the circuit and the type of signal it is intended to transmit or receive.
+
+The type we will look at are called **dual in-line packages** (DIPs). They are rectangular wth two parallel rows of pins. The pins make it easy to connect DIPs to a breadboard.
_An integrated circuit and its use on a breadboard:_
-
-
+
+
// TODO: Add diagrams of different IC gate types
diff --git a/Electronics_and_Hardware/Digital_circuits/Latches.md b/Electronics_and_Hardware/Digital_circuits/Latches.md
index d77f841..ef68754 100644
--- a/Electronics_and_Hardware/Digital_circuits/Latches.md
+++ b/Electronics_and_Hardware/Digital_circuits/Latches.md
@@ -27,12 +27,9 @@ The SR Latch goes through the following state changes:
This is represented more clearly in the table below:
-| S | R | Q | Operation |
-| --- | --- | ----------------------- | ------------- |
-| 0 | 0 | Maintain previous value | Hold |
-| 0 | 1 | 0 | Reset |
-| 1 | 0 | 1 | Set |
-| 1 | 1 | X | Invalid, null |
+| S | R | Q | Operation |
+| --- | --- | ----------------------- | --------- |
+| 1 | 1 | X | Invalid, null |
The most succinct account of a latch:
@@ -40,7 +37,7 @@ The most succinct account of a latch:
_The representation of an SR Latch in a digital circuit diagram_:
-
+
## Creating a latch circuit
@@ -50,7 +47,7 @@ The two gates are in a **cross-coupled configuration**. This basically means tha
The circuit is created as follows:
-
+
Interactive version:
diff --git a/Electronics_and_Hardware/Digital_circuits/Logic_gates.md b/Electronics_and_Hardware/Digital_circuits/Logic_gates.md
index f88db6a..c5f2a11 100644
--- a/Electronics_and_Hardware/Digital_circuits/Logic_gates.md
+++ b/Electronics_and_Hardware/Digital_circuits/Logic_gates.md
@@ -8,10 +8,33 @@ tags: [logic-gates, binary]
# Logic gates
-> [A logic gate consists in] three connections where there may or may not be some electricity. Two of those connections are places where electricity may be put into the device, and the third connection is a place where electricity may come out of the device. (Scott, 2009 p.21)
+> [A logic gate consists in] three connections where there may or may not be some electricity. Two of those connections are places where electricity may be put into the device, and the third connection is a place where electricity may come out of the device.
-Logic gates are the basic building blocks of digital computing. **A logic gate is an electrical circuit that has one or more than one input and only one output.** The input controls the output and the logic determining which types of input (on/off) lead to specific outputs (on/off) is identical to the truth-conditions of the [Boolean connectives](/Logic/Truth-functional_connectives.md) specifiable in terms of [truth-tables](/Logic/Truth-tables.md).
-Physically, what 'travels through' the gates is electrical current and what constitutes the 'gate' is a [transistor](/Electronics_and_Hardware/Digital_circuits/Transistors.md) responding to the current. At the next level of abstraction it is bits that go into the gate and bits which come out: binary information that may be either 1 or 0.
+[J.C. Scott. 2009. **But How Do It Know? The Basics of Computers for Everyone**, 21]
+
+Logic gates are the basic building blocks of digital computing. **A logic gate is an electrical circuit that has one or more than one input and only one output.** The input and output points of the gate are [pins](/Electronics_and_Hardware/Digital_circuits/Integrated_circuits.md) The input controls the output and the logic determining which types of input (on/off) lead to specific outputs (on/off) is isomorphic with the truth-conditions of the [Boolean connectives](/Logic/Truth-functional_connectives.md) specifiable in terms of [truth tables](/Logic/Truth-tables.md).
+
+Physically, what 'travels through' the gates is electrical current and what constitutes the 'gate' is a [transistor](/Electronics_and_Hardware/Digital_circuits/Transistors.md) responding to the current. Going up a level of abstraction, the current/ charge is identified with a [bit](/Electronics_and_Hardware/Binary/Binary_units_of_measurement.md#binary-units-of-measurement). It is bits that go into the gate and bits which come out: binary information that may be either 1 or 0.
+
+## Elementary and composite gates
+
+We distinguish elementary from composite logic gates. An elementary gate is a single gate embodying a single logical connective. It cannot be reduced any lower as a logical abstraction. A composite gate is a gate made up of more than one elementary gate and/or other composite gates.
+
+An example of a composite gate would be a three-way AND. An AND with three inputs rather than the standard two that furnish the elementary AND gate. This gate would output 1 when all three gates have the value 1 and 0 otherwise. [Adders](/Electronics_and_Hardware/Digital_circuits/Half_adder_and_full_adder.md) and [latches](/Electronics_and_Hardware/Digital_circuits/Latches.md) whilst being [integrated circuits](/Electronics_and_Hardware/Digital_circuits/Integrated_circuits.md) are also, technically speaking, composite gates.
+
+## Gate interface / gate implementation
+
+The gate _interface_ is an abstraction that the enables the user to think of the gate simply in terms of inputs and outputs, without being concerned with the technical details of how this is achieved. How it is achieved is the gate _implementation_.
+
+We can demonstrate this with the earlier example of a three-way AND. The diagram below represents the gate as an interface:
+
+// TODO: Interface diagram
+
+Whereas this diagram presents the implementation of the gate: it shows the specific combination of gates which creates the enables the behaviour represented in the interface diagram.
+
+// TODO: Implementation diagram
+
+> Importantly, a single interface may be implemented in a variety of ways. There is a one-to-many relationship at work here. From the point of view of the user interface these differences should not be detectable. This is another example of [hardware abstraction](/Computer_Architecture/Hardware_abstraction_and_modularity.md)
## NOT gate
@@ -19,55 +42,61 @@ Physically, what 'travels through' the gates is electrical current and what cons
### Symbol
-
+
### Truth conditions
-| P | ~ P |
-| --- | --- |
-| T | F |
-| F | T |
+| $P$ | $\lnot P$ |
+| --- | --------- |
+| 1 | 0 |
+| 0 | 1 |
### Interactive circuit
+
+
## AND gate
> The AND gate represents the truth conditions of the [conjunction](/Logic/Truth-functional_connectives.md#conjunction) truth functional connective
### Symbol
-
+
### Truth conditions
-| P | Q | P & Q |
-| --- | --- | ----- |
-| T | T | T |
-| T | F | F |
-| F | T | F |
-| F | F | F |
+| $P$ | $Q$ | $P \land Q$ |
+| --- | --- | ----------- |
+| 1 | 1 | 1 |
+| 1 | 0 | 0 |
+| 0 | 0 | 0 |
+| 0 | 0 | 0 |
### Interactive circuit
+
+
## NAND gate
> The NAND gate inverts the truth conditions of AND.
### Symbol
-
+
### Truth conditions
-| P | Q | ~(P & Q) |
-| --- | --- | -------- |
-| T | T | F |
-| T | F | F |
-| F | T | F |
-| F | F | T |
+| $P$ | $Q$ | $\lnot(P \land Q)$ |
+| --- | --- | ------------------ |
+| 1 | 1 | 0 |
+| 1 | 0 | 0 |
+| 0 | 1 | 0 |
+| 0 | 0 | 1 |
### Interactive circuit
+
+
NAND is a **universal logic gate**: equipped with just a NAND we can represent every other possible logical condition. In practice with circuits, it is more efficient to use specific dedicated gates (i.e OR, AND, NOT etc) for the other Boolean connectives but in principle the same output can be achieved through NANDs alone.
## OR gate
@@ -76,57 +105,59 @@ NAND is a **universal logic gate**: equipped with just a NAND we can represent e
### Symbol
-
+
### Truth conditions
-| P | Q | P v Q |
-| --- | --- | ----- |
-| T | T | T |
-| T | F | T |
-| F | T | T |
-| F | F | F |
+| $P$ | $Q$ | $P \lor Q$ |
+| --- | --- | ---------- |
+| 1 | 1 | 1 |
+| 1 | 0 | 1 |
+| 0 | 1 | 1 |
+| 0 | 0 | 0 |
### Interactive circuit
+
+
## XOR gate
> The OR gate represents the truth conditions of the exclusive OR
### Symbol
-
+
### Truth conditions
-| P | Q | ~(P <> Q) |
-| --- | --- | --------- |
-| T | T | F |
-| T | F | T |
-| F | T | T |
-| F | F | F |
+| $P$ | $Q$ | $\lnot(P \Leftrightarrow Q)$ |
+| --- | --- | ---------------------------- |
+| 1 | 1 | 0 |
+| 1 | 0 | 1 |
+| 0 | 1 | 1 |
+| 0 | 0 | 0 |
### Interactive circuit
+
+
## NOR gate
> The NOR gate inverts the function of an OR gate
### Symbol
-
+
### Truth conditions
-| P | Q | P v Q |
-| --- | --- | ----- |
-| T | T | F |
-| T | F | F |
-| F | T | F |
-| F | F | T |
+| $P$ | $Q$ | $P \lor Q$ |
+| --- | --- | ---------- |
+| 1 | 1 | 0 |
+| 1 | 0 | 0 |
+| 0 | 1 | 0 |
+| 0 | 0 | 1 |
### Interactive circuit
-## References
-
-Scott, J. Clark. 2009. _But how do it know?: the basic principles of computers for everyone_. Self-published.
+
diff --git a/Electronics_and_Hardware/Digital_circuits/Multiplexers_and_demultiplexers.md b/Electronics_and_Hardware/Digital_circuits/Multiplexers_and_demultiplexers.md
new file mode 100644
index 0000000..2710a72
--- /dev/null
+++ b/Electronics_and_Hardware/Digital_circuits/Multiplexers_and_demultiplexers.md
@@ -0,0 +1,32 @@
+---
+categories:
+ - Electronics
+ - Hardware
+tags: [logic-gates, binary, nand-to-tetris]
+---
+
+# Multiplexers (MUX) and demultiplexers (DMUX)
+
+## Multiplexer
+
+> Multiplexing is the generic term used to describe the operation of sending one or more analogue or digital signals over a common transmission line at different times or speeds.
+
+A multiplexer selects one of several input signals and forwards ths selected 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 selection and switching in digital systems
+
+// TODO: Add component diagram
+
+### Programable gates
+
+One of the main use cases of multiplexers is to implement programmable gates. These are gates where the logic can be switched. For example an ANDMUXOR gate uses the SEL value to toggle the operation of a gate between AND and OR for its two inputs A and B
+
+## Demultiplexer
+
+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.
+
+// TODO: Add component diagram
diff --git a/Electronics_and_Hardware/Digital_circuits/Three_bit_counter.md b/Electronics_and_Hardware/Digital_circuits/Three_bit_counter.md
index 65d2636..9b1e373 100644
--- a/Electronics_and_Hardware/Digital_circuits/Three_bit_counter.md
+++ b/Electronics_and_Hardware/Digital_circuits/Three_bit_counter.md
@@ -44,7 +44,7 @@ If we look at the pattern of each flip-flops' output we notice the following:
This means that to construct a circuit that displays this behaviour we just have to use a [T flip-flop](/Electronics_and_Hardware/Digital_circuits/Flip_flops.md#t-flip-flops) 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:
-
+
diff --git a/Electronics_and_Hardware/Digital_circuits/Transistors.md b/Electronics_and_Hardware/Digital_circuits/Transistors.md
index 2f350db..8df94c3 100644
--- a/Electronics_and_Hardware/Digital_circuits/Transistors.md
+++ b/Electronics_and_Hardware/Digital_circuits/Transistors.md
@@ -16,11 +16,11 @@ An electrical switch is inherently binary. When the switch is on, it acts like a
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 both switches are off.
@@ -32,15 +32,15 @@ Thus instead of switches, modern digital circuits use transistors, a special ele
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 back to switches, applying current to the base is like turning the switch on. 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 transistor is in the 'on' state and low otherwise
@@ -60,8 +60,8 @@ With the basic element of the transistor established, we can combine transistors
For example to create an [AND](/Electronics_and_Hardware/Digital_circuits/Logic_gates.md#and-gate) gate we would have two voltage inputs going into two transistors that are connected in sequence. The two transistors create a continuous line going from the 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.
-
+
diff --git a/Electronics_and_Hardware/Motherboard.md b/Electronics_and_Hardware/Motherboard.md
index c980d50..b55bb54 100644
--- a/Electronics_and_Hardware/Motherboard.md
+++ b/Electronics_and_Hardware/Motherboard.md
@@ -7,7 +7,7 @@ tags: [motherboard]
# Motherboard
-
+
The motherboard is the foundation of a computer. It allocates power and allows communication to and between the [CPU](/Computer_Architecture/CPU/Von_Neumann_architecture.md), [RAM](/Computer_Architecture/Memory/Memory.md), [harddisk](/Operating_Systems/Disks/What_are_disks.md) and all other hardware components.
diff --git a/Electronics_and_Hardware/Physics_of_electricity/Electromagnetism.md b/Electronics_and_Hardware/Physics_of_electricity/Electromagnetism.md
index 7a2abe0..267f4d2 100644
--- a/Electronics_and_Hardware/Physics_of_electricity/Electromagnetism.md
+++ b/Electronics_and_Hardware/Physics_of_electricity/Electromagnetism.md
@@ -32,7 +32,7 @@ Magnetism, understood as the effect of a magnetic field, arises from the propert
As they spin they produce a **magnetic dipole**: the two poles noted above. We 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 materials an overall majority of electrons spin in one particular direction**. This breaks the equilibrium and produces the magnetic field.
@@ -72,7 +72,7 @@ The magnetic field and force is more complex than the electric field/force. Wher
This is illustrated below which shows the magnetic field operating at right angles to the flow of charge within a wire.
-
+
## The electromagnetic field
@@ -101,7 +101,7 @@ Maxwell's Equations describe how electromagnetic fields are generated and behave
Electromagnetic waves consist of rapidly changing electric and magnetic fields. They are emitted any time an electrically charged particle accelerates. These waves are generally referred to as light. However, more accurately, 'light' refers to the types of electromagnetic wave that we can see. Electromagnetic 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
@@ -109,7 +109,7 @@ The image below shows the propagation of an electromagnetic wave through space.
- The magenetic field is perpendicular to the vector of the electric field $E$ which propagates upward along the $y$ axis
- The directionality of both waves is forward along the $x$ axis
-
+
## Using magnetism to generate electricity
diff --git a/Electronics_and_Hardware/Physics_of_electricity/Electrons.md b/Electronics_and_Hardware/Physics_of_electricity/Electrons.md
index 70ab6f5..8295448 100644
--- a/Electronics_and_Hardware/Physics_of_electricity/Electrons.md
+++ b/Electronics_and_Hardware/Physics_of_electricity/Electrons.md
@@ -14,7 +14,7 @@ Each shell can accomodate a maximum number of electrons. The shells are designat
_The diagram below demonstrates shell naming conventions and the maximum number of electrons per shell._
-
+
## Valence
diff --git a/Electronics_and_Hardware/Physics_of_electricity/Matter_and_atoms.md b/Electronics_and_Hardware/Physics_of_electricity/Matter_and_atoms.md
index 75a90b8..7b60cf9 100644
--- a/Electronics_and_Hardware/Physics_of_electricity/Matter_and_atoms.md
+++ b/Electronics_and_Hardware/Physics_of_electricity/Matter_and_atoms.md
@@ -22,7 +22,7 @@ tags: [physics]
## Atomic particles
-