programming languages

Cards (86)

  • What are the two classifications of programming languages?
    Low-level and high-level languages
  • What are the two types of low-level languages?
    Machine-code and assembly language
  • What is an imperative high-level language?
    A language that uses commands for the computer
  • What are the advantages of machine-code programming?
    Direct control over hardware and performance
  • What are the disadvantages of assembly language programming?
    Complexity and difficulty in debugging
  • Who developed the Colossus computer?
    Tommy Flowers
  • What was the input method for the Colossus computer?
    A continuous loop of paper tape
  • What was the purpose of the Colossus computer during WWII?
    To break the Enigma Code
  • What type of cipher did the Enigma Code use?
    A Vernam-type cipher
  • What was the memory cell technology used in early computers?
    Vacuum tubes
  • What is the structure of a typical machine code instruction?
    Opcode and operand
  • How many different instructions are possible using 8 bits for the opcode?
    256 different instructions
  • What does the instruction '0000' do in machine code?
    Load value into the accumulator
  • What does assembly language improve upon compared to machine code?
    Uses mnemonics for opcodes
  • What is the meaning of the instruction 'LDA' in assembly language?
    Load value into the accumulator
  • What is the relationship between assembly language and machine code?
    One-to-one correspondence between instructions
  • What was the first high-level programming language?
    FORTRAN
  • How do high-level languages differ from low-level languages?
    They allow abstraction from hardware details
  • What is an example of an imperative high-level language?
    C#
  • What is the purpose of translating high-level language statements?
    To convert them into machine code
  • What is a disadvantage of high-level languages compared to low-level languages?
    Object code may run slower
  • Why are high-level languages considered portable?
    They can be recompiled for different computers
  • What was the memory capacity of the Apollo 11 computer?
    64KB
  • How has computer technology evolved since 1943?
    Significantly improved in hardware and software
  • What are the three types of program translators?
    Assembler, compiler, interpreter
  • What is the role of an assembler?
    Translates assembly language into machine code
  • What is the role of a compiler?
    Translates high-level language into object code
  • What is the role of an interpreter?
    Executes high-level language programs statement by statement
  • What is the difference between compilation and interpretation?
    Compilation translates; interpretation translates and executes
  • Why are programs still written in assembly language?
    For speed and direct hardware access
  • What is the relationship between assembly language and machine code?
    One assembly statement maps to one machine code statement
  • What is the relationship between high-level programming language and machine code?
    One high-level statement maps to several machine code statements
  • When would it be preferable to use a compiler?
    When speed of execution is critical
  • When would it be preferable to use an interpreter?
    When rapid debugging is required
  • What does an assembler do?
    Translates assembly language into machine code
  • What does a compiler produce?
    A separate independently executable object code
  • What is bytecode?
    An intermediate language between machine code and high-level language
  • Why is bytecode produced by some compilers?
    For execution on a virtual machine
  • How does a bytecode interpreter work?
    It parses and executes bytecodes one at a time
  • What is the advantage of using bytecode?
    It is portable across different platforms