Forum Discussion
Altera_Forum
Honored Contributor
13 years agomod - remainder confiusion
Dear all, Anyone can explain what mean by this line of code: ad<=(-5) mod 8; I know the "mod" is the remainder. But, why need negative? What the different with ad<=5 mod 8? Th...
Altera_Forum
Honored Contributor
13 years agoWhile I am not sure if this is the helpful or not (as I can not see the context of your code):
5 as a byte: 0b00000101 -5 as a byte (one's complement): 0b11111010 -5 as a byte (two's complement): 0b11111011