1 EARLY COMPUTING
Each new calculating device made something that was previously laborious to calculate much faster, easier
and often more accurate. It lowered the barrier to entry and at the same time, amplified our mental abilities.
Charles Babbage, Early computer pioneer: At each increase of knowledge, as well as on the contrivance of
new tool, human labour becomes abridged.
Earliest documented use of the word “computer” is from 1613, in a book by Richard Braithwait and it was a
job title.
Gottfried Leibniz, Built the Step Reckoner in 1694: It is beneath the dignity of excellent men to waste their
time in calculation when any peasant could do the work just as accurately with the aid of a machine.
The Step Reckoner was the first machine that could do all 4 math operations. The design was used for the
next 3 centuries of calculator design.
Charles Babbage proposed a new mechanical device called the Difference Engine, a much more complex
machine that could approximate polynomials, which describe the relationship between several variables and
approximate logarithmic and trigonometric functions. He started construction in 1823. The project was
ultimately abandoned. But in 1991, historians finished constructing it based on his designs.
While building the Difference Engine, he imagined an even more complex machine, the Analytical Engine,
which was a general purpose computer. It could be used for more than just one particular computation and
could be given data and run operations in sequence. It had memory and a primitive printer.
English mathematician Ada Lovelace wrote hypothetical programs for the Analytical Engine: A new, a vast
and a powerful language is developed for the future use of analysis. She is often considered the world’s first
programmer.
The Analytical Engine inspired the first generation of computer scientists who incorporated many of
Babbage’s ideas in their machines. Babbage is considered the father of computing.
Herman Hollerith built a tabulating machine, electro-mechanical, which helped the US government in their
census. He then founded The Tabulating Machine Company, which later merged with other machine makers
in 1924 to become The International Business Machines Corporation (IBM).
2 ELECTRONIC COMPUTING
One of the largest electro-mechanical computers built was the Harvard Market I, completed in 1944 by IBM
for the Allies during WW2. This technology was used to run simulations for the Manhattan Project.
o It attracted insects. Thus, Grace Hopper: From then on, when anything went wrong with a computer,
we said it had bugs in it.
Vacuum tubes allowed for the shift from electro-mechanical computing to electronic computing.
Colossus is regarded as the first programmable, electronic computer. Programming was done by plugging
hundreds of wires into plugboards in order to set up the computer to perform the right operations. So while
programmable, it still had to be configured to perform any specific computation.
ENIAC (Electronic Numerical Integrator And Calculator) completed in 1946 at the University of Pennsylvania
and designed by John Mauchly and J. Presper Eckert, was the world’s first truly general purpose,
programmable and electronic computer.
o It can perform 5000 ten-digit additions/subtractions per second.
o With many vacuum tubes, failures were common and it was generally only operational for only half a
day at a time before breaking down.
The invention of transistor leads to dramatically smaller and cheaper computers, like the IBM 608, released
in 1957.
3 BOOLEAN LOGIC & LOGIC GATES
Binary system: In computers, an “on” state, when electricity is flowing, represents true. The “off” state, no
electricity flowing, represents false.
The more intermediate states there are, the harder it is to keep them all separate and prevent them mixing
up. Thus, placing two signals as far apart as possible, using just on and off, gives a distinct signal to minimise
these issues.
4 BINARY
8-bit computers/graphics/audio do most of their operations in chunks of 8 bits. They are limited to 256
colours etc. It is so common, 8-bit is called a byte.
32-bit/64-bit computers operates in chunks of 32/64 bits. The largest number that can be represented with
32 bits is ~4.3billion
To represent positive and negative numbers, computers use the first bit for the sign: 1 for negative and 0 for
positive. Therefore, there are 31 bits for the number itself which is +/- ~2 billion
The largest number that can be represented with 64 bit is ~9.2 quintillion.
Computers must label locations in their memory known as addresses, in order to store or retrieve values.
Computers also deal with non-whole numbers, which are called floating point numbers because the decimal
point can float around.
In 32-bit floating point number, the first bit is used as sign, the next 8 bits are used as the exponent and the
remaining 23 bits re used to store the significand.
Letters are encoded as binary numbers too. Unicode was devised in 1992 to scrap the different international
schemes and replaced them with one universal encoding scheme. The most common version uses 16 bits
with space for over a million codes, which is enough for every single character from every language and
mathematical symbols and emojis.
File formats like MP3 and GIF also use binary to encode sounds and colours of a pixel.
Everything in devices are long sequences of 1s and 0s.
5 HOW COMPUTERS CALCULATE
Calculation by computers are handled by the arithmetic and & logic unit (ALU).
o Arithmetic unit is responsible for handling all numerical operations in a computer.
o Logic unit performs logical operations: AND, OR and NOT.
6 REGISTERS AND RAM
Random access memory (RAM) stores memory for the computer when the power is on.
Persistent memory can survive without power.
A latch is called a latch because it latches onto a particular value and stays that way. The action of putting
data into memory is called writing, whereas getting the data out is called reading.
A group of latches operating like this is called a register, which holds a single number and the number of bits
in a register is called its width.
8 bits hold enough numbers to provide addresses for 256 bytes of memory.
Random access memory (RAM) means we can access any memory location at any time and in a random
order. RAM is like human’s short term/working memory.
Static random access memory (SRAM) uses latches.
Types of RAM: DRAM, Flash memory, NVRAM.
These RAM store bits of information in massively nested matrices of memory cells.
Registers are small, linear chunks of memory, useful for storing a single value.
RAM is a larger bank of memory that can store a lot of numbers located at different addresses.
7 CENTRAL PROCESSING UNIT (CPU)
CPU’s job is to execute programs.
Programs are made up of a series of individual operations, called instructions.
If they are mathematical instructions, the CPU will configure its ALU to do the mathematical operation. If it is
a memory instruction, it will configure the memory to read and write values.
The high level view is called the microarchitecture.
The first phase of a CPU’s operation is called the fetch phase, where we retrieve our first instruction. The
decode phase figures out what that instruction is so we can execute it. The execute phase performs the
instruction.
The clock keeps the CPU ticking along. It triggers an electrical signal at a precise and regular interval. Its
signal is used by the Control Unit to advance the internal operation of the CPU.
The clock speed is the speed at which a CPU can carry out each step of the fetch-decode-execute cycle. It is
measured in Hertz.
To meet demand, many modern processors can increase/decrease their clock speed depending on the
demand, this is called dynamic frequency scaling.
8 INSTRUCTIONS & PROGRAMS
CPU is powerful because it is programmable, if you write a different sequence of instructions then the CPU
will perform a different task. Thus, CPU is a piece of hardware that is controlled by easy-to-modify software.
9 ADVANCED CPU DESIGNS
One way to shorten the time need for RAM to lookup the address, retrieve the data and configure itself for
output is to put a little piece of RAM right on the CPU, called a cache.
When the data requested in RAM is already stored in the cache, it’s called a cache hit. If not, it’s a cache
miss.
The cache can be used like a scratch space, storing intermediate values when performing a longer or more
complicated calculation.
Cache has a special flag for each block of memory it stores, called a dirty bit.
10 EARLY PROGRAMMING
11 PROGRAMMING LANGUAGES
Computer hardware can only handle raw, binary instructions which are called machine language/code.
12 PROGRAMMING BASICS