From 651e76022136ab1323b0a2ccb3c70c0c5bf3330d Mon Sep 17 00:00:00 2001 From: tactonbishop Date: Mon, 28 Nov 2022 07:00:05 +0000 Subject: [PATCH 1/3] Last Sync: 2022-11-28 07:00:05 --- Electronics/{ => Digital_Circuits}/Digital_circuits.md | 0 Electronics/Digital_Circuits/Half_adder.md | 7 +++++++ Electronics/{ => Digital_Circuits}/Integrated_circuits.md | 2 +- Electronics/{ => Digital_Circuits}/Transistors.md | 3 +-- 4 files changed, 9 insertions(+), 3 deletions(-) rename Electronics/{ => Digital_Circuits}/Digital_circuits.md (100%) create mode 100644 Electronics/Digital_Circuits/Half_adder.md rename Electronics/{ => Digital_Circuits}/Integrated_circuits.md (85%) rename Electronics/{ => Digital_Circuits}/Transistors.md (88%) diff --git a/Electronics/Digital_circuits.md b/Electronics/Digital_Circuits/Digital_circuits.md similarity index 100% rename from Electronics/Digital_circuits.md rename to Electronics/Digital_Circuits/Digital_circuits.md diff --git a/Electronics/Digital_Circuits/Half_adder.md b/Electronics/Digital_Circuits/Half_adder.md new file mode 100644 index 0000000..9e307ea --- /dev/null +++ b/Electronics/Digital_Circuits/Half_adder.md @@ -0,0 +1,7 @@ +--- +categories: + - Electronics +tags: [logic-gates, binary] +--- + +# Half adder diff --git a/Electronics/Integrated_circuits.md b/Electronics/Digital_Circuits/Integrated_circuits.md similarity index 85% rename from Electronics/Integrated_circuits.md rename to Electronics/Digital_Circuits/Integrated_circuits.md index 61c05a9..5e2aaa3 100644 --- a/Electronics/Integrated_circuits.md +++ b/Electronics/Digital_Circuits/Integrated_circuits.md @@ -8,7 +8,7 @@ tags: [logic-gates] # Integrated circuits -An integrated circuit (IC) is a single unit that comprises several logic gates designed for the easy construction of [digital circuits](/Electronics/Digital_circuits.md). The terms "integrated circuit" and "chip" are often used interchangeably. +An integrated circuit (IC) is a single unit that comprises several logic gates designed for the easy construction of [digital circuits](/Electronics/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. diff --git a/Electronics/Transistors.md b/Electronics/Digital_Circuits/Transistors.md similarity index 88% rename from Electronics/Transistors.md rename to Electronics/Digital_Circuits/Transistors.md index 108f22a..63e2d45 100644 --- a/Electronics/Transistors.md +++ b/Electronics/Digital_Circuits/Transistors.md @@ -1,7 +1,6 @@ --- title: Transistors categories: - - Computer Architecture - Electronics - Hardware tags: [logic-gates, binary, memory] @@ -9,7 +8,7 @@ tags: [logic-gates, binary, memory] # Transistors -In the discussion of [digital circuits](/Electronics/Digital_circuits.md) we noted that a digital circuit requires that electrical phenomena be treated as discrete rather than continuous values. Although a given voltage at a point in the circuit can vary widely, in order to represent the binary states of 'on' and 'off' we need it to remain fixed within certain narrow parameters. Typically a voltage between 2V - 5V for the 'on' state and a voltage between 0V - 0.8V for the 'off' state. +In the discussion of [digital circuits](/Electronics/Digital_Circuits/Digital_circuits.md) we noted that a digital circuit requires that electrical phenomena be treated as discrete rather than continuous values. Although a given voltage at a point in the circuit can vary widely, in order to represent the binary states of 'on' and 'off' we need it to remain fixed within certain narrow parameters. Typically a voltage between 2V - 5V for the 'on' state and a voltage between 0V - 0.8V for the 'off' state. We will look at two ways to achieve this. Firstly with literal switches which are impractical but useful for understanding the concept and then with transistors which are what are actually used in computers. From 1a40b1ebe4a052b15e3d0aec5476eaf34f827ba2 Mon Sep 17 00:00:00 2001 From: tactonbishop Date: Mon, 28 Nov 2022 07:30:04 +0000 Subject: [PATCH 2/3] Last Sync: 2022-11-28 07:30:04 --- Electronics/Digital_Circuits/Half_adder.md | 7 ------- .../Digital_Circuits/Half_adder_and_full_adder.md | 11 +++++++++++ Hardware/Logic_Gates/Logic_gates.md | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) delete mode 100644 Electronics/Digital_Circuits/Half_adder.md create mode 100644 Electronics/Digital_Circuits/Half_adder_and_full_adder.md diff --git a/Electronics/Digital_Circuits/Half_adder.md b/Electronics/Digital_Circuits/Half_adder.md deleted file mode 100644 index 9e307ea..0000000 --- a/Electronics/Digital_Circuits/Half_adder.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -categories: - - Electronics -tags: [logic-gates, binary] ---- - -# Half adder diff --git a/Electronics/Digital_Circuits/Half_adder_and_full_adder.md b/Electronics/Digital_Circuits/Half_adder_and_full_adder.md new file mode 100644 index 0000000..43ce335 --- /dev/null +++ b/Electronics/Digital_Circuits/Half_adder_and_full_adder.md @@ -0,0 +1,11 @@ +--- +categories: + - Electronics +tags: [logic-gates, binary] +--- + +# The half adder and full adder + +## Binary arithmetic + +The half adder and full adder are components of digital circuits that enable us to carry out binary addition. Using adders and half adders we can add two binary numbers together. Adders are abstractions over [logic gates](/Hardware/Logic_Gates/Logic_gates.md) diff --git a/Hardware/Logic_Gates/Logic_gates.md b/Hardware/Logic_Gates/Logic_gates.md index 5ec3a47..0e696d1 100644 --- a/Hardware/Logic_Gates/Logic_gates.md +++ b/Hardware/Logic_Gates/Logic_gates.md @@ -11,7 +11,7 @@ tags: [logic-gates, binary] > [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) 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 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. +Physically, what 'travels through' the gates is electrical current and what constitutes the 'gate' is a [transistor](/Electronics/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. ## References From 052d20c45064efdc2fe3b1e0e050316c14d5d495 Mon Sep 17 00:00:00 2001 From: tactonbishop Date: Mon, 28 Nov 2022 07:53:02 +0000 Subject: [PATCH 3/3] Last Sync: 2022-11-28 07:53:02 --- .../Half_adder_and_full_adder.md | 46 ++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/Electronics/Digital_Circuits/Half_adder_and_full_adder.md b/Electronics/Digital_Circuits/Half_adder_and_full_adder.md index 43ce335..dd80faf 100644 --- a/Electronics/Digital_Circuits/Half_adder_and_full_adder.md +++ b/Electronics/Digital_Circuits/Half_adder_and_full_adder.md @@ -8,4 +8,48 @@ tags: [logic-gates, binary] ## Binary arithmetic -The half adder and full adder are components of digital circuits that enable us to carry out binary addition. Using adders and half adders we can add two binary numbers together. Adders are abstractions over [logic gates](/Hardware/Logic_Gates/Logic_gates.md) +The half adder and full adder are components of digital circuits that enable us to carry out binary addition. Using adders and half adders we can add two binary numbers together. Adders are a type of [integrated circuit]() comprising certain [logic gates](/Hardware/Logic_Gates/Logic_gates.md) where the arrangement allows for the representation of the addition of bits. + +### Example addition + +Consider the following binary addition: + +``` + c_1 +0 0 1 0 +0 0 1 1 +_____________ +0 1 0 1 +``` + +How does the calculation proceed? Moving from the right-most column: + +- $1 + 0 = 1$ hence the sum of the first column (the binary 1 coumn) is $1$ with no carry +- Moving to the second column (the binary 2 column), $1 + 1 = 2$ however we do not have the digit "2" in binary, therefore we must bump the place value by one place and carry this sum as a $1$ leaving a zero to mark the place value +- Thus the third column (the binary 4 column) has the calculation: $1 + 0 + 0 = 1$ with no carry. + +### Bits + +From the previous example we can identified the following repeated actions: + +- For calculations of the form $1 + 0$ or $0 + 0$ there will be no carried digit +- For calculations of the form $1 + 1$ there will be a carried digit + +In the context of adders the digits are bits. We distinguish the **least significant bit** and **most significant bit**. The least significant bit is the right-most digit in the calculation. The most significant bit is the leftmost: + +// TODO: Add diagram highlighting least and most significant bits. + +The two types of adders are distinguished by which bits of the calculation they operate on. The half adder focuses on the least significant bit whereas the full adder focuses on the most significant bit. + +## Half adder + +The symbol for the half adder is displayed below + +// TODO: Add diagram of half adder + +It has two inputs and two ouputs: + +| Input | Input | Output | Output | +| ---------------------------- | ----------------------------- | ----------- | ----------------- | +| A | B | S | C_out | +| The first number to be added | The second number to be added | The sum bit | The carry-out bit |