COMPUTER SCIENCE

Cards (36)

  • Assembler
    Converts low-level assembly language to machine code, assigns memory
  • Assembly code
    Low-level programming language before conversion to machine code
  • Opcode
    Binary representation of an assembly instruction, e.g., AND to 0010
  • Operand
    Data manipulated by an instruction, e.g., variable or constant
  • Interpreter
    Converts high-level code to machine code line by line for CPU execution
  • Compiler
    Converts high-level code to machine code in stages: lexical, syntax, semantic, code generation
  • Lexical analysis
    Removes comments/spaces, replaces keywords with tokens, creates symbol table
  • Syntax analysis
    Checks tokens for correct spelling/grammar, produces error messages for syntax errors
  • Semantic analysis
    Checks variable declaration, data type correctness, legality of operations
  • Code generation
    Produces machine code, may optimize code for efficiency
  • Translator
    Converts a program from one language to an equivalent in another language
  • Syntax error
    Occurs when a command violates the expected language syntax, e.g., misspelling keywords
  • Runtime error
    Occurs during program execution, like running out of memory causing a crash
  • Logical error

    Results in incorrect program output without crashing, e.g., wrong calculation
  • Linking error
    Occurs when a called function lacks the necessary linked library
  • Rounding
    Approximating a number to the nearest whole/tenth/hundredth
  • Truncation
    Approximating a number to a whole/tenth/hundredth closer to zero
  • Integrated Development Environments (IDE)

    Tools for programmers to create computer programs
  • Compiler
    Converts source code to executable machine code
  • Interpreter
    Converts source code to machine code line by line
  • Linker
    Joins compiled code from libraries
  • Loader
    Loads compiled code into memory
  • Debugger
    Helps identify and fix program errors
  • Trace
    Shows program execution order and variable values
  • Break point
    Halts program at a line for error checking
  • Variable watch

    Displays and monitors variable values
  • Memory inspector
    Shows memory contents in a section
  • Error diagnostics
    Displays error messages for debugging
  • Library
    Collection of common functions and subprograms
  • Standard libraries
    Contain tested functions for programmers' use
  • Advantages of standard libraries
    Saves time, ensures reliability, easier maintenance
  • Custom libraries
    Personalized collections of functions and subprograms
  • High level languages
    Programming languages resembling natural human language, easier to understand and program, examples: Basic, Java, Pascal
  • Machine code
    Instructions in bit patterns directly executed by CPU, opposite of high level languages
  • Low level languages
    Assembly code requiring CPU structure knowledge, mnemonics converted to machine code, not portable but efficient
  • Uses of high and low level languages
    High level for common applications, low level for fast execution like device drivers or embedded systems