1.2.4

Cards (65)

  • Assembly language
    little man computer(LMC)
    how many assembly instructions does it have
    11
  • Assembly language
    little man computer(LMC)
    little man computer addressing
    assembly language is a low-level and use different types of address to access memory locations
    so what does LMC support
    only support direct addressing of memory location
  • Assembly language
    little man computer(LMC)
    what does it allow user to see
    to see how the registers and memory locations are used in a processor
  • Assembly language
    little man computer(LMC)
    what is it
    is a virtual implementation of a van neuman processor that allows people to test out a basic assembly language compiler
  • Assembly language
    Little man computer
    Examples of mnemonics:

    ADD, SUB, OUT, INP
  • Assembly language
    what is this
    use 3 letter mnemonics for key actions(such as INP for input), makes it easier for developers
  • Little man computer
    What does the LMC only support
    Only support direct addressing of memory location
  • Little man computing addressing
    What is assembly language
    Is a low level and use different types of address to memory locations
  • Machine code instructions(Binary form)
    Machine code instruction will have different what?
    Different sized instructions based on their architecture
  • Machine code instructions
    Info:
    64-bits Processors will have instructions that are 64 bits in size
  • Machine code instructions
    Is a low level language that control what ?
    CPU
    (Instructions are split into sections
    ●first section is basic machine operation(+×÷-)
    ●second section is the adressing mode(is usually stored in 2 bits) (addressing code tells the processor which typee of addressing to use on the operand code(opcode)
    ●the final part is the opcode,which will be translated differently depending on the type of address mode used)
  • machine code(binary form)
    low-level language that controls the CPU
    instructions are split into sections
    what is the first and second section
    and the final part
    and for the second section, what the addressing code tells you

    first section is basic machine operations(+-%)
    second section is the addressing mode(is usually stored in 2bits)
    -adressing tell the processor which type of addressing to use on the operand code(opcode)
    the final part is the opcode, which will be translated differently depending on the type of address mode used
  • machine code(binary form)
    machine code instructions will have...

    different sized instructions based on their architecture
    -64 bits processor will have instructions that are 64 bits in size
  • Encapsulation
    Setters and getters
    A setter and getter are special type of method that...
    Finish for Setters and Getters

    Setters: sets one of the attributes equal to a specific value
    Getters: obtains the value of one of the attri used of the object
  • Encapsulation
    What is information hiding
    Each attribute can only be accessed or modified by methods that are set(encapsulated) when defining the class
  • Encapsulation
    What is the purpose
    The use of these methods protects data in the class instance from being tampered with
  • Polymorphism
    Overloading
    The method might also have a different return types 

    Example: a shape superclass might have an area calculating functions
    -the superclass circle could have the function area(radius), whereas as triangle subclass could have the function area(base,height)
  • Polymorphism
    Overriding what happens to the method that is defined
    The method that is defined in the subclass overrides the method defined in the superclass
  • Polymorphism
    What is it
    When a subclass alters its inherited methods in two ways by:
    Overloading
    Overriding
  • Polymorphism
    What is overloading
    When a method is defined in the subclass that has the same name,but different arguments to a method defined in the superclass
  • Polymorphism
    What is overriding
    Is when a method is redefined in the subclass with the same name and same argument
  • What is encapsulation
    Is a principle that concerns how data inside the class can be assessed or changed
  • mode of addressing memory
    direct addressing
    here what is the opcode for
    is the address for the memory location where data can be found
  • mode of addressing memory
    direct addressing
    in the little man com[uterm(LMC), this is the only type of addressing available
    true of false
    true
  • mode of addressing memory
    direct memory
    the value is not given directly, to get it the CPU has to what
    to retrieve from the given memory location
  • mode of addressing memory
    immediate addressing
    if we used the immediate addressing, the binary opcode of 00000101 and give it to the cpu what will it give us
    5
  • mode of addressing memory
    immediate addressing
    why is this a way to give the data directly to the processor
    so it doesnt need to access another memory location
  • mode of addressing memory
    indexed addressing
    what is the index register value
    is a constant value that indicates the first memory location for an array of data items
  • mode of addressing memory
    indexed addressing
    what is the opcode here
    the value that is added with a value stored in the index register to give the location of the data to be used
  • mode of addressing memory
    indirect addressing
    by using this addressing, the CPU can access what
    a significantly higher number of adressable locations
  • mode of addressing memory
    indirect addressing
    what is the opcode here

    is the location of the value to be used(this is usually a register)
  • mode of addressing
    in which type of addressing does the opcode specifiy the address memory location of the value to be used

    direct
  • modes of addressing memory
    immediate addressing
    in this addressing, what is the opcode like

    the opcode is the actual value to be used
  • object orientated languages
    class
    accessing attributes
    if its public, it can be accessed outside the class
    aobject attributes are accessed using dot notation:

    int attr = myObj.attr;
  • object orientated languages
    class
    calling methods
    if a methods of an object is public then it can be accessed...
    object methods are accessed using the dot notation:
    from the outside the class
    -myObj.dosomething();
  • object orientated languages
    class
    classes in java
    in java, classes are created uaing the class keyword
    these classes can be made what
    public(can beused in any part of the program) using the public class keyword)
  • object orientated languages
    class
    creating an object
    objects are made from what
    to create an object we use the keyword --- and the name of the ---:
    new, class
    myClass myObj = new myClass();
  • object orientated languages
    class
    how would the attribute name of the class myclass be accessed?
    myClass.name
  • object orientated languages
    class
    one class will often represent what
    one type of real world object(basketball game represent "ball" class)
  • object orientated languages
    class
    what is inside a class
    hint:contain 2 main components
    attributes:these are variables which describe the object
    method:these are subroutines which allow the object to perform actions