
Step 1
Step 1: encoding
 Take A and B, two signed numbers made of N bits
 Compute the sum µ = A + B (with N+1 resolution)
 Compute the difference δ = A  B (with N+1 bits of resolution)
 Adjust the sign bit : µ = µ xor MSB(δ)
 Remove the LSB of µ : µ = µ shr 1 (µ now uses N bits)
 Remove the MSB of δ : δ = δ mod 2^N (δ now uses N bits)

Step 2
Step 2: decoding
 Take the coded values µ and δ, with N bits each
 Restore the LSB of µ by copying it from δ: µ = (µ shl 1) + (δ mod 2)
 Restore A but drop the MSB: A = (µ + δ) mod 2^N
 Restore B but drop the MSB: B = (µ  δ) mod 2^N
Discussions
Become a member
In order to follow projects & hackers or give likes
Already a member?you need to create an account.