A bootstrap is a small strap or loop at the back of a leather boot that enables you to pull the entire boot on. In computers, to bootstrap (or "to boot") is to load a program into a computer using a much smaller initial program to load in the desired program (which is usually an operating system). In general usage, bootstrapping is the utilisation of a small initial effort into achieving something larger and more significant. There is also a common expression, "pulling yourself up by your own bootstraps", meaning to bring yourself success from a small beginning.

Impedance bootstrap

In amplifier circuits, there is a technique of bootstrapping which provides a higher impedance input. Here is a standard input stage without bootstrapping:
```---------+----------+------
|          |
|        R3/
R1/          /
/          +------------
|       | /
| |    |       |/
--| |----+-------|   TR1
| |    |       |\|
C1     |       |-\
|          |
|        +-+-+
R2/        |   |
/     C2---  /R4
|       ---  /
|        |   |
---------+--------+---+----
```
R1 and R2 here are bias resistors which set the correct operating voltage for TR1's base. C1 is a DC blocking capacitor, R3 is a load resistor, and R4 allows the emitter to be at a higher quiescent voltage. The purpose of C2 is to act as a decoupling capacitor to anchor TR1's emitter at a constant voltage, thus increasing the gain.

Instead of anchoring the emitter, an alternative is to encourage it to move in phase with the incoming signal. A way to achieve that is to use a form of positive feedback with a capacitor (C3 below). This greatly reduces the gain, but causes the input signal to see a much higher virtual impedance as C3 helps by supplying current to move the base in the same direction as the incoming signal.

```---------+----------+------
|          |
|        R3/
R1/          /
/          +------------
|       | /
| |    |       |/
--| |----+--+----|   TR1
| |    |  |    |\|
C1   R2/  |    |-\
/  | | |   |
|  +-| |---+
|    | |   |
|     C3   /R4
|          /
|          |
---------+----------+------
```

Hardware bootstrap

In the early days of computing, there were no PROMs, but there was still a need for the computer to know what to do when powered up. The hardware bootstrap comprised a circuit board with a set of diodes encoding the machine instructions that would be executed on power up (Marvin eat your heart out!). Making changes to the bootstrap involved a soldering iron.

Modern computers still go through the same process, but use firmware, of which BIOS is an example.

Software bootstrap

Once a computer has done it's hardware stuff, executed the instructions to read "block 0" of the disk, it is then down to the software bootstrap to take control of the machine, for instance, to decide which operating system to load.

The software bootstrap is not the full operating system, just the disk driver and enough supporting software to load the operating system. Usually, this will be a hardcoded piece of software tailor made for the disk drive.

Then, there is usually some generic loader software, a small part of the operating system - also a bootstrap - which loads the complete operating system. Lilo and Grub are examples of this type of bootstrap.

Compilers

You may have wondered how we managed to get such a range of programming language compilers for so many machines. The answer is through bootstrapping.

Let us say that we have an existing programming language X for a machine A. Let us also say that machine architecture A has been re-engineered, and we now have machine B.

However, given source code for the X compiler that runs on A, it is possible to build a cross compiler that can build code that will run on B. Also, assume that the X compiler is written in X. Now, we want to build some code to run on B, we can run A's cross compiler and produce B code.

Next, we can run the cross compiler over itself, and produce something that will run on B and make code for B - hey presto! Now machine A can be switched off.

A similar technique can be used to indroduce a new programming language.

Applications

Bootstrapping is an increasingly important concept as we achieve higher levels of sophistication. Other important present day applications include software installation, adaptive systems and neural networks.