Skip to main content

How Do Computers Work?

Key Terms

  • Input/Output Subsystem – allows the computer to interact with the environment
    • Converts physical input into binary information
    • Converts binary information into physical output
  • Central Processing Unit – brains of the computer
    • Processes the binary information and calls programs
    • Fetches instructions from memory and executes them
  • Programs – predefined instructions that the CPU accesses
    • Acts on the binary information
  • Memory – where programs are stored
    • Stores the binary information
  • Bit – the smallest piece of information a computer can store (on/off)
  • Operating System – the program that manages how the software uses the hardware of a computer
  • Compiler – translates source code (human-readable) into machine code
    • First: turns source code into tokens or words (Lexical Analysis)
    • Second: tokens are organized in a hierarchical order known as a parse tree (Syntactic Analysis)
    • Third: compiler denotes the context of the code (Semantic Analysis)
    • Fourth: browse through the parse tree and find machine code that does the same thing as the source code

Key Actions

  • Receive input
  • Store information
  • Process information
  • Produce output

Circuits

  • Input/Output are just information that can be stored as on/off electrical signals (1s and 0s)
  • Circuits modify and process information that’s inputted as ones and zeros
    • And, Not, Or, Nand, Nor, Xor
  • Smaller circuits mean less travel distance for electrical signals, leading to faster processing speed
    • Electricity moves at just about the speed of light

Binary

  • Numbers: each digit represents 2n instead of 10n. Ex. 1001 = (1×8) + (0x4) + (0x2) + (1×1) = 9
  • Text: each letter is assigned a number which is represented with a binary number, which is represented by a sequence of wires that turn on/off
  • Images: each pixel is represented by numbers to show color, each number is represented in binary, and thus wires
  • Sound: every sound is just a vibration that can be represented by a waveform graph. Each point on the graph can be represented by a number, therefore each sound can be represented as a sequence of numbers. Higher quality audio just means taking more points in the graph
Koko Xu

Lover of international cuisines and Class B chess player.