Techniques Flashcards

1
Q

Encoding two numbers less than N into one number?

A

A = num1 + num2 * N
Now using A one can derive both values using below formulas
num1 = A % N
num2 = A / N
This only works if num1 and num2 are less than N.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly