Untitled document (1).pdf
Document Details
Tags
Full Transcript
WHAT IS A COMPUTER Principles behind computational thinking Electrical machine that has a lot of input and output, that can calculate and has a lot of memory - manipulate [electricity] Different components of computer - memory, and component to manipulate the contents of the memory - Computers...
WHAT IS A COMPUTER Principles behind computational thinking Electrical machine that has a lot of input and output, that can calculate and has a lot of memory - manipulate [electricity] Different components of computer - memory, and component to manipulate the contents of the memory - Computers don’t have to be digital or electronic - not powerful machines like laptops - calculator (known as a computer) - Association with ALGORITHMS [step by step sequence for carrying things out] “Computers retrieve, process and store information.” - came from Turing INPUT → (Processing) → output [input and output are info PCs used for things like gaming (heating up, use fans), while super-computers are used for large amts of data processing (generate a lot of heat so need room to be very very cold) Computers have had largely the same interfaces (keyboards and screens) since the 70s 50s: used more cables and other components Mesopotamia (Sumerians and Babylonians ) Birthplace of civilisation with non-nomadic societies developing agriculture (5000BC). Practical concerns- trade >> stock keeping >> abacus So originally, Tools to keep records of large numbers (e.g. stock of sheep, chickens, wheat.. - idea to write it in columns in cuneiform now, we use a decimal (10 digit) positional system (1 x 100 + 3 x 10 + 8 x 1) Binary system (0, 1) used for computers Basis of 60 for Mesopotamian, Sumerian - come up with the positional system AND write it down - beauty of this system would help automatise calculation through an abacus Importance of positional system - can tell through the Roman numeral system! (if you try to add III + IV, you convert it to 3 + 4 anyway) agriculture, astronomy [paying attention to what is moving in the sky - understand what is going on] , religion >> time keeping >> calendar >> celestial predictions >> table ^^ early computers?? WHY? Maybe if it’s because they are deterministic [they take the same input and spit out the same output] When you have a complicated problem and seems overwhelming - breaking the problem down [deconstruction/simplify] Because they already relied on the principles that are relevant to computers. ### 4 KEY COMPUTATIONAL PRINCIPLES 1, Decomposition The process of breaking a complex problem or system into parts that are easier to conceive, understand, program, and maintain. E.g. decomposing numbers into bases and use positions to simplify calculation. 2, Algorithmic formulation The process of expressing a task in a precise and structured manner with step-by-step instructions. E.g. following step by step instructions to add two numbers using a positional system - for abacus! makes sense - what about calendar? - Muslim world (Abbasid caliphate 750-1258) Rediscovery of Greek ideas. Melting pot with Eastern ideas from India. Al-Khwarizmi (800AD) (father of algebra, persian) Gave his name to "algorithm" (algoritmi, a Latin misnaming) 3, Abstraction (less quantities = simpler problem) The process of removing details in the study of a system to focus attention on a few details of greater importance. The process of reducing the trajectories of celestial bodies to coordinates in the night sky, without details about size, shape, colour etc 4, Pattern recognition The process of identifying regularities, similarities, and structures in data. pattern: E.g. periodicity of seasons possible Cyclic trajectories of celestial bodies prediction Manual devices 2400BC Sumerian abacus (Mesopotamia) - Mechanical devices (200BC Antikythera mechanism, Greek world) - complexity of the mechanism (found in 200 BC, able to recreate it in 2007!) 1000 Persian (then Arab) astronomical calculator (Muslim world) 1642 Pascal's mechanical calculator (France) [complexity of the machinery] Mechanical devices with perforated cards 1801 Jacquard's automatic weaving machine (France) [get faster and faster, to automatise it] 1837 Babbage's mechanical computer (theory, UK) Electromechanical devices 1941 Konrad Zuse's Z3 (Germany) (relays) - Electronic devices 1946 Mauchly and Eckert's Eniac (USA) (vacuum tubes) To keep track of the results to automate the computation to change the program and to compute faster and faster Then semiconductors: transistors, integrated circuits, microprocessors...and faster Summary 1/2 The history of computers (and computing) started thousands of years ago, long before the invention of modern-day computers The development of early computers was driven by the need to keep track of various things, to count and to predict (e.g. number of cows, days, seasons, eclipses...). Computers are still developing today, becoming faster with smaller and non-moving parts. The 4 principles behind computers don't change. Together they form the basis of Computation thinking Computers retrieve, process and store information. Only 2 symbols called bits! - how do you write numbers with only 2 symbols? note: base 2 is binary system! (1st symbol is 0, 2nd symbol is 1) - for simplicity, the calculation will become simple but VERY large VERY quickly THREE PRINCIPLES OF COMPUTERS - DIGITAL VS ANALOG - - D:2 symbols (bits, discrete) - A: continuous (quantity) - UNIVERSAL/SPECIFIC: - U: laptop [ANY kind of information processing, not just one specific one] - S: calculator - ELECTRONIC/NON-ELECTRONIC - use the best technologies of the time - ELECTRONIC: almost exclusively transistors (Not necessarily, vacuum tubes, [early transistors]) - A digital computer operates with a discrete set of symbols. - DIgital clock (discrete set of symbols) - Analog clock (nOT discrete - the hands can move in between numbers, although hand moves by steps) - manipulates position of numbers A special-purpose computer (1876) (here a mechanical integrator) A pocket calculator is digital but not universal The Atanasoff- Berry computer (1937) was digital but not universal In principle, analog computers can be universal too. (Shannon, 1941) Bit values (0 and 1) can be represented by different physical quantities: - A tiny wire at high voltage or low voltage (e.g. in processor) - A tiny patch of material that acts like a magnetic North or South Pole (e.g. in HDD) - A tiny capacitor (battery) that is fully charged or fully discharged (e.g. RAM, SSD) depending on what you’re looking at - wld implement various parts Electromechanical computer- Electronic computer Semiconductor computer 1941 Konrad Zuse's Z3 (Germany) using electromechanical relays - worked on this on his own - not electronic though! still manual 1946 Mauchly and Eckert's Eniac (USA) using vacuum tubes 1964 IBM 360 (USA) using integrated circuits Computers using electronic components for processing are called electronic. Bits, the language of digital computers Computers retrieve, process and store information. Personal computers Today, computers are digital, universal, and electronic. PARTS IN Today's computers input mouse keyboard microphone camera touchscreen network adapter secondary (mass) storage CPU (Memory - if running out, buy more, not really infinite memory - so technically…not universal computer. but this is not that important) Memory is the brain of the computer (storage and processing) Von Neumann architecture (1945) (i.e. memory stores both instructions and data) output monitor speakers vibration motor printer touchscreen network adapter secondary (mass) storage You can hear the noise made by the electromechanical relays when they process the bits. - A switch: switch open = 0, switch closed = 1 Electromechanical computer- electromechanical relays Electronic computer- vacuum tubes Semiconductor computer- transistors, integrated circuit Moving parts: big and slow to No moving parts:- small and fast (electrons instead) Evolution of "switches" in computers - switches are for processing NOT for memory CPU chips are made of billions of tiny switches CPU performs basic tasks like - arithmetic and logic instructions - control and organise instructions - input/output operations - access to information in memory - semiconductor industry MOST important industry now (silicon based chips) Graphics Processing Unit (GPU) GPU, a specialised chip originally designed to accelerate computer graphics, now often used for machine learning. CPU - CPU not specialised (not optimised for certain things but can do everything) - They handle sequences of instructions making them much more versatile, e.g. run an OS - Almost all transistors are memory GPU - GPU specialised for handling parallel operations on multiple sets of data - Faster for graphics processing, machine learning and scientific computation - Almost all transistors are processors Memory (or primary storage) The computer's main memory is made up of Random Access Memory (RAM), a memory that takes the same time to access data in any part of the memory. The memory is organised in cells of 8 bits (i.e. 1 byte) identified by its own unique address (0, 1, 2, 3,...). The CPU uses these addresses to keep track of where to find information. RAM is volatile - important for the computer processing. Different memory for input and output: Store whatever you want in the memory = CPU and working memory - output devices - Limitations - IN - OUT processing, do additions, can’t add numbers of a given size (need to add a feedback loop - conceptually, the loop can be used in memory) - it seems like it’s infinite, For each one, we can look at what it can and cannot do Estimates of how much memory the human brain has, difficult to talk about storage - To go beyond limitations, (working memory is more important) - information processing - Storage is Storage (secondary storage or disk) Secondary storage retains data even when the power is turned off. It is non volatile. Storage is slower but cheaper than memory. Since it's cheap, it can be very large. Storage is not directly addressable by CPU, unlike memory. SSD is faster, smaller, quieter and more resistant to mechanical failure since there is no moving part. VOLATILITY: Computer turns on: on the SSD, information will be kept [eg movies]. the RAM will turn on, and RAM is used for processing, to GPU (for graphics), then to display. If the computer turns off. LOOK AT THE SLIDES: computer and brain, will have a 5-10 minutes discussion about it next week Learning outcomes for chapter 1 The history of computers started thousands of years ago, driven by the need to keep track of various things, to count and to predict Modern computers use bits (they are digital) and are made of CPU, memory (RAM), storage (SSD) and GPU CPUs are made of billions of tiny switches called transistors that process information The 4 principles of computational thinking are abstraction, decomposition, algorithmic thinking and pattern recognition Computers and brains share similarities but they remain quite different in their architectures and capabilities (at least so far) - what they can do? | COMPUTER VS BRAIN | COMPUTER | BRAIN | | --- | --- | --- | | Operation | Sequential processing | Massively parallel processing | | Organization | Separated computation and memory | Collocated processing and memory | | Programming | Code as binary instructions | Spiking neural network | | Communication | Binary data | Spikes | | Timing | Synchronous (clock-driven) | Asynchronous (event-driven) | Computer: Binary input and output (Memory/RAM) Brain: Spike input and output (Neurons and synapses for both processing and memory) Computer and brain Do computers and brains also have very different capabilities? Are all brain functions computational? Is creativity algorithmic? Is consciousness algorithmic? Ex-machina (2014) For what kind of tasks do computers work well? Be very careful about what you’re speaking about! - Discuss about things you can measure/describe! Operationalisation ### Summary of today's lesson/Learning outcomes Bits, the language of digital computers The main parts of a modern computer are CPU and memory (RAM). Storage (SSD) and GPU are other very important parts of modern computers. CPUs are made of billions of tiny switches, called transistors, that process information Computers and brains share similarities but remain quite different in their architectures and capabilities (at least so far) - ChatGPT has very little to deal with algorithmic thinking (goes beyond step by step procedure? But actually not really) - difference between that. Has difference - rely on not just algorithm but data/stats that have been previously gathered When think something is specific to humans (flip the argument on its head, intuition) - think it’s only for computers, and think where the discussion will lead you Neuromorphic architecture