Computer Science, Crash Course (YouTube) Flashcards
What’s first example of calculating machine?
Abacus
(Mesopotamia 2500 BCE)
Who said: “At each increase of knowledge, as well as the contrivance of every new tool, human labour becomes abridged”?
Charles Babbage
(1791-1871)
Who invented the Step Reckoner?
1694
Gotfried Leibnitz
Could do add/subtract/multiply/divide - first machine that could do this
How were artilery calculations performed traditionally?
Using range tables - taking into account distance, wind speed, weather etc
Used well into WW2
Who invented the Difference Engine, capable of solving polynomials?
Charles Babbage
What did Babbage come up with after the Difference Engine?
Analytical Engine - first multi-purpose computer, can run steps in sequence, store results, even with a printer
Who was the first person to write hypothetical programs for the Analytical Engine? The first “programmer”?
Ada Lovelace
(1815-1852)
How was the US census of 1890 helped by the use of computers?
Manually it would have taken 13 years
Herman Hollerith developed electro-mechanical system using tabulations and punch cards e.g. a hole punched for marital location, this would enable a circuit at that location which would turn a motor and added one (to the married total)
Sped up things by 10 times
Hollerith’s machine tabulating company merged with others to become what in 1924?
IBM
What was the Harvard Mark I and what was the main component that it used?
1944 at Harvard, used by Allies (e.g. running simulations for Manhattan Project)
Could do three additions or subtractions per second
Based on the “mechanical relay” switch
What design improved the mechanical relay?
Vacuum tube - no moving parts, this is a move to “electronic computing”
What was the first electronic computer (using vacuum tubes)?
Colossus Mark I
1943
Bletchley Park - code breaking Nazi messages
First programmable computer
What was the true first general purpose programmable computer?
ENIAC
1946
Uni of Penn
Operational for 10 years
More arithmetic that the entire human race up to that point
~17.5K vacuum tubes
What followed the vaccum tube and who invented it?
Transistor
Bell Labs in 1946
What was the first commercial transistor computer?
IBM 608
1957
Contained 3000 tranistors
Could do 4,500 additions per second
How big are transistors today?
Smaller than 50 nanometers
(paper is 100,000 nanometers)
What are the 3 basic logic gates that can be built with transistors and what are their symbols?
NOT (triangle with dot)
AND (D shape)
OR (spaceship shape)
How can you use the basic gates to build an XOR?
(OR gate)
AND
(NOT(AND))
What system replaced ASCII?
Unicode in 1992
(based on 16 bits)
Which part of the processor does computations like calculating?
Arithmetic and Logic Unit (ALU)
What is the first chip that has an ALU completely in it?
Intel 74181
(1970)
Logic gates can be thought of as “…” for the individual transistors
abstractions
Give an example of overflow affecting real life applications?
Pacman used 8-bits to store scores, once you got past level 255, the ALU overflowed resulting in glitches to the game
Became a right of passage for Pacman players
Why do simple ALUs not have multiplication and division circuits?
Because you can simplify them to addition and subtraction operations
How many bits and logic gates did the famous Intel 74181 chip have
4 bits
70 logic gates
What are the symbols used for ALU operations?
E.g. for an 8 bit ALU
V symbol
* Input A and Input B go in at the top (each 8 bits)
* Operation code (4 bits) from the left
* Flags from the right (overflow, zero, negative)
* Output (8 bits)
Which logic gates can be used to store states i.e. memory?
And-Or Latch
What is the name given to a group of latches, holding a single number? And the number of bits is knows as it’s […]?
Register
Width
Today many chips are 64 bit wide
How much RAM does my M2 chip have?
8 GB
(= 8 * 8 * 1024 * 1024 * 1024 = ~64B bits)
Which component chooses the right address to read/write memory to?
Multiplexer
The first single chip CPU Intel 4004, had what clock speed? (1971)
740 kHz
What’s the clock speed of my M2 mac?
3.49 GHz
(3.5 billion cycles per second)
What are the main components in a CPU?
Clock
Control Unit
Registers
ALU
How many instructions did the first fully integrated chip (Intel 4004) have?
46 instructions
Modern chip has thousands
What is the name of the entity that connects CPU chip to RAM?
Bus
What’s cache?
Piece of memory that sits on the chip to speed operations up
A block of data is moved from RAM to cache
Closer to CPU so cache can be accessed more quickly (in one clock cycle, say, rather than waiting for a few clock cycles)
What cache does the M2 apple chip have?
192 KB of L1 instruction cache
and 128 KB of L1 data cache
and share a 16 MB L2 cache
If the data is found in cache, what’s it called?
Cache Hit
If data in cache is different from RAM, how is this flagged in the cache?
via a “dirty bit”
What are the building blocks of the CPU cycle?
Fetch
Decode
Execute
What chip powers my Mac, and how many transistors?
M2
20b transistors
What chip powers my iPhone and how many transistors?
A15 Bionic chip
15b transistors
What are the five areas of the chip making industry?
- ISA = Instruction Set Architecture
- Chip design
- Fabrication
- Software and equipment
- Packaging and testing
What are the two main ISA’s and which chips and OS’s use them?
x86 > Intel and AMD > Windows, Mac, Linux
Arm > multiple makers > Android
What are the CapEx ratios (of revenue) for chip designers vs. chip fabs?
Designers: 3-5%
Fabs: 30-50%
Who is the biggest chip maker (foundry)? and market share?
TSMC
Over 50%
EUV Lithography machines - who makes them?
ASML (Dutch company)
How many machines does ASML make per year?
25
(each one costs $120m)
What’s a multi-core processor?
Can run instructions in parallel, whilst sharing some commone components like cache
What’s a FLOP?
Floating Point Operation per Second
What did Joseph Marie Jacquard develop?
Programmable textile loom
1801
Using punched cards to create patterns
How would you program the early bsuiness machines?
Using control panel, move plugs/wires around, could take weeks
What is the design called when you store instructions and data in memory?
Von Neuman Architecture
What was the first Von Neumann Architecture machine?
Baby
Univeristy of Manchester
1948
How would instructions and data be programmed into memory?
Using Punch Cards
(well into the 80’s)
What was the first home computer and how was it used?
Which year?
Altair 8800
1975
Using switches to load it with instructions and data
What is machine code?
instructions and data given to computer in binary (0’s and 1’s) that the circuits can directly deal with
Think Altair 8800
What is assembly code?
Layer of abstraction, now you can write text to represent intstuctions and data e.g. “Load_A 15”
One to one mapping to assembly code
What was the next level of abstraction after assembly code?
Compiler
One line could translate into many lines of machine code
Generally 20x shorter than assembly code
With a small computational inefficiency added
Who came up with the concept of a compiler?
Dr Grace Hopper
1952
A0 language
What was the first programming language that gained traction and who invented it?
Fortran
1957
Dr John Backus for IBM
What came after Fortran?
COBOL
1959
That could be written once and then run on any machine (once compiled)