Computer architecture Flashcards
What are the main components of a computer?
the central processing unit;
the memory;
the input/output devices
What does the CPU do?
Sets up input/output devices and then the interrupt, so you don’t have to continuously connect to the I/O device.
What is the CPU made up of?
The CPU contains a small number of registers, most of which are general-purpose which contain things that the program is using right now.
Among the general purpose registers are a few of which are special-purpose which are preallocated (r13,14,15).
What does ALU mean?
Arithmetic Logic Unit
What does the ALU do?
Performs operations between two input registers, putting the result in an output register. Simple but quick.
What is a binary bit?
0 or 1
What is a byte?
8 bits
How many bytes is a word?
2, 4 or 8 bytes.
What does the memory store?
The memory stores programs and data.
What do load and store instructions do?
A load instruction transfers a word from memory to a register, while a store instruction transfers a word from a register to memory.
What does ldr r1, [r8] do?
What does str r3, [r6] do?
load r1 from memory address in r8
store r3 to memory address in r6
What does the control unit do?
The control unit fetches instructions from memory, as
determined by the program counter register.
Example of branches?
b delay @ unconditional branch to label
bne delay @ conditional branch to label
bl printf @ branch to label and link
delay:
What is a stack?
Data structure where you can only remove or put an item on the top using PUSH and POP functions.
You can’t POP from an empty stack
You can’t PUSH onto a full stack
Input/output devices are connected by busses that have:
∙ control lines that carry commands;
∙ address lines that carry addresses;
∙ data lines that carry data