Re:A history of branch prediction
by oshepherd on Wednesday August 23, 2017 @11:11AM
(#15082092)
It's the same just with redundant representations (the 2-bit repr is the count of ones in the 3-bit repr)
this kind of transformation is truly bread & butter in hardware; we regularly numbers between binary counts, mask/number-of-set-bits and one-hot representations for optimisation purposes.
[ Parent
| on HN ]
That's the obvious attempt at an equivalence one would come up with on being told that they're the same, but, as I stated, it doesn't work. As an example: In the 2-bit saturating counter, if you start at 00, if you see a 1 and then a 0 you're back to where you started. Whereas in the bit-shift register, if you start at 000 and see a 1 and then a 0, you're now at 010, which would correspond to 01 rather than 00.