Page 65 - Computer_Science_F5
P. 65

Computer Science  2.  ARMv8 (AArch64):         3.  x86 (Complex Instruction Set
                                                         Computing):
                (a)  Instruction: ldr x0, [x1]
                                                          (a)  Instruction: mov eax, [ebx + 4]
                (b)  This instruction retrieves the
                                                          (b)  Explanation: This instruction
                    data from the memory location
                                                              combines memory addressing
                    whose address is stored in x1
          FOR ONLINE READING ONLY
                    and loads it in register x0.
                                                              from the memory location
                     (i)  ldr:  This  specifies  the          and data. It fetches the value
                         operation (load).                    calculated by adding 4 to the

                     (ii)  x0: This is the destination        address stored in register ebx
                         register where the loaded            and places it in register eax.
                         data will be stored.                 (i)  mov: This specifies the
                     (iii) [x1]: This indicates the               operation (move).
                         memory location to be                (ii)  eax: This is the destination
                         loaded.  The value in                    register.
                         register  x1  acts as the            (iii) [ebx + 4]: This indicates
                         base address for memory                  the memory location to
                         access.                                  be accessed.




               Activity 1.14:

             Simulation to explore how computer memory is utilised using CPU simulator
            Aim:
            To  enhance  individual  knowledge  and  comprehension  of  computer  memory
            utilization in a practical and interactive manner


            Materials:
            Computer, CPU simulator software or Internet.


            Instructions:
            Create a program and instructions to add two numbers. The first number should
            be stored in a register R00,  the second number should be stored in register R01,
            and the results should be stored in register R02. All instructions should appear in
            the CPU instructions memory (RAM).


            Step 1: Understand the components of the CPU simulator





                                                  56
                                                                for Advanced Secondary Schools



     Computer Science Form 5.indd   56                                                      23/07/2024   12:32
   60   61   62   63   64   65   66   67   68   69   70