|
Each row of holes in the paper will cause the mechanical piano to hit a specific set of keys (= notes)
In the mechanized calculator analogy:
|
|
Slideshow:
|
The special purpose registers allows the CPU to perform its designed function which is:
|
We will now discuss the usage of the 3 special purpose registers
|
If you want to know what circuitries are used and how the different components coorporate to execute a computing instruction, you will have to take CS355.
|
|
The PSR register contains a (large) number bits (typically 32)
The value of each bit represents a certain execution condition
Example:
|
Explanation:
|
|
because together, their values can be used to check for the comparison outcome of 2 values.
Example:
Compare: x = 4 and y = 5 4 - 5 -------- -1 |
The outcome of the subtraction contains information about whether:
x == y (result = 0 !) x != y (result != 0 ) x < y (result is a negative number !) x > y (result is a positive number !) x <= y (result = 0 or a negative number) x >= y (result = 0 or a psotive number) |
You can check the setting of the flags to find out which condition is true.
Here is a table of what flag setting to look for:
Source: https://azeria-labs.com/arm-data-types-and-registers-part-2/
Comment:
|