posted Mar 29, 2013, 5:17 AM by Neil Mathew
[
updated Mar 29, 2013, 5:17 AM by Neil Mathew
]
ALGO: 1's compliment
Memory Address | Opcode | Mneumonics | Comments | 2500 | 3A | LDA 2000H | 3A = Load Address to Accumulator | 2501 | 00 | | LSB First (00 of 2000) | 2502 | 20 | | MSB Second (20 of 2000) | 2503 | 2F | CMA | | 2504 | 32 | STA 2001H | Stores accumulator value | 2505 | 02 | | LSB (02) | 2506 | 20 | | MSB(20) | 2507 | 76 | HLT | Halt (End of Program) |
ALGO: 2's compliment
Memory Address | Opcode | Mneumonics | Comments | 2500 | 3A | LDA 2000H | 3A = Load Address to Accumulator | 2501 | 00 | | LSB First (00 of 2000) | 2502 | 20 | | MSB Second (20 of 2000) | 2503 | 2F | CMA | | 2504 | 3C | INR A | Add 1 to compliment to get 2's compliment | 2505 | 32 | STA 2001H | Stores accumulator value | 2506 | 02 | | LSB (02) | 2507 | 20 | | MSB(20) | 2508 | 76 | HLT | Halt (End of Program) |
|
|