base integer instructions

  • Base 47 instructions

  • there are 32 registers

Main memory

  • memory is a large 1-D array

    • each address is a 8 bit (byte)
  • Little endian

    • where th e LSB
  • Memory operand example

    • A[12]=h+A[8]
      • h in x21, bas adress of A in x22
        • so we would be taking to

Operands

  • immediate operands

    • immediate operands skip load instruction

      • only small constants allowed
      • end with an “i”
    • addi
      • constant specific addition
      • addi x22, x22, 4
  • register operands

    • basic type
    • limmited by the # of registers
  • memory operands

    • load and store

Integer numbers

  • human number (base 10)

    • machine like binar number (base 2)
    • in any number base the value off the i-th digit is
  • types of integer numbers

    • unsigned and signed
  • instructions number

    • ie stored program concept (slide 5)

Assembly to binary

  • C program

    • A[30] ok but we want assembly we need to store it 120(x10) x10 is the instruction and 120 is the bit repsentation of the array in binary so it adds the offset
  • if you want to put an array into another array but he complement of it you can just xor with -i then wow