Computers, Software, Algorithms
Computers
- Computers have steadily become smaller and cheaper due to electronics advances (Moore’s Law) and the large market; most people own multiple computers.
- Processor: the technical name for a computer; a processor includes the CPU, a small amount of memory (cache), and is connected to input/output devices.
- Embedded computers: today, computers are embedded as components of phones, game consoles, microwaves, music players, brakes, etc.; the main variation is the devices they connect to and the software.
- In tech speech, processor and computer are used interchangeably; many systems contain more than one processor.
- iPhone 5 teardown shows at least five computers: A6 main processor plus additional ARM cores and GPUs; other chips provide flash memory and telephony.
- ARM = Advanced RISC Machine; RISC = Reduced Instruction-Set Computer; using embedded ARM processors simplifies design and makes writing software easier than hardware-centric designs.
Processors
- Processor = computer in everyday tech talk; includes CPU and cache and I/O; most general-use systems contain multiple processors.
- Mobile devices host multiple processors; hardware variations mainly stem from connected devices and software.
- The iPhone example: the A6 contains at least two ARM processors and three GPUs; additional chips handle memory and telephony.
Software
- Software is the collective term for programs—the instructions that implement applications.
- Software instructs hardware by providing steps to perform a task (e.g., display a web page, play a game).
- The CPU executes the program rapidly and accurately.
- A program is a collection of instructions; software is one or more programs; “software programs” is redundant.
- Programming = instructing an agent to perform a function; the agent for software professionals is a computer.
Algorithms
- An algorithm is a precise and systematic method for producing a specified result.
- In this book, algorithm and program are treated as synonyms; they differ, but not in essence for now.
- Five properties of an algorithm (Input/Output, Definite, Effective, Finite).
- Example: finding whether an item e is in a list (linear search).
- Input: a list containing one or more items, and an item e
- Output: “Yes, e Found” or “e Not Found”
- Steps:
- Place a marker by the first item.
- If there is no item by the marker, stop and report “e Not Found”.
- If the item by the marker is e, stop and report “Yes, e Found”.
- Advance the marker to the next position.
- Continue with Step 2.
- This process is an algorithm; it is the linear search algorithm.
Acronyms
- Acronyms are important in computing terminology.
- TLA stands for Three-Letter Acronym; example: RAM stands for Random Access Memory.
Booting
- Booting means to start a computer; rebooting means to restart it.
- Bootstrapping origin: computers were started by an operator entering a few instructions into memory using console push buttons; this tiny operating system could read more instructions from punch cards.
- Today, BIOS instructions to start a computer are stored on a microchip called the Boot ROM (Read-Only Memory).