Skip to main content

Finding 2's complement of a number

Finding 2's complement of a number

  1. LDA 2501 H  : "Get data in accumulator"  
  2. CMA         : "Take its 1's complement"  
  3. ADI, 01 H   : "Add one in the number"  
  4. STA 2502 H  : "Store the result in 2502 H"  
  5. HLT         : "Stop" 

Comments