The SUB instruction performs a subtraction on the first source
register's contents by the second source
register's
contents, and stores the result in the destination register.
It's syntax is:
SUB $destination register's address,
$first source register's address, $second
source register's address.
The sample SUB instruction demonstrated in the datapath above is SUB $8, $2,
$6.
The instruction's equivalent in binary is:
Information on the content of the registers used:
Register's Address |
Register's Address (Binary) |
Register's Value |
Register's Value (Binary) |
$2 |
00010 |
|
|
$6 |
00110 |
|
|
$8 |
01000 |
To be updated |
To be updated |