1/26
Flashcards about ARM Assembly - Arithmetic and Logical Operators
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is the most basic unit of computer processing?
An instruction.
What is Instruction Set Architecture (ISA)?
ISA defines the low-level instructions that a specific processor can execute. It is the vocabulary of machine code understood by the processor.
What are the two representations of computer language?
Machine language (computer-readable) and Assembly language (human-readable).
In the instruction ADD r0, r0, r1, what are r0 and r1?
Source registers.
In the instruction ADD r0, r0, r1, what is the first r0?
Destination register.
Which registers are lower registers?
R0-R7
Which registers are higher registers?
R8-R12
What is R13?
Stack Pointer (SP)
What is R14?
Link Register (LR)
What is R15?
Program Counter (PC)
What is CPSR?
Current Program Status Register
What is the purpose of the 'mov' instruction?
To copy data between registers or set an immediate value to a register.
What does the instruction 'mov r1, r2' do?
Copies the value of r2 into r1.
What does the instruction 'mov r1, #77' do?
Sets r1 to the value 77.
What does the 'add' instruction do?
Adds the values of two registers.
What does the 'sub' instruction do?
Subtracts the values of two registers.
What is the range of numbers represented by a 32-bit two's complement?
-2147483648 to +2147483647
How do you obtain the negative of a number in two's complement?
Flip the bits and add 1.
What is the purpose of the Current Program Status Register (CPSR)?
Records the state of the program, including arithmetic side-effects.
What are the key flags in CPSR?
N (negative), Z (zero), C (carry), and V (overflow).
What are the uses of bit shifting?
To manage individual bits in a register and for fast multiplication/division with powers of 2.
List the types of bit shifts
ASR (arithmetic-shift-right), LSL (logical-shift-left), LSR (logical-shift-right), and ROR (right-rotation).
What are the logical operators in ARM?
AND, EOR (xor), ORR, BIC.
What does BIC do?
Rn = Rd & ~Rm
How are constants represented in assembly?
Prepended with the symbol # and interpreted as a signed integer.
What values can mov load to registers?
Values between 0x00000000 to 0x0000FFFF
What is movt?
movt can load 16-bit values into the upper 16 bits of a register (lower 16-bits remain the same).