Merge branch 'master' of github.com:thomasabishop/computer_science
This commit is contained in:
commit
d361d66dbf
5 changed files with 58 additions and 4 deletions
55
Electronics/Digital_Circuits/Half_adder_and_full_adder.md
Normal file
55
Electronics/Digital_Circuits/Half_adder_and_full_adder.md
Normal file
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
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 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 |
|
|
@ -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.
|
||||
|
|
@ -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.
|
||||
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue