A82: Re: NEG and CPL


[Prev][Next][Index][Thread]

A82: Re: NEG and CPL




NEG = CPL +1

CPL complements all bits in the byte, NEG complements all bits and adds 1.
So if you want -A use neg, if you want not(A) use cpl.

Example

CPL $14 = not(00010100) = 11101011
NEG $14 = not(00010100)+1 = 11101011+1 = 11101100

Dines
----- Original Message ----- 
From: Wouter Demuynck <wouter.demuynck@student.kuleuven.ac.be>
To: <assembly-82@lists.ticalc.org>
Sent: Saturday, November 14, 1998 12:12 PM
Subject: A82: NEG and CPL


>
>One question:
>
>What's the difference between NEG and CPL again? NEG gets the two's 
>complement and CPL the one's compliment, but how is that one's 
>complement calculated?
>
>Suppose A = $14
>
>What will be the result of NEG A and CPL A ?
>
>Thanks
>
>Wouter